Skip to content

Commit f655a3e

Browse files
authored
Merge pull request #2422 from firebase/next
Release firestore-send-email
2 parents 2d5fd2b + 1db9e11 commit f655a3e

File tree

19 files changed

+2614
-1413
lines changed

19 files changed

+2614
-1413
lines changed

README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
# Firebase Extensions
22

3-
This repository contains the source for Firebase Extensions. Created and tested by Firebase, these official Firebase extensions are reliable and secure. To learn more about Firebase Extensions, including how to install them in your Firebase projects, visit the [Firebase documentation](https://firebase.google.com/docs/extensions).
3+
This repository contains the source for Firebase Extensions. Created and tested by Firebase, these official Firebase extensions are reliable and secure.
4+
5+
To learn more about Firebase Extensions, including how to install them in your Firebase projects, visit the [Firebase documentation](https://firebase.google.com/docs/extensions).
46

57
Each directory in this repo contains the source code for the extension and a README to explain how the extension works, including information about the APIs enabled, resources created, and the access granted to the extension.
68

firestore-bigquery-export/scripts/gen-schema-view/package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

firestore-bigquery-export/scripts/gen-schema-view/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@firebaseextensions/fs-bq-schema-views",
3-
"version": "0.4.10",
3+
"version": "0.4.11",
44
"description": "Generate strongly-typed BigQuery Views based on raw JSON",
55
"main": "./lib/index.js",
66
"repository": {

firestore-bigquery-export/scripts/import/package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

firestore-bigquery-export/scripts/import/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@firebaseextensions/fs-bq-import-collection",
3-
"version": "0.1.23",
3+
"version": "0.1.24",
44
"description": "Import a Firestore Collection into a BigQuery Changelog Table",
55
"main": "./lib/index.js",
66
"repository": {

firestore-send-email/CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
## Version 0.2.2
2+
3+
fix: fix validation of payloads
4+
5+
docs: add documentation on how to use dynamic templates with SendGrid
6+
17
## Version 0.2.1
28

39
fix: return info on sendgrid messages

firestore-send-email/POSTINSTALL.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,29 @@ Add this document to the Firestore mail collection to send categorized emails.
6161
6262
For more details, see the [SendGrid Categories documentation](https://docs.sendgrid.com/ui/sending-email/categories).
6363
64+
#### Firestore-Send-Email: SendGrid Dynamic Templates
65+
66+
When using SendGrid, you can use SendGrid Dynamic Templates to create and send templated emails.
67+
68+
## Example JSON representation of Firestore document for a Dynamic Template:
69+
```json
70+
{
71+
"to": ["[email protected]"],
72+
"sendGrid": {
73+
"templateId": "d-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
74+
"dynamicTemplateData": {
75+
"name": "John Doe",
76+
"company": "Example Corp",
77+
"position": "Developer"
78+
}
79+
}
80+
}
81+
```
82+
83+
Add this document to the Firestore mail collection to send an email using a SendGrid Dynamic Template. The `templateId` is required and should be your SendGrid Dynamic Template ID (always starts with 'd-'). The `dynamicTemplateData` object contains the variables that will be used in your template.
84+
85+
For more details, see the [SendGrid Dynamic Templates documentation](https://docs.sendgrid.com/ui/sending-email/how-to-send-an-email-with-dynamic-templates).
86+
6487
#### Understanding SendGrid Email IDs
6588
6689
When an email is sent successfully, the extension tracks two different IDs in the delivery information:

firestore-send-email/PREINSTALL.md

Lines changed: 24 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,29 @@ Add this document to the Firestore mail collection to send categorized emails.
3939

4040
For more details, see the [SendGrid Categories documentation](https://docs.sendgrid.com/ui/sending-email/categories).
4141

42+
#### Firestore-Send-Email: SendGrid Dynamic Templates
43+
44+
When using SendGrid, you can use SendGrid Dynamic Templates to create and send templated emails.
45+
46+
## Example JSON representation of Firestore document for a Dynamic Template:
47+
```json
48+
{
49+
"to": ["[email protected]"],
50+
"sendGrid": {
51+
"templateId": "d-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx", // SendGrid Dynamic Template ID always starts with 'd-'
52+
"dynamicTemplateData": {
53+
"name": "John Doe",
54+
"company": "Example Corp",
55+
"position": "Developer"
56+
}
57+
}
58+
}
59+
```
60+
61+
Add this document to the Firestore mail collection to send an email using a SendGrid Dynamic Template. The `templateId` is required and should be your SendGrid Dynamic Template ID (always starts with 'd-'). The `dynamicTemplateData` object contains the variables that will be used in your template.
62+
63+
For more details, see the [SendGrid Dynamic Templates documentation](https://docs.sendgrid.com/ui/sending-email/how-to-send-an-email-with-dynamic-templates).
64+
4265
#### Setting Up OAuth2 Authentication
4366

4467
This section will help you set up OAuth2 authentication for the extension, using GCP (Gmail) as an example.
@@ -195,7 +218,7 @@ Detailed instructions for creating a TTL field can be found in the [Firestore TT
195218
#### Billing
196219
To install an extension, your project must be on the [Blaze (pay as you go) plan](https://firebase.google.com/pricing)
197220

198-
- This extension uses other Firebase and Google Cloud Platform services, which have associated charges if you exceed the services no-cost tier:
221+
- This extension uses other Firebase and Google Cloud Platform services, which have associated charges if you exceed the service's no-cost tier:
199222
- Cloud Firestore
200223
- Cloud Functions (Node.js 10+ runtime. [See FAQs](https://firebase.google.com/support/faq#extensions-pricing))
201224

firestore-send-email/README.md

Lines changed: 24 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,29 @@ Add this document to the Firestore mail collection to send categorized emails.
4747

4848
For more details, see the [SendGrid Categories documentation](https://docs.sendgrid.com/ui/sending-email/categories).
4949

50+
#### Firestore-Send-Email: SendGrid Dynamic Templates
51+
52+
When using SendGrid, you can use SendGrid Dynamic Templates to create and send templated emails.
53+
54+
## Example JSON representation of Firestore document for a Dynamic Template:
55+
```json
56+
{
57+
"to": ["[email protected]"],
58+
"sendGrid": {
59+
"templateId": "d-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx", // SendGrid Dynamic Template ID always starts with 'd-'
60+
"dynamicTemplateData": {
61+
"name": "John Doe",
62+
"company": "Example Corp",
63+
"position": "Developer"
64+
}
65+
}
66+
}
67+
```
68+
69+
Add this document to the Firestore mail collection to send an email using a SendGrid Dynamic Template. The `templateId` is required and should be your SendGrid Dynamic Template ID (always starts with 'd-'). The `dynamicTemplateData` object contains the variables that will be used in your template.
70+
71+
For more details, see the [SendGrid Dynamic Templates documentation](https://docs.sendgrid.com/ui/sending-email/how-to-send-an-email-with-dynamic-templates).
72+
5073
#### Setting Up OAuth2 Authentication
5174

5275
This section will help you set up OAuth2 authentication for the extension, using GCP (Gmail) as an example.
@@ -203,7 +226,7 @@ Detailed instructions for creating a TTL field can be found in the [Firestore TT
203226
#### Billing
204227
To install an extension, your project must be on the [Blaze (pay as you go) plan](https://firebase.google.com/pricing)
205228

206-
- This extension uses other Firebase and Google Cloud Platform services, which have associated charges if you exceed the services no-cost tier:
229+
- This extension uses other Firebase and Google Cloud Platform services, which have associated charges if you exceed the service's no-cost tier:
207230
- Cloud Firestore
208231
- Cloud Functions (Node.js 10+ runtime. [See FAQs](https://firebase.google.com/support/faq#extensions-pricing))
209232

firestore-send-email/extension.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
# limitations under the License.
1414

1515
name: firestore-send-email
16-
version: 0.2.1
16+
version: 0.2.2
1717
specVersion: v1beta
1818

1919
displayName: Trigger Email from Firestore

0 commit comments

Comments
 (0)