Skip to contentSkip to navigationSkip to topbar
Page toolsOn this page
Looking for more inspiration?Visit the

Use the Design Editor


To build your templates and emails with intuitive, drag-and-drop tools, use the Twilio SendGrid Design Editor. To add content to your email, the visual editing experience features a library of modules.

To use the Design Editor, log in to the Twilio SendGrid console(link takes you to an external page).


Get started

get-started page anchor

Decide what you want to create: a Single Send message or an Automation series.

Single SendsAutomations

For Single Sends, you can choose one of three design options:

  • Use a blank template
  • Start with a custom template that you created
  • Start with a pre-built template from Twilio SendGrid

To use the Design Editor for Single Sends:

  1. Go to Marketing > Single Sends.
  2. Decide if you want to create a message or edit an existing message.
Create messageModify existing messageUse an existing message
  1. Click Create a Single Send. The Select a Design page appears.
  2. Choose from either Your Email Designs or SendGrid Email Designs.
    As you hover over each design, text appears under the design indicating which editor, if any, someone used to create the design. You can choose a different editor, but Twilio recommends the editor displayed.
  3. Hover over your chosen template and click Select. The Select Your Editing Experience page appears.
  4. Click Select in the Design Editor box. The Design Editor page appears with a banner that states Success! You've added a new single send.
  5. Add the metadata for your design.
    • Add a human-readable label for this version in the Version Name box.
    • Add a subject line for your email in the Subject box. As you can set a subject line when sending the email, this value is optional .
    • Add an extended preview of your email in the Preheader box. This is also optional and can be set when you send your email.
  6. In the Categories box, add categories in one of two ways:

    1. Click in the Categories box and choose a category from the dropdown menu.
    2. Click in the Categories box and type the name of a category you want to add.
      • If the category exists, it displays once you type enough characters in its name.
      • If it doesn't exist, it prompts you to add a category with that name.
  7. Click Save.

Add metadata and styling to email messages

add-metadata-and-styling-to-email-messages page anchor

Every email message includes machine-readable information like its title and what styles get applied to its content. With the editor, you can add this information, or metadata, to your email messages.

Edit the HTML <head> tag

edit-the-html-head-tag page anchor

The HTML <head>(link takes you to an external page) element contain any metadata you want in your email message or template.

To define any custom fonts or CSS styles, you can use the <head> element.

To edit the HTML head of your email message or template:

  1. Click the Settings drawer. The Settings panel appears.
  2. Click Build. The Build panel appears.
  3. Expand the Advanced menu.
  4. Click the Edit next to Edit HTML Head. The Edit HTML Head appears.
    <head></head>
  5. Make your desired changes.
  6. Click Update.

Add custom fonts to the HTML <head> section

add-custom-fonts-to-the-html-head-section page anchor

Using the tag to reference a web font(link takes you to an external page) hosted on the internet, users add custom fonts like Google Fonts(link takes you to an external page). Define a web-safe font as a fallback should one of your recipient's clients not support your custom font.

The following popular clients support web fonts:

  • Apple Mail
  • Outlook.com app
  • Outlook 2000
  • Default Android Mail app (not the Android Gmail app)
  • iOS Mail

This list might change. Twilio can't guarantee web font support. Some inbox providers don't support fonts.

To add a custom font using the HTML <head>:

  1. Open the HTML Head by navigating to the Build tab in the Design Editor.

  2. Scroll down to the Advanced drop-down menu and select Edit HTML Head.

  3. Click Edit to begin making your changes.

  4. Insert a <link> tag containing an href attribute that points to your web font.

    <link href="https://fonts.google.com/specimen/Oswald" rel="stylesheet" />
  5. To indicate that you want to use the web font, add an HTML <style> tag with CSS rules:

    1
    <style>
    2
    body { font-family: 'Oswald', sans-serif; }
    3
    </style>

Format email with global styles

format-email-with-global-styles page anchor

To apply styles in your entire email message or template, use global styles. These global styles include attributes such as the background color, text color, or font family.

The email body is the entire area that your email message or template fills inside your recipient's browser or email inbox.

  1. Click the Settings drawer. The Settings panel appears.

  2. Click Build. The Build panel appears.

  3. Expand Global Styles. The style options appear.

  4. Click Email Body or Content Container.

    Email body stylesContent container styles

    Each style option applies to all text or colors within the modules in your message or template.

    Style optionMethod to set valueDefault valueReset to default
    Background ColorType a hexadecimal color value(link takes you to an external page) or click on the color and choose another from the picker.#FFFFFFClick ⟳.
    Text ColorType a hexadecimal color value(link takes you to an external page) or click on the color and choose another from the picker.#000000Click ⟳.
    Link ColorType a hexadecimal color value(link takes you to an external page) or click on the color and choose another from the picker.#1188E6Click ⟳.
    Font FamilyClick the dropdown menu and select from 14 pre-selected typefaces or choose inherit an added webfont(link takes you to an external page).ArialChoose Arial.
    Font SizeType a different value in the box. Twilio SendGrid sets font size in pixels(link takes you to an external page).14pxType 14.

    You can override these values with Text Module Styles.


To speed design or your email messages, use drag-and-drop editing with pre-built content modules. You can edit individual modules in the left sidebar and reorder modules in your email message body. To reorder modules, click the module and drag your mouse to another location in the message body.

To add a drag-and-drop module to your email message:

  1. Click the Settings drawer. The Settings panel appears.
  2. Click Build. The Build panel appears.
  3. Click Add Modules. The list of modules appears.
  4. Find the module tile you want for your email.
  5. Follow the procedure for the specific module listed.

Adds a button linked to a URL.

Adds a module with a columnar layout. Each column can contain one or more image, text, or button modules.

  1. Click, drag, and drop the Columns module into your content area. The Columns Module Styles panel appears.

  2. In the Select a layout section, choose from eight columnar layouts.

  3. In the Module section, modify the styling of this module, if desired.

Add your custom HTML.

  1. Click, drag, and drop the Code module into your content area. The Edit Module HTML panel appears.
  2. Add your HTML code in the box.
  3. Click Update.
(warning)

Twilio SendGrid doesn't check Custom HTML

The Design Editor doesn't modify, lint, or validate any HTML in a code module. Preview your email before sending.

Add text to your email message or template.

  1. Click, drag, and drop the Text module into your content area. The Text Module Styles panel appears.

  2. Modify the styling of this module, if desired.

Add an image to your email message or template. Upload desired images into your Image Library, then select the image from the library for your email.

Upload images to image library

upload-images-to-image-library page anchor

To upload an image to your Image Library:

  1. Click, drag, and drop the Images module into your content area. The Image Library appears with any images you uploaded before.
  2. To upload an image, you have two options:
    • Drag and drop the image you want to use from your files into the Drag and drop your images here box.
    • Click Choose images to upload.

Insert images into email

insert-images-into-email page anchor

To insert an image into your email template or message:

  1. Click, drag, and drop the Images module into your content area. The Image Library appears with uploaded images.
  2. Click the image you want to add to your email. The Image Details panel appears.
  3. Click Insert Image. The Image Details panel closes.

Adds module with two columns.

  • The module uses the same style options as the Columns module
  • Each column can contain either an image or text.
  • When first added, the Twilio SendGrid sets the left column to image and the right column to text.
  • The text column can use any style available to a Text Module.
  1. Click, drag, and drop the Image & Text module into your content area. The Colums Module Styles panel appears.
  2. Modify the styling of this module following the Columns module procedure, if desired.

Adds vertical spacing between other modules.

  1. Click, drag, and drop the Spacer module into your content area. The Spacer Module Styles panel appears.

  2. Modify the styling of this module, if desired.

Adds horizontal line between modules.

  1. Click, drag, and drop the Divider module into your content area. The Divider Module Styles panel appears.

  2. Modify the styling of this module, if desired.

Adds icons that point to up to six social media accounts: Facebook, Instagram, X, Pinterest, LinkedIn, TikTok. You can customize them for your branding and design standards.

  1. Click, drag, and drop the Social module into your content area. The Social Module Styles panel appears.

  2. Modify the styling of this module. This includes adding the appropriate links to your social media pages.

Adds your sender metadata and links to the {{{unsubscribe}}} tag. Transactional templates require sender metadata.

  1. Click, drag, and drop the Unsubscribe module into your content area. The Unsubscribe Module Styles panel appears.

  2. Modify the styling of this module, if desired.

  3. To include the mailing address line, toggle Address Line to ON.

  4. To include the Unsubscribe Preferences link, toggle Unsubscribe Preferences to ON.


To edit Module HTML:

  1. Click the module in the email design.
  2. At the top of the module, click <>. The Edit Module HTML page displays with the HTML code for that module.
  3. When finish editing the HTML, click Update.
    If you add structural HTML code, like <span>, <p>, <table> tags, the Convert to a code module? modal prompt appears.
    • To keep your structual tags, click Confirm.
    • To discard your structual tags, click Cancel.

You can review your email message or template in a preview.

  1. To preview your email message or template, click Preview.
  2. To view the desktop preview, click Desktop.
  3. To view the mobile preview, click Mobile.
  4. To view a plain-text version of your email message or template, click Plain Text.

Previews also display your chosen From name, Subject, and Preheader text.


Twilio SendGrid provides personalization of email messages. To accomplish this, you add substitution tags to your email messages or templates and provide test data to validate the tags.

To add a substitution tag to your email template or message:

  1. Click the Settings drawer. The Settings panel appears.
  2. Click Tags. The Tags panel appears.
  3. Locate the tag you want to add to your email.
  4. Click the copy icon next to that tag.
  5. Paste the tag into the module.

Preview personalization with test data

preview-personalization-with-test-data page anchor

To view a preview with the integrated test data:

  1. Open a design in the Design Editor.

  2. Click Preview.

  3. Click Show Test Data. The test data panel appears.

  4. Insert contact data into the code window.

    • The data uses JavaScript Object Notation (JSON) syntax.
    • JSON structures data as a collection of key-value pairs.
    (information)

    Example of a test data JSON

    If you use the first_name substitution tag, the key is first_name and the value is the customer's name. Think of these keys as variables. Like a variable in algebra, these variables represent a value you don't yet know.

    Example of JSON document for sample data

    example-of-json-document-for-sample-data page anchor
    1
    {
    2
    "first_name": "Tira",
    3
    "last_name": "Misu",
    4
    "email": "recipient@example.com",
    5
    "alternate_emails": "recipient+@example.com",
    6
    "address_line_1": "1234 N. Real Ave.",
    7
    "address_line_2": "Suite 200",
    8
    "city": "Denver",
    9
    "state_province_region": "CO",
    10
    "postal_code": 80202,
    11
    "country": "United States",
    12
    "phone_number": "+15555555555",
    13
    "Sender_Name": "Orders",
    14
    "Sender_Email": "orders@example2.com",
    15
    "Sender_Address": "1234 N. Exist St.",
    16
    "Sender_City": "Portland",
    17
    "Sender_State": "OR",
    18
    "Sender_Zip": 97227,
    19
    "Sender_Country": "United States"
    20
    }
  5. After you save the test data, any substitution tags should display the data in the email preview.


You can write HTML code in the Design Editor.

(warning)

HTML requirements

  • Any imported HTML overwrites all existing content in your email message or template.
  • If you don't include the "modules-container" attribute in your custom HTML, then Twilio SendGrid imports all of your HTML as one text module.
  • To import only a section of HTML, use a code module.
  • Any HTML outside an element with the "modules-container" attribute gets discarded.
  • HTML code only allows supported styling options and attributes.

Conform to HTML requirements

conform-to-html-requirements page anchor

Any HTML code should conform to the HTML that Twilio SendGrid generates in the Design Editor.

  • To identify your HTML as drag-and-drop modules, Twilio requires the role="modules-container" attribute.
    • All Twilio SendGrid pre-built templates include the role="modules-container".
    • Any compatible HTML for your email message or template requires this attribute.
  • To find for any drag-and-drop compatible modules, Twilio SendGrid parses your custom HTML checking:
    • Any HTML elements that contain the attribute role="modules-container".
    • All HTML elements with the attribute role="module" that are descendants of the "modules-container" element.

Examples of compliant HTML custom code

examples-of-compliant-html-custom-code page anchor

The following examples show the recommended structure and organization of custom HTML code. Twilio represents the content of your modules as [MODULE CONTENT].

TextImageImage and TextCodeColumnsButtonDividerSpacerSocial
1
<table class="module" role="module" data-type="text">
2
<tr>
3
<td style="[CSS rules]; background-color: [some color]">
4
[MODULE CONTENT]
5
</td>
6
</tr>
7
</table>

If you don't specify a data type that matches a Twilio SendGrid drag-and-drop modules, Twilio imports your code as a text module.

To import custom HTML:

  1. Click the Settings drawer. The Settings panel appears.
  2. Click Build. The Build panel appears.
  3. Expand the Advanced menu.
  4. Expand the option titled Import Drag & Drop HTML.
  5. Click Import. The Import Drag & Drop HTML page appears. Paste in your HTML in the box.
  6. Paste or type the HTML code you want to use.
  7. Click Update.

To export template HTML from the Design Editor:

  1. Click the Settings drawer. The Settings panel appears.
  2. Click Build. The Build panel appears.
  3. Expand the Advanced menu.
  4. Click Export.
    This starts the raw HTML download of the template, excluding images.

To learn how to import the HTML into a Code Editor, see Import exported HTML.