[READ] Step 1: Are you in the right place?
Issues filed here should be about a feature request for a specific extension in this repository. To file a feature request that affects multiple extensions or the Firebase Extensions platform, please reach out to
Firebase support directly.
[REQUIRED] Step 2: Extension name
firestore-send-email
What feature would you like to see?
Add support for passing SendGrid's asm object to the SendGrid API, specifically asm.group_id and optionally asm.groups_to_display.
Currently, the sendGrid field in the Firestore document only exposes templateId, dynamicTemplateData, mailSettings, customArgs, ipPoolName, and categories. There is no way to pass asm through — the Zod validation schema strips unknown keys and the field mapping in index.ts only picks known properties explicitly.
The feature would require:
- Adding
asm to sendGridSchema in validation.ts
- Adding
asm to the ExtendedSendMailOptions interface in types.ts
- Mapping
payload.sendGrid?.asm in index.ts
- Adding
asm to MailSource / SendGridMessage in nodemailer-sendgrid/types.ts and handling it in the transport
How would you use it?
When sending transactional emails via SendGrid dynamic templates, we need to associate each email with a SendGrid unsubscribe group so that recipients can manage their preferences and one-click unsubscribe links work correctly. This is required for CAN-SPAM / GDPR compliance in many production setups.
The Firestore document would look like:
{
"to": ["user@example.com"],
"sendGrid": {
"templateId": "d-xxxxxxxxxxxx",
"dynamicTemplateData": { "name": "Jane" },
"asm": {
"group_id": 12345,
"groups_to_display": [12345, 67890]
}
}
}
[READ] Step 1: Are you in the right place?
Issues filed here should be about a feature request for a specific extension in this repository. To file a feature request that affects multiple extensions or the Firebase Extensions platform, please reach out to
Firebase support directly.
[REQUIRED] Step 2: Extension name
firestore-send-email
What feature would you like to see?
Add support for passing SendGrid's asm object to the SendGrid API, specifically
asm.group_idand optionallyasm.groups_to_display.Currently, the
sendGridfield in the Firestore document only exposestemplateId,dynamicTemplateData,mailSettings,customArgs,ipPoolName, andcategories. There is no way to passasmthrough — the Zod validation schema strips unknown keys and the field mapping inindex.tsonly picks known properties explicitly.The feature would require:
asmtosendGridSchemainvalidation.tsasmto theExtendedSendMailOptionsinterface intypes.tspayload.sendGrid?.asminindex.tsasmtoMailSource/SendGridMessageinnodemailer-sendgrid/types.tsand handling it in the transportHow would you use it?
When sending transactional emails via SendGrid dynamic templates, we need to associate each email with a SendGrid unsubscribe group so that recipients can manage their preferences and one-click unsubscribe links work correctly. This is required for CAN-SPAM / GDPR compliance in many production setups.
The Firestore document would look like:
{ "to": ["user@example.com"], "sendGrid": { "templateId": "d-xxxxxxxxxxxx", "dynamicTemplateData": { "name": "Jane" }, "asm": { "group_id": 12345, "groups_to_display": [12345, 67890] } } }