AI email templates for Klaviyo, from your own site
Hand an AI email designer for Klaviyo your link, your photos and your colors, and get back a finished email you can import, test and send.
You can get AI email templates for Klaviyo two ways. Klaviyo's own AI works inside Klaviyo, and its MCP server can build editable drag-and-drop templates from Claude or ChatGPT. Margarita, a free and open-source skill, runs in your own agent and hands back finished HTML, a Klaviyo import zip, subjects A and B, and a notes file, with every fact taken from your site.
Pick Klaviyo's route if your team edits by dragging blocks and your plan includes it. Pick Margarita if you want to build a Klaviyo email from your website in your brand's look, already checked for dark mode and Outlook, and ready to import. This guide covers both, then gives you what to hand over, how facts are sourced, the exact prompt and the import steps.
Klaviyo's tools give you a template your team keeps editing inside Klaviyo. Margarita gives you a finished, checked email as files. Both start from your website. Neither should be sent before you read every price against the live store.
01AI email templates for Klaviyo: the two routes
Klaviyo has added AI in two places, and both are worth knowing before you install anything.
Marketing Agent. Klaviyo's email templates page says its agent learns your brand by analyzing your website's images, colors and copy, creates drafts you review, and never sends anything without your approval.
MCP drag-and-drop tools. Klaviyo's blog says the template tools in its MCP server build and edit fully editable templates from Claude or ChatGPT, with no HTML to write. The output is a native Klaviyo template that syncs to your Template Library. The post lists them for Enterprise, Commercial and internal Klaviyo users.
A skill in your own agent. It runs in Claude, Claude Code or Google Antigravity, reads your site, and returns a finished email as files: email.html, a preview, an import zip, subjects A and B, preview text and notes on anything it inferred.
One older option is gone. Some guides still describe a Klaviyo tool that drafted campaign emails from a text description. Klaviyo's help center article for that tool now says Email AI template drafting is no longer available, and tells you to pick a template and edit it in the editor instead. If an older tutorial sends you looking for that button, that is why you cannot find it.
02When each one fits
- Klaviyo's MCP tools when your team edits emails by dragging blocks, you are on a plan that has them, and you want the template to live as a native Klaviyo template from day one.
- Klaviyo's Marketing Agent when you want drafts generated and reviewed inside Klaviyo, and you are fine editing them there.
- Margarita when you want a finished email in a look you choose, built and checked before it ever reaches Klaviyo.
- Margarita when you need to see where each fact came from. It logs the source of every product, price and offer.
- Margarita when you work in Claude Code or Antigravity already and want the email files next to the rest of your work.
The trade-off to know: Klaviyo's blog stresses that its MCP output is a native template, not a code block. Margarita's zip is the code route. Once imported, it is an HTML template, so later changes mean editing HTML or asking your agent for a new version and importing again. If drag-and-drop editing after launch matters more to your team than the finished look, start with Klaviyo's tools.
03What to give it and what comes back
Margarita needs very little. A link or a photo folder is enough to start. It only stops to ask when it has neither and no brief names the brand.
Brand link. Your homepage or a product page. It reads the site and saves each page it used as evidence.
Photo folder. Optional. Without one it uses the site's own images. With no images at all, it builds a text-led email.
Hex colors. Recommended. Without them it takes the colors your site uses and marks them as inferred. It never invents colors, and a palette that fails 4.5:1 contrast stops the build.
Campaign type and audience. Optional, and worth adding. A launch for repeat buyers reads differently from one for new subscribers.
What comes back for each email:
email.html: the template, with table layout, inline styles, an Outlook-safe button, dark-mode CSS and correct Klaviyo tags.preview.html: the same email with sample values in place of the tags, for review.klaviyo-import.zip: the HTML plus its images, ready for Klaviyo's template import.email.md: subjects A and B, preview text, the copy by block, alt text and the source of every fact.notes.md: the brand profile, everything it inferred, compliance flags, check results and an import checklist.- Screenshots at desktop and phone widths, with images off and in dark mode.
It chooses from 13 visual styles and 31 blocks, matched to your niche (56 are mapped). It also builds welcome, abandoned checkout, browse, post-purchase and winback flows, plus 8 popup designs. If you cannot decide on a look, ask it to show two styles first.
04How facts are sourced
This is the part that matters most for a store. A wrong price or an invented review in a sent email turns into refund requests and support tickets.
Margarita treats your site and your message as the only sources. Products, prices, offers, codes, deadlines, reviews and policies come from the link, the assets or the brief, word for word. If a fact is missing, the line or block that needed it is dropped. A review block with no real review on the site does not ship. A countdown with no deadline in your brief does not ship. The notes then tell you what was left out, so you can add the fact and rebuild.
Things it has to judge, such as your voice or which color plays which role, are marked as inferred in notes.md. Treat that list as your review queue.
You can run this method with any agent. Give it the same inputs and paste the rules from the prompt below. What you lose is enforcement: Margarita's build and linter block delivery when a tag, color or fact check fails, while a plain chat relies on you to catch it. The Margarita Email Designer docs list every rule if you want to copy them into your own prompt.
05The prompt
Install it once with one line: npx skills add yenderfonseca/. That links it into every agent it finds on your machine. For Claude.ai or the desktop app, turn on code execution, download the zip from the Margarita page and upload it under Customize, then Skills. The code is on GitHub under the MIT license.
Use /margarita. Make a [CAMPAIGN TYPE, FOR EXAMPLE LAUNCH] email for [BRAND URL]. Photos are in [FOLDER]. Colors: [HEX, HEX, HEX]. Audience: [WHO GETS IT].
If you are unsure which look fits, show me two styles first.
Every product, price, offer, and review must come from the site or from this message. If something is missing, leave that block out and tell me.
Deliver email.html, the import zip, subjects A and B, preview text, and notes on anything you inferred.
Why each line is there. The style line saves a rebuild when two looks could both work. The facts line restates the rule, so gaps get reported out loud instead of quietly filled. The delivery line names the files, so nothing comes back half done. If you have an offer or a code, add it to the first paragraph exactly as it should appear.
06How to import the zip into Klaviyo
- In Klaviyo, go to Content, then Templates, open the Email: saved tab and choose Create, then Import email template. Name it as in
email.md. - Upload
email.html, and addklaviyo-import.zipunder the option for additional files used in the template. Klaviyo's help center says it copies the zipped images to its CDN and updates the references, as long as each path matches the HTML. - Set the subject and preview text in the campaign or flow message, since they live outside the template. Paste subjects A and B into an A/B test.
- Create any coupon the email references, with the exact name shown in
email.md. - Preview with a real profile and confirm no
{{or{%shows up as literal text.
07How to check the output
- Read every price, product name and claim against the live site. Start with the inferred list in
notes.md. - Open
preview.htmlon your phone and in dark mode. Look for text that disappears, a logo that vanishes and buttons that are hard to tap. - Set your organization name and postal address in Klaviyo's account settings. The footer reads both from there.
- Send a test to a Gmail inbox and an Outlook inbox. Outlook renders HTML its own way, so check the button and the spacing there.
For a full pre-send pass, use the email QA checklist. This designer is workflow 3 of 6 in Claude for email marketing, and if you are building a sequence, the welcome flow guide comes first.
08Quick answers
Does Klaviyo have its own AI email template builder?
Yes. Klaviyo's Marketing Agent drafts emails that you approve, and the drag-and-drop tools in Klaviyo's MCP server build editable templates from Claude or ChatGPT. Klaviyo's blog lists the MCP tools for Enterprise, Commercial and internal users.
Is Margarita free?
Yes. It is open source under the MIT license, with the code on GitHub. You only need a Klaviyo account to send.
Can I edit a Margarita email in Klaviyo's drag-and-drop editor?
The zip imports as an HTML template, so you edit it as code. For bigger changes, ask your agent for a new version and import it again.
What happens if my site does not list a price or a review?
The block that needed it is left out, and the notes tell you what was dropped. Add the fact to your prompt and rebuild.
Which agents does Margarita run in?
Claude.ai and the Claude desktop app, Claude Code and Google Antigravity, plus other agents that read SKILL.md skills.