Skip to main content
skill CX Codex GP ChatGPT official · OpenAI

twilio-sendgrid-email-settings — Codex skill for SendGrid setup

Configure SendGrid templates, email tracking, and branded links with this skill. Use it when changing message content or delivery settings.

Install into Codex · Skills CLI (Vercel) All methods and platforms ↓
npx skills add openai/plugins --skill twilio-sendgrid-email-settings -a codex
Open on GitHub

What twilio-sendgrid-email-settings does

This skill covers SendGrid dynamic templates written with Handlebars, message content types, and tracking for opens, clicks, and subscriptions. Templates can be managed in the SendGrid Console; templates and tracking can also be handled through the API. A SendGrid API key beginning with SG- is required.

The guide lists built-in Handlebars helpers and their limits. Custom helpers are unsupported, and missing template variables render as empty strings. Dynamic templates with IDs starting d- use Handlebars; legacy transactional templates use -substitution- syntax instead, and the formats are not interchangeable. Open tracking is unreliable, so it should not drive business-critical logic.

Branded tracking links require a CNAME record pointing your subdomain to sendgrid.net. AMP content appears only in supporting email clients and requires sender registration; include both text/plain and text/html as well. This skill covers SendGrid, not the Twilio Email API.

What it helps with

  • configure a SendGrid dynamic template with Handlebars
  • choose settings for open, click, or subscription tracking
  • point a custom tracking subdomain to SendGrid
  • prepare an email with HTML and plain-text content
  • diagnose a template variable that renders as an empty string

Example prompts for the agent

  • Set up a SendGrid dynamic template with a condition for subscribers whose status is active.
  • Explain how to enable click tracking and what limitations it has.
  • Show me how to brand tracking links with a CNAME for my subdomain.

How to install twilio-sendgrid-email-settings

1Skills CLI (Vercel)

npx skills add openai/plugins --skill twilio-sendgrid-email-settings -a codex

2Manually: put the files in place

.agents/skills/twilio-sendgrid-email-settings/SKILL.md

For all projects use ~/.agents/skills/

Step by step, with commands for each platform: Codex skills: how to install, where they live, how to call them

Questions about twilio-sendgrid-email-settings

How do I install twilio-sendgrid-email-settings in Codex?

Run npx skills add openai/plugins --skill twilio-sendgrid-email-settings -a codex. The skill file is at .agents/skills/twilio-sendgrid-email-settings/SKILL.md.

What does twilio-sendgrid-email-settings do?

It guides SendGrid template, tracking, and link-branding setup. It also explains content formats and the limits of SendGrid's Handlebars support.

What is required to brand SendGrid tracking links?

Add a CNAME record that points your subdomain to sendgrid.net. Configure the branded link in the SendGrid Console under Link Branding.

Source text

SKILL.md · MIT
---
name: twilio-sendgrid-email-settings
description: >
  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).
---

## 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:**

| Helper | Use | Example |
|--------|-----|---------|
| `if` / `unless` | Conditional | `{{#if premium}}Welcome back!{{/if}}` |
| `each` | Iteration | `{{#each items}}{{this.name}}{{/each}}` |
| `equals` / `notEquals` | Comparison | `{{#equals status "active"}}...{{/equals}}` |
| `and` / `or` | Boolean logic | `{{#and premium verified}}...{{/and}}` |
| `greaterThan` / `lessThan` | Numeric | `{{#greaterThan count 5}}...{{/greaterThan}}` |
| `length` | Array/string | `{{length items}}` |
| `formatDate` | Date format | `{{formatDate date "MM/DD/YYYY"}}` |
| `insert` | Module 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

| Setting | What it does | Caveat |
|---------|-------------|--------|
| **Open tracking** | Inserts a tracking pixel | Unreliable: Apple Mail Privacy Protection inflates opens; image-blocking clients produce false negatives |
| **Click tracking** | Rewrites URLs through SendGrid's redirect | Can trigger spam filters on some domains |
| **Subscription tracking** | Adds unsubscribe footer | Required for CAN-SPAM compliance |
| **Google Analytics** | Adds UTM parameters | Only 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`

© Twilio · MIT · openai/plugins

Similar skills

All skills for Backend and APIs →

From the same set528

The whole set →
twilio-sms-send-message This skill helps diagnose Twilio SMS and MMS delivery failures, including error codes, message filtering, and signs of SMS pumping. CX Codex GP ChatGPT ★ 7,604repo stars twilio-isv-sms-best-practices A skill for teams embedding SMS into a SaaS platform where customers message their own end users. Covers A2P 10DLC and toll-free onboarding, subaccounts and billing. CX Codex GP ChatGPT ★ 7,604repo stars twilio-sendgrid-suppressions This skill helps investigate SendGrid suppressions and manage category-based unsubscribes. Use it when diagnosing delivery problems or building unsubscribe flows. CX Codex GP ChatGPT ★ 7,604repo stars twilio-sendgrid-inbound-parse A skill that walks your agent through SendGrid Inbound Parse: MX records, parsed vs raw mode, attachments and the usual pitfalls. CX Codex GP ChatGPT ★ 7,604repo stars twilio-sendgrid-email-send A skill that shows the agent how to send mail through the SendGrid v3 Mail Send API: single sends, batch sends with templates, scheduled sends and attachments. Requires an SG-prefixed API key. CX Codex GP ChatGPT ★ 7,604repo stars twilio-sendgrid-account-setup Prepares SendGrid for email delivery with API keys, sender checks, domain authentication, and SDK setup. Use it before other SendGrid skills. CX Codex GP ChatGPT ★ 7,604repo stars twilio-security-compliance-hipaa This skill walks through preparing Twilio for HIPAA workflows, from BAA and project designation to product-specific limits. Use it when building healthcare features that handle PHI. CX Codex GP ChatGPT ★ 7,604repo stars twilio-security-api-auth Walks you through Twilio's four auth methods and helps you wire up the right one before shipping API calls to production. CX Codex GP ChatGPT ★ 7,604repo stars

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor