Twilio Sendgrid Email Settings

by twilio8aba46fb65dcNo licenseListed Oct 8, 2026Updated Oct 8, 2026

Configure SendGrid dynamic templates (Handlebars), tracking settings (opens, clicks, subscriptions), link branding for custom tracking domains, and content types (HTML, plain text, AMP). Use when customizing SendGrid email content, tracking behavior, or branded links. Requires a SendGrid API key (SG.-prefix) — not applicable to the Twilio Email API (comms.twilio.com).

Instructions only

Overview

SendGrid email settings control how your messages are constructed, personalized, and tracked. Most configuration happens in the SendGrid Console, but templates and tracking can also be managed via API.


Dynamic Templates

Templates use Handlebars syntax and are managed in Console > Email API > Dynamic Templates. Template IDs start with d-.

Supported Handlebars helpers:

HelperUseExample
if / unlessConditional{{#if premium}}Welcome back!{{/if}}
eachIteration{{#each items}}{{this.name}}{{/each}}
equals / notEqualsComparison{{#equals status "active"}}...{{/equals}}
and / orBoolean logic{{#and premium verified}}...{{/and}}
greaterThan / lessThanNumeric{{#greaterThan count 5}}...{{/greaterThan}}
lengthArray/string{{length items}}
formatDateDate format{{formatDate date "MM/DD/YYYY"}}
insertModule insert{{insert "module_name"}}

NOT supported: Custom helpers, inline partials, lookup, log, with, blockHelperMissing. SendGrid implements a subset of Handlebars.js.

Template Versions

  • Dynamic templates (IDs starting with d-): Support Handlebars
  • Legacy transactional templates: Use -substitution- syntax — not interchangeable with Handlebars

Tracking Settings

SettingWhat it doesCaveat
Open trackingInserts a tracking pixelUnreliable: Apple Mail Privacy Protection inflates opens; image-blocking clients produce false negatives
Click trackingRewrites URLs through SendGrid's redirectCan trigger spam filters on some domains
Subscription trackingAdds unsubscribe footerRequired for CAN-SPAM compliance
Google AnalyticsAdds UTM parametersOnly for marketing campaigns

Configure per-message or account-wide in Console > Settings > Tracking.


Link Branding (Custom Tracking Domains)

By default, click-tracked links route through url####.ct.sendgrid.net. Link Branding lets you use your own domain (e.g., links.yourdomain.com) instead, which improves deliverability and builds trust.

Setup: Console > Settings > Sender Authentication > Link Branding

Requires a CNAME DNS record pointing your subdomain to sendgrid.net. Validate via API: GET /v3/whitelabel/links/{id}/validate


Content Type Priority

When sending multiple content types, email clients display in this priority:

  1. text/x-amp-html (AMP — only in supporting clients, requires sender registration)
  2. text/html (standard — most clients)
  3. text/plain (fallback)

Always include at least text/plain and text/html.


CANNOT

  • Cannot use custom Handlebars helpers — Only the built-in set listed above.
  • Cannot guarantee open tracking accuracy — Pixel-based tracking is fundamentally unreliable. Do not use for business-critical logic.
  • Personalizations subject is a plain string override — It bypasses the template subject. To use dynamic subjects, set Handlebars variables (e.g., {{{subject}}}) in the Dynamic Template's subject field and pass values via dynamic_template_data.
  • Undefined template variables are silent — Missing keys in dynamic_template_data render as empty strings with no error.

Next Steps

  • Send email: twilio-sendgrid-email-send
  • Delivery tracking: twilio-sendgrid-webhooks
  • Manage bounces/unsubscribes: twilio-sendgrid-suppressions

Source and attribution

Source:twilio/aiinskills/sendgrid/twilio-sendgrid-email-settingsat commit8aba46f

License: No license

Content belongs to its original authors. SourceWeft indexes it from a public repository.

Report or request removal

More from twilio/ai

Twilio Voice Twiml

twilio

Builds Twilio voice call logic with TwiML, covering core verbs, SDK generation, and an IVR example.

Software DevelopmentOct 8, 2026

Twilio Isv Sms Best Practices

twilio

Guidance for ISVs building multi-tenant Twilio SMS features, covering A2P and toll-free onboarding, subaccounts and pitfalls.

Software DevelopmentOct 8, 2026

Twilio Security Compliance Hipaa

twilio

Guides configuring Twilio accounts for HIPAA compliance, covering BAAs, HIPAA project designation, eligible services and per-product rules.

SecurityOct 8, 2026

Twilio Reliability Patterns

twilio

Handle rate limits, retries, and failures when building on Twilio at scale. Covers 429 exponential backoff with jitter, per-number throughput limits, StatusCallback resilience, thin-receiver pattern, and fallback chains. Use this skill whenever sending messages or making calls at volume, or when building production-grade Twilio integrations.

Awaiting classificationOct 8, 2026

Twilio Organizations Setup

twilio

Set up and manage Twilio Organizations for centralized account and user governance. Covers the Organization > Account > Subaccount hierarchy, roles (Owner/Admin/Standard), managed vs independent accounts, domain registration, SSO enforcement, SCIM provisioning, and Organization merging. Use this skill when managing multiple Twilio accounts or users across teams.

Awaiting classificationOct 8, 2026

Twilio Numbers Senders

twilio

Guides choosing Twilio number types and senders before building, covering compliance programs, throughput, and availability.

CommunicationOct 8, 2026