> ## Documentation Index
> Fetch the complete documentation index at: https://docs.brew.new/llms.txt
> Use this file to discover all available pages before exploring further.

# Twilio SendGrid

> Export email templates directly to SendGrid as dynamic templates

Connect your Twilio SendGrid account to export email templates created in Brew directly to your SendGrid Design Library. No manual copy-pasting, just design in Brew and export to SendGrid in one click.

<Frame>
  <img src="https://mintcdn.com/brew-796f053a/PUK-uvvrJtpQ2VX2/images/integrations/SendGrid_OG.png?fit=max&auto=format&n=PUK-uvvrJtpQ2VX2&q=85&s=ca80b04d4d519031a00a57604a7a897e" alt="SendGrid Integration" className="w-full rounded-xl" width="1024" height="571" data-path="images/integrations/SendGrid_OG.png" />
</Frame>

## Setup

<Steps>
  <Step title="Open the SendGrid integration in Brew">
    In Brew, go to **Integrations** and click the **SendGrid** card.
  </Step>

  <Step title="Go to API Keys in SendGrid">
    In SendGrid, go to **Settings → API Keys** in the left sidebar.
  </Step>

  <Step title="Create an API Key">
    Click **Create API Key**, give it a name (e.g. "Brew"), select **Full Access**, and click **Create & View**. Copy the API key right away.

    <Warning>
      SendGrid only shows the API key once. Make sure to copy it before closing the dialog.
    </Warning>
  </Step>

  <Step title="Paste the API Key in Brew">
    Go back to Brew, paste the API key, and click **Connect**.
  </Step>
</Steps>

That's it. SendGrid is now connected to Brew.

## Exporting 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 and click **Export**

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

## What to Expect after Exporting

Exported templates land in SendGrid's Code Editor, which is how SendGrid handles custom HTML templates. SendGrid's Design Editor (drag-and-drop blocks) and Code Editor are separate modes and not interchangeable, so HTML-based templates from Brew will always open in the Code Editor.

Within the Code Editor, clicking any element in the template preview jumps directly to its corresponding HTML code, making it straightforward to locate and update specific sections.

To send a test email, go to the **Settings** section within the Code Editor and use the **Test Your Email** option.

## Requirements

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

<Snippet file="need-help.mdx" />
