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

Choose an email editor


The Twilio SendGrid email design experience seeks to support your unique workflow. To design and edit your email messages, Twilio provides two distinct editing experiences.


Choose from code or visual editing options

choose-from-code-or-visual-editing-options page anchor

Both editors provide similar features and results. The choice lies in how you like to work. The following sections describe each editor and their shared functionalities.

If you want to import, create, or edit custom HTML code, use the code editor. This editor includes a rendered preview in a split screen with synchronized scrolling. It also highlights code syntax and flag any errors in the code. This editor doesn't add excess code or modify your code.

If you want what you see is what you get (WYSIWYG) editing, use the design editor. This editor includes a library of pre-packaged blocks of content called modules. You can drag and drop these modules into your email message. To customize the content, you can edit the HTML.

(warning)

Open an email message in one browser window only

Open only one instance of a template or email message in an editor at a time. Multiple instances in different browsers or computers results in autosave conflicts. You can't roll back changes in the editors.


Features common to both editors

features-common-to-both-editors page anchor

Both the code and design editors share the following common features.

Add dynamic data with Handlebars syntax

add-dynamic-data-with-handlebars-syntax page anchor

Both editors support dynamic data using Handlebars syntax. Dynamic data includes any content that personalizes a design. This can include a customer's name or order confirmation number. To ensure your dynamic values behave the way you expect, you can use test data and view the result in the editor's preview pane.

Beyond value substitution, use the Handlebars syntax in your designs to format dates, iterate over lists, and conditionally render values. To learn more about Handlebars in the Twilio editors, see the Handlebars documentation.

Create value placeholders with substitution tags

create-value-placeholders-with-substitution-tags page anchor

To generate unique content for each recipient of your email message, include substitution tags. This can include any reserved or custom field data.

As an example, you can add a recipient's first name to the body or subject line of your email.

The data that displays where you place your substitution tags come contact data. To learn how to manage this data, see the Marketing Campaigns Contacts(link takes you to an external page).

In addition to the following reserved fields that are available on all contacts by default, you can add your own Custom Fields(link takes you to an external page) with Marketing Campaigns. When building Marketing Campaigns designs, find your Custom Fields in the Tags tab of the editors.

To learn more about managing these fields, see Custom Fields.

(information)

Set default data values

For contacts with no entry in a custom field, the substitution tag appears blank. To set a default value for a tag, use the following syntax:

{{insert first_name "default=Valued Customer"}}

Reserved substitution tags

reserved-substitution-tags page anchor

Twilio SendGrid provides the following default substitution tags. The related data exists in each of your contacts.

To see how to work with substitution tags, see the related section in the code editor and design editor guides.

Populate message with test data

populate-message-with-test-data page anchor

Both editors provide a data preview feature. This means you can add the reserved and custom fields stored on a contact as well as any other variables you wish to pass into your template, such as order confirmation data. Test data provides a way to be sure that your final design will populate and render the substitutions properly.

If you wanted to collaborate on a design for example, having test data stored directly in the design means each teammate can reference the data structure used to populate substitution tags without having to dig into a code base.

To see how to work with test data, see the related section in the code editor and the design editor guides.

Categorize single send messages

categorize-single-send-messages page anchor

To track emails based on topics you choose, assign categories to your single send message. Each single send supports only 10 categories. With categories, you can track statistics across similar Single Sends and Automations.

For example: Your emails might fall into two broad topics: newsletters and announcements. To track these topics across multiple email messsages, add categories like Weekly Digest or Product Announcements.

To learn how to add categories, see the code editor and design editor guides.

Undo and redo functionality

undo-and-redo-functionality page anchor

Both editors provide undo and redo functionality using the undo and redo buttons in the the editor or keyboard shortcuts.

(information)

Undo and redo keyboard shortcuts

  • Undo : Command or Control + Z
  • Redo : Command or Control + Shift + Z