•  


Trigger Email from Firestore | Firebase Extensions Hub

Trigger Email from Firestore

Made by Firebase

Composes and sends an email based on the contents of a document written to a specified Cloud Firestore collection.

23.7K+
installs
Works with
Cloud Firestore
Version
0.1.33 | Source code
License
Apache-2.0
Publisher
Firebase
Report
Bug
Abuse

How this extension works

Use this extension to render and send emails that contain the information from documents added to a specified Cloud Firestore collection.

Adding a document triggers this extension to send an email built from the document’s fields. The document’s top-level fields specify the email sender and recipients, including to , cc , and bcc options (each supporting UIDs). The document’s message field specifies the other email elements, like subject line and email body (either plaintext or HTML)

Here’s a basic example document write that would trigger this extension:

admin.
firestore
().
collection
(
'mail'
).
add
({
  
to
: 
'someone@example.com'
,
  
message
: {
    
subject
: 
'Hello from Firebase!'
,
    
html
: 
'This is an <code>HTML</code> email body.'
,
  },
})

You can also optionally configure this extension to render emails using Handlebar templates. Each template is a document stored in a Cloud Firestore collection.

When you configure this extension, you’ll need to supply your SMTP credentials for mail delivery . Note that this extension is for use with bulk email service providers, like SendGrid, Mailgun, etc.

Setup Google App Passwords

Google no longer allows Gmail users to use their own passwords to authorize third-party apps and services. Instead, you have to use the Sign in with App Passwords service to generate a special password for each app you want to authorize. To do so:

  1. Go to your Google Account .
  2. Select Security .
  3. Under “Signing in to Google,” select App Passwords . You may need to sign in. If you don’t have this option, it might be because:
    1. 2-Step Verification is not set up for your account.
    2. 2-Step Verification is only set up for security keys.
    3. Your account is through work, school, or other organization.
    4. You turned on Advanced Protection.
  4. At the bottom, choose Select app and choose Other option and then write the name of the app password (e.g. Firebase Trigger Email from Firestore Extension ) and click Generate .
  5. Follow the instructions to enter the App Password. The App Password is the 16-character code in the yellow bar on your device.
  6. Tap Done .

Now you can use your Google username with the generated password to authorize the extension.

Setup Hotmail Passwords

To use your Outlook/Hotmail email account with this extension, you’ll need to have 2FA enabled on your account, and Create an App Password .

Additional setup

Before installing this extension, make sure that you’ve set up a Cloud Firestore database in your Firebase project.

Billing

To install an extension, your project must be on the Blaze (pay as you go) plan

  • This extension uses other Firebase and Google Cloud Platform services, which have associated charges if you exceed the service’s no-cost tier:
    • Cloud Firestore
    • Cloud Functions (Node.js 10+ runtime. See FAQs )

Usage of this extension also requires you to have SMTP credentials for mail delivery. You are responsible for any associated costs with your usage of your SMTP provider.

Further reading & resources

You can find more information about this extension in the following articles:

- "漢字路" 한글한자자동변환 서비스는 교육부 고전문헌국역지원사업의 지원으로 구축되었습니다.
- "漢字路" 한글한자자동변환 서비스는 전통문화연구회 "울산대학교한국어처리연구실 옥철영(IT융합전공)교수팀"에서 개발한 한글한자자동변환기를 바탕하여 지속적으로 공동 연구 개발하고 있는 서비스입니다.
- 현재 고유명사(인명, 지명등)을 비롯한 여러 변환오류가 있으며 이를 해결하고자 많은 연구 개발을 진행하고자 하고 있습니다. 이를 인지하시고 다른 곳에서 인용시 한자 변환 결과를 한번 더 검토하시고 사용해 주시기 바랍니다.
- 변환오류 및 건의,문의사항은 juntong@juntong.or.kr로 메일로 보내주시면 감사하겠습니다. .
Copyright ⓒ 2020 By '전통문화연구회(傳統文化硏究會)' All Rights reserved.
 한국   대만   중국   일본