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.
Decide what you want to create: a Single Send message or an Automation series.
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:
- Go to Marketing > Single Sends.
- Decide if you want to create a message or edit an existing message.
- Click Create a Single Send. The Select a Design page appears.
- 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. - Hover over your chosen template and click Select. The Select Your Editing Experience page appears.
- 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.
- 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.
- In the Categories box, add categories in one of two ways:
Warning about categories and personal information
- Click in the Categories box and choose a category from the dropdown menu.
- 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.
- Click Save.
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.
The HTML <head> 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:
- Click the Settings drawer. The Settings panel appears.
- Click Build. The Build panel appears.
- Expand the Advanced menu.
- Click the Edit next to Edit HTML Head. The Edit HTML Head appears.
<head></head>
- Make your desired changes.
- Click Update.
Using the tag to reference a web font hosted on the internet, users add custom fonts like Google Fonts. 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>:
-
Open the HTML Head by navigating to the Build tab in the Design Editor.
-
Scroll down to the Advanced drop-down menu and select Edit HTML Head.
-
Click Edit to begin making your changes.
-
Insert a
<link>tag containing anhrefattribute that points to your web font.<link href="https://fonts.google.com/specimen/Oswald" rel="stylesheet" /> -
To indicate that you want to use the web font, add an HTML
<style>tag with CSS rules:1<style>2body { font-family: 'Oswald', sans-serif; }3</style>
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.
-
Click the Settings drawer. The Settings panel appears.
-
Click Build. The Build panel appears.
-
Expand Global Styles. The style options appear.
-
Click Email Body or Content Container.
Email body stylesContent container stylesEach style option applies to all text or colors within the modules in your message or template.
Style option Method to set value Default value Reset to default Background Color Type a hexadecimal color value or click on the color and choose another from the picker. #FFFFFFClick ⟳. Text Color Type a hexadecimal color value or click on the color and choose another from the picker. #000000Click ⟳. Link Color Type a hexadecimal color value or click on the color and choose another from the picker. #1188E6Click ⟳. Font Family Click the dropdown menu and select from 14 pre-selected typefaces or choose inherit an added webfont. ArialChoose Arial.Font Size Type a different value in the box. Twilio SendGrid sets font size in pixels. 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:
- Click the Settings drawer. The Settings panel appears.
- Click Build. The Build panel appears.
- Click Add Modules. The list of modules appears.
- Find the module tile you want for your email.
- Follow the procedure for the specific module listed.
Adds a module with a columnar layout. Each column can contain one or more image, text, or button modules.
-
Click, drag, and drop the Columns module into your content area. The Columns Module Styles panel appears.
-
In the Select a layout section, choose from eight columnar layouts.
View the columnar layout options -
In the Module section, modify the styling of this module, if desired.
View column style options
Add your custom HTML.
- Click, drag, and drop the Code module into your content area. The Edit Module HTML panel appears.
- Add your HTML code in the box.
- Click Update.
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.
-
Click, drag, and drop the Text module into your content area. The Text Module Styles panel appears.
-
Modify the styling of this module, if desired.
View text style options
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.
To upload an image to your Image Library:
- Click, drag, and drop the Images module into your content area. The Image Library appears with any images you uploaded before.
- 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.
To insert an image into your email template or message:
- Click, drag, and drop the Images module into your content area. The Image Library appears with uploaded images.
- Click the image you want to add to your email. The Image Details panel appears.
- 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.
- Click, drag, and drop the Image & Text module into your content area. The Colums Module Styles panel appears.
- Modify the styling of this module following the Columns module procedure, if desired.
Adds vertical spacing between other modules.
-
Click, drag, and drop the Spacer module into your content area. The Spacer Module Styles panel appears.
-
Modify the styling of this module, if desired.
View spacer module style options
Adds horizontal line between modules.
-
Click, drag, and drop the Divider module into your content area. The Divider Module Styles panel appears.
-
Modify the styling of this module, if desired.
View spacer module style options
Adds your sender metadata and links to the {{{unsubscribe}}} tag. Transactional templates require sender metadata.
-
Click, drag, and drop the Unsubscribe module into your content area. The Unsubscribe Module Styles panel appears.
-
Modify the styling of this module, if desired.
View unsubscribe style options -
To include the mailing address line, toggle Address Line to ON.
-
To include the Unsubscribe Preferences link, toggle Unsubscribe Preferences to ON.
To edit Module HTML:
- Click the module in the email design.
- At the top of the module, click
<>. The Edit Module HTML page displays with the HTML code for that module. - 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.
- To preview your email message or template, click Preview.
- To view the desktop preview, click Desktop.
- To view the mobile preview, click Mobile.
- 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 view a preview with the integrated test data:
-
Open a design in the Design Editor.
-
Click Preview.
-
Click Show Test Data. The test data panel appears.
-
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_namesubstitution tag, the key isfirst_nameand 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.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} -
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.
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.
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.
- All Twilio SendGrid pre-built templates include the
- 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.
- Any HTML elements that contain the attribute
The following examples show the recommended structure and organization of custom HTML code. Twilio represents the content of your modules as [MODULE CONTENT].
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:
- Click the Settings drawer. The Settings panel appears.
- Click Build. The Build panel appears.
- Expand the Advanced menu.
- Expand the option titled Import Drag & Drop HTML.
- Click Import. The Import Drag & Drop HTML page appears. Paste in your HTML in the box.
- Paste or type the HTML code you want to use.
- Click Update.
To export template HTML from the Design Editor:
- Click the Settings drawer. The Settings panel appears.
- Click Build. The Build panel appears.
- Expand the Advanced menu.
- 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.
Social module
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.
Click, drag, and drop the Social module into your content area. The Social Module Styles panel appears.
Modify the styling of this module. This includes adding the appropriate links to your social media pages.