Importing an HTML email design
Bring an email you designed somewhere else into Swapt as editable blocks, with its images, promo codes and review buttons.
Already have an email designed in another tool, by a designer, or by an AI assistant? You don't have to rebuild it. Import HTML turns the design into normal Swapt email blocks you can edit, test and send.
Before you start
You need your email as an HTML file, or its HTML copied to your clipboard. If the images sit next to the file in a folder (for example images/hero.png), put them all in one .zip file too.
| Limit | Size |
|---|---|
| The HTML | 200 KB |
| The images .zip | 15 MB |
| Any one image | 10 MB |
Importing replaces everything in the email. If the email already has content, Swapt asks Replace email content? first. Start from a new email if you want to keep the old one.
Import your design
Open an email from the Email page, or add a Send Email step in a flow and open its email.
Click Import HTML at the top of the editor. The Import HTML email design window opens.
Add your HTML. Either paste it into the box, or click Choose .html file and pick the file.
If your images are on your computer rather than online, click Add images (.zip) and pick your zip. You can also skip the HTML step and put the .html file inside the zip, as long as it's the only one.
Click Import design. You'll see Uploading images… and then Importing… while Swapt works.
Check the result. Every section is now a regular block, so click any heading, image or button to change it. Then click Send test to see it in a real inbox.
How images are handled
When you add a zip, Swapt matches each image in your HTML to a file in the zip by its file name. It uploads the matches to your Media library and links them in the email, so they show up for every reader.
After the import, a message tells you what happened:
- Not found in the zip, left as local paths — the HTML uses an image that isn't in the zip. That image won't show in the email. Add it to the zip and import again.
- More than one file matches, use the folder path to pick one — two files in the zip share a name. Give them different names, or make the HTML use the full folder path.
- In the zip but not used by the HTML, so not uploaded — extra files are skipped. Nothing to fix.
- Not uploaded — a file couldn't be used, with the reason next to it.
Images that already have a full web address starting with https:// work without a zip. If you import HTML with local image paths and no zip, Swapt warns you that those images won't show.
Add Swapt blocks with tags
You can mark where Swapt's own blocks should go by typing a tag in your HTML. On import, each tag becomes the real Swapt block, with live data for each customer.
| Tag | Becomes |
|---|---|
{{promos}} | The promotion block, showing each customer their own promo code. |
{{product-review-button}} | The product review block: your campaign product with a review button. |
{{carousel}} | A product grid. Pick the products in the editor after import. |
{{form}} | A call-to-action button, since emails can't hold a real form. After import, link it to the landing page with your form. |
A few rules make tags work:
- Type each tag exactly as shown, on its own line.
- Put it straight in the body of the email, not inside a table or box.
- Don't style the tag. The Swapt block brings its own look.
When your HTML includes tags, Swapt keeps your design between the tags exactly as you wrote it. Without tags, Swapt rebuilds the whole design from its own email blocks using AI.
You can also personalize text with {customer.firstName}, {customer.lastName}, {customer.email} and {current_year}. Note these use single braces.
Using an AI assistant to make the HTML
If you're asking Claude, ChatGPT or another AI tool to design your email, click Copy instructions for AI agents in the import window. Paste them into your AI chat before you describe the email. They tell the assistant exactly how to build HTML that imports cleanly, including the tags above.
Warnings after import
Swapt checks your design for things that look fine in a browser but break in inboxes like Gmail and Outlook. If it finds any, you'll see This HTML may not display well in every inbox, followed by what to fix. Common ones:
- Images with http:// instead of https:// — many inboxes block them. Use https links.
- Images with no alt text — readers who block images see nothing in their place.
- Emails over 102 KB — Gmail cuts the email off and hides the rest.
- Flex or grid layouts, external stylesheets, video or form fields — these don't work in most inboxes.
The last two only apply when you used tags, because Swapt keeps your own code in that case.
Troubleshooting
This doesn't look like HTML
You pasted plain text, a link, or something other than an email's code. Paste the full HTML document. It usually starts with <!DOCTYPE html> or <html>.
HTML is too large (max 200 KB)
Simplify the design, or split it into sections and import them one at a time. Inline images (very long codes inside the HTML) are a common cause. Use a zip of image files instead.
The upload is too large
The zip is over 15 MB. Compress the images or leave out ones the email doesn't use.
The import timed out
Try a shorter design, or split it into sections and import them one at a time.
A tag shows up as text in the email
Check the spelling and make sure the tag sits on its own line in the body, not inside a table, box, or style block.
Related
- Email — the email editor and its blocks
- Library — where uploaded images are stored
- Promotions — set up the codes the
{{promos}}block shows
Using Attentive with Swapt
Subscribe the customers you capture with Swapt to your Attentive SMS and email marketing, and send an event that triggers an Attentive journey.
Designing QR codes that get scanned
Pick the right kind of code, decide who prints it, and design stickers that scan on a real shelf, not just on your monitor.