Skip to main content
Connect your Twilio SendGrid account to export email templates created in Brew directly to your SendGrid Design Library.
Moving your whole account off SendGrid instead? See Migrate from SendGrid to Brew.
SendGrid Integration

Connect

1

Open the SendGrid integration in Brew

In Brew, go to Integrations and click the SendGrid card.
2

Go to API Keys in SendGrid

In SendGrid, go to Settings → API Keys in the left sidebar.
3

Create an API Key

Click Create API Key, give it a name (for example “Brew”), select Full Access, and click Create & View. Copy the API key right away.
SendGrid only shows the API key once. Make sure to copy it before closing the dialog.
4

Paste the API Key in Brew

Go back to Brew, paste the API key, and click Connect.
That’s it. SendGrid is now connected to Brew.

Export a Template

Once connected, you can export any email to SendGrid:
  1. Open an email you’ve created in Brew
  2. Click Send
  3. Choose to export the template to SendGrid
  4. Give it a name, check the subject line, and click Export

Where It Lands

The template appears in SendGrid under Email API → Dynamic Templates in the Design Library, ready to use.

Editing and Re-exporting

Exported templates open in SendGrid’s Code Editor, which is how SendGrid handles custom HTML templates. The drag-and-drop Design Editor is a separate mode, so a Brew template always opens in the Code Editor. In the Code Editor, clicking any element in the preview jumps to its HTML. That makes specific sections easy to find and update. To send a test email, open Settings in the Code Editor and use Test Your Email. A dynamic template renders only the dynamic_template_data you send with the message. Brew keeps each field’s name, so send the same keys: Inside an HTML attribute, where those quotes would break the markup, the fallback becomes {{#if firstName}}{{firstName}}{{else}}there{{/if}}. The to address doesn’t fill {{ email }}; include email in the template data if the template uses it. Marketing Campaigns contact fields such as first_name are a separate source and don’t fill dynamic template tags. The unsubscribe link becomes <%asm_group_unsubscribe_raw_url%>, the bare group-unsubscribe URL. SendGrid fills it only when the send names an unsubscribe group (asm.group_id). SendGrid reference: dynamic templates, Handlebars and group unsubscribes.

From an Agent or Code

From an agent, export_email over MCP exports a design to SendGrid. From code, send POST /v1/emails/{emailId}/export with "provider": "sendgrid". Connect SendGrid in the app first. Export is free. Pass dryRun: true to check the design and the connection without creating a template. A dry run doesn’t test whether Twilio SendGrid accepts the template: only a real export does. The template takes the email’s title unless you pass templateName (up to 100 characters), and the response returns its templateId. If an export fails, the error says why:

Requirements

  • A Twilio SendGrid account
  • An API key with Full Access

Need Help?

Our team is ready to support you at every step of your journey with Brew. Choose the option that works best for you:

Search Documentation

Type in the “Ask any question” search bar at the top left to instantly find relevant documentation pages.

Ask ChatGPT or Claude

Click here to open the Copy page menu at the top of this page, then send the page to ChatGPT, Claude, or your editor.