How to Create Email Templates in HTML for Mail Merge
The HTML editor sends an email you wrote in HTML code. You get full control of the design, with columns, buttons, brand colors and images. Use the HTML editor for newsletters. You can code the HTML by hand, export it from an email builder, or ask an AI tool like Claude or ChatGPT to write it.
Design the Email
Section titled “Design the Email”You can design the email in any tool that gives you HTML:
- An email builder. React Email, MJML, Mailchimp, and most other builders can export a design as HTML. The option may be called Export as HTML, Download HTML or View HTML.
- Code by hand. Write the HTML in your code editor. Use tables for the layout and put the CSS in each tag’s
styleattribute, because email apps don’t support much of modern CSS. - ChatGPT, Claude or Gemini. Ask the AI to write the email in HTML, then paste the HTML into the HTML editor. Design HTML emails with AI has a prompt you can copy.
Type merge fields straight into the design, like {{First Name}}, and they go through to the HTML.

Fix the Styles for Gmail
Section titled “Fix the Styles for Gmail”Gmail and some other email apps can ignore the styles at the top of your HTML, so the email arrives without its colors and fonts. A free tool called Juice fixes the problem by copying each style onto the text it applies to.
- Open Juice and paste your HTML.
- Copy the HTML that Juice gives back, and use that HTML in Mail Merge.
You can skip Juice for MJML designs and for emails made with the AI prompt. Both already put the styles in the right place.
Paste the HTML into Mail Merge
Section titled “Paste the HTML into Mail Merge”-
Go to Extensions > Mail Merge with Attachments > Open Mail Merge and move to the Template step.
-
Under Editor, choose HTML Editor.
-
Type the Subject, and optionally the Preview text.
-
Paste the HTML into the Message box.

Choose HTML Editor and paste the whole HTML into the Message box. -
Click Send Test Email and open the test in Gmail on your computer and your phone. Check the layout, the images and every link.
Add Merge Fields to Links and Images
Section titled “Add Merge Fields to Links and Images”Merge fields work anywhere in the HTML, not only in the text. Say your sheet has an Email Address column and you want each person to get their own RSVP link:
<p style="font-family: Arial, sans-serif; font-size: 16px"> Hi {{First Name}},</p><a href="https://example.com/rsvp?email={{Email Address}}" style="display: inline-block; padding: 12px 24px; background: #2f5d50; color: #ffffff; border-radius: 6px; text-decoration: none"> Save my seat</a>The same works for pictures. <img src="{{Photo URL}}"> shows each person the image from their row. The unique images guide covers pictures on the web and in Google Drive.
Embed markers work in HTML too. Type a marker between your tags, where the result should go. Mail Merge replaces the marker with the finished HTML:
<td align="center" style="padding: 24px"> {{Embed QR Code, {{Ticket ID}}, width=200}}</td><td style="padding: 24px"> {{Embed Range, 1AbC…789, address=Schedule!A1:C8}}</td>Don’t put an Embed marker inside an attribute, like src or href. A marker adds a whole tag, not an address.
Things to Know
Section titled “Things to Know”- Email clients do not support JavaScript, forms, iframes, video and audio, so leave them out of your HTML template.
- Images need a public
https://address. A picture on your computer or behind a login won’t show in the email. - Gmail cuts off emails larger than 102 KB and hides the rest behind a “View entire message” link. Builders often add a lot of extra code, so turn on their Minify option if there is one.
- The HTML editor doesn’t add your Gmail signature. Put your signature in the HTML, or use a Gmail draft instead.
- If a merge field doesn’t match a column title, Mail Merge replaces the field with a blank and shows no warning. A test email catches the mistake.
Troubleshooting
Section titled “Troubleshooting”- The email looks plain, without colors or fonts: Gmail ignored the styles at the top of your HTML. Run the HTML through Juice and paste the result again.
- Images show as broken boxes: the image address isn’t public. Open the image address in a private browser window to check.
- A merge field shows up as
{{First Name}}in the email: the builder changed the curly braces into codes like{, or dropped one of them. Retype the field in the Message box, or click the (x) icon and pick the column. A field with a tag inside it, like{{<b>First</b> Name}}, is fine.
