Supported by
Sponsor logo

August 23, 2026 - Articles

Make AI Better at Your ESP’s Template Language

You can design a complete email in Figma, export it with Email Love, and still have one important job left: adding the code that decides what each subscriber sees.

That code might insert a first name, hide an offer from existing customers, repeat a row for every item in an order, or show different content based on a loyalty tier. Your email platform handles these jobs with its own templating language.

The problem is that every platform has different rules.

Klaviyo, Braze, Iterable, Customer.io, HubSpot, Marketo, Salesforce Marketing Cloud, and other email service providers use languages that often look similar. They are not interchangeable. A line that works in one platform can render as an empty value, prevent a message from sending, or fail only for the customers whose data happens to take a particular path.

Email Love ESP Skills give Claude and ChatGPT specific instructions for these languages. They help your AI assistant write, review, and troubleshoot the code that sits on top of an Email Love design.

You do not need to become a templating-language expert to use them.


What is an ESP templating language?

An ESP templating language is the code inside an email that is replaced or evaluated when the message is sent.

It is what lets you:

  • Insert a subscriber’s name, company, location, or account information.
  • Show an offer only to customers who qualify for it.
  • Display a different message when information is missing.
  • Repeat a product row for every item in a cart or order.
  • Format dates, prices, and other values.
  • Build reusable content that changes for each recipient.

The HTML controls how the email is structured and styled. The templating language controls which data and content appear inside that structure.

That distinction matters for Email Love users. Email Love can turn a Figma design into production email code, but it cannot know your customer data, campaign rules, or the exact variables available in your ESP account. Those rules need to be added before the email is sent.


Why ordinary AI assistance gets this wrong

General AI models have seen a lot of Liquid, Handlebars, Django, and HTML. That makes them useful, but it also creates a specific problem: they can combine features from similar languages and produce code that looks credible but does not exist in your platform.

Klaviyo is a good example. It is often described as using Liquid, but its control-flow syntax comes from the Django template language. Asking a general AI assistant for “Klaviyo Liquid” can produce tags that work in Shopify Liquid but return an error in Klaviyo.

Iterable uses a version of Handlebars, but it does not include every helper found in JavaScript Handlebars examples. Customer.io supports two Liquid engines that can behave differently. Zeta operates two email products with completely different languages: Zeta Marketing Platform uses ZML, while Zeta Engage by Sailthru uses Zephyr.

These are small differences with large consequences.

The ESP Skills project was built around that gap. Its current smoke-test suite contains 41 platform-specific cases. In one recorded run, the model scored about 88 percent with the relevant skill and 41 percent without it. The suite is deliberately small and is not presented as a general benchmark, but the pattern is useful: a general model often knows roughly what the syntax looks like while missing the platform-specific rule that causes a real send to fail.


What installing a skill changes

A skill is a set of specialist instructions that Claude or ChatGPT can load when your question matches a particular task.

An ESP Skill tells the model:

  • Which templating language the platform actually uses.
  • Which tags, filters, helpers, and functions are supported.
  • Which familiar-looking features are not supported.
  • How missing or incorrect data affects a send.
  • Where to look when a template fails.
  • How to place templating code inside an Email Love Figma template.

The skill does not connect to your ESP or send a campaign. It does not have access to your customer records unless you provide sample data. It gives the AI better instructions for working with the code you share.

That makes it useful at several points in the Email Love workflow.


1. Add personalization while the template is still in Figma

Email Love lets you place code blocks inside an email design. This is useful when you want a reusable template to leave Figma with the necessary conditions already in place.

The important detail is placement. An opening condition and its closing block need to sit at compatible levels in the Email Love structure. A condition that opens between sections and closes inside a column can leave the exported table structure unbalanced. It might look fine for one branch and break for another, particularly in Outlook.

An ESP Skill includes Email Love-specific placement guidance, so you can ask for both the code and where it belongs.

Example prompt

I am building this email in Email Love for Klaviyo.

Add a conditional loyalty banner that appears only for Gold members.
Tell me exactly what to put in the opening and closing Code Blocks.
Explain where both blocks should sit in the Figma layer structure.
Keep the two blocks at the same nesting level and do not change the email layout.

You can use the same approach for regional offers, subscription status, customer type, or any other condition supported by the data in your ESP.

The AI can only edit the Figma file directly when the environment has the required Figma tools. Without those tools, it can still give you the code and clear placement instructions.


2. Add templating to any email HTML

You do not have to build the email in Email Love or add the logic in Figma first.

The HTML can come from Email Love, your ESP, another email builder, a developer, or an older campaign. Give the file to Claude or ChatGPT and ask it to add the templating language for your ESP. Email Love users can apply this workflow after export, but an Email Love template is not required.

This works well when the design is already approved and the personalization logic is managed by a CRM or development team. The skill helps with the templating language. It does not automatically fix rendering problems already present in the source HTML.

Be explicit about what the AI is allowed to change. Email HTML contains tables, responsive styles, Outlook-specific code, and other structure that should not be casually rewritten.

Example prompt

This email HTML will be sent through Braze.

Add a first-name greeting with a safe fallback when the name is missing.
Preserve the existing tables, styles, links, responsive code, and Outlook code.
Return the complete HTML and then list only the lines you changed.
Use Braze-supported Liquid and do not invent filters.

For conditional content, describe both the true and false cases.

Example prompt

This email HTML will be used in Braze.

Show the VIP offer only when the customer's loyalty tier is Gold.
When the condition is false, remove the whole offer section without leaving an empty gap.
Do not alter any other content or layout.
Use the existing variable names in the sample data below.

Include a small sample data object with the prompt when you can. Use invented values rather than real customer information.


3. Replace repeated static content with a loop

A static design often includes several copies of the same row to show what the finished email should look like. In production, you may want the ESP to repeat that row based on cart items, order items, recommendations, events, or account records.

An AI assistant can turn the repeated HTML into a loop, but this is one of the easiest places for it to invent an unsupported helper or assume the wrong data shape. The ESP Skill gives it the platform-specific constraints.

Example prompt

This Iterable template contains three hard-coded product rows.

Replace them with one supported Handlebars loop over the customer's cart items.
Preserve the HTML inside the row.
Do not use helpers that Iterable does not support.
Include a safe fallback when the cart is empty.
Then show me the sample data I should use to test one item, three items, and no items.

This workflow is useful for:

  • Abandoned-cart emails.
  • Order and shipping confirmations.
  • Product recommendations.
  • Event or appointment lists.
  • Account summaries.
  • Renewal and subscription emails.

4. Troubleshoot a template that is failing

Sometimes the design is fine and the template still does not work.

The campaign may fail for a subset of customers. A variable may render blank. A loop may produce no rows. A default value may never appear. The ESP may label the message as failed, skipped, or errored rather than bounced.

These problems are difficult because the visible symptom is often several steps away from the faulty line of code.

Give the AI four things:

  1. The platform name.
  2. The smallest relevant section of code.
  3. The error message or delivery status.
  4. Sanitized sample data for a working and failing recipient.

Example prompt

This Customer.io email is being marked Failed for some recipients.

Review the Liquid below using Customer.io's supported syntax and message engine.
Identify the most likely failure.
Explain why it affects only some recipients.
Provide the smallest safe correction.
Separate anything you know from anything I need to verify in my account.

For a template that renders incorrectly rather than failing, include a screenshot and describe what you expected to see. If the issue appears only in Outlook or on mobile, say that at the start.


5. Review the template before a test send

The skill is also useful when nothing appears to be broken.

Ask the AI to perform a focused review of the templating code before you send the campaign. This is more useful than asking whether the entire email “looks right” because it gives the review a defined scope.

Pre-send review prompt

Review this email for [ESP name].

Check every variable, condition, loop, filter, fallback, link, and unsubscribe token.
Flag anything unsupported or likely to fail when data is missing.
Do not rewrite the design or copy.
Separate definite errors from items I need to verify in my ESP account.
Finish with a short test-data checklist for the main branches.

After the review, test at least these cases:

  • Complete customer data.
  • A missing first name or optional property.
  • An empty list.
  • One item and several items in a loop.
  • Each side of every important condition.
  • Long text and unusual characters.
  • The platform’s unsubscribe and preference links.

AI review is a useful check. It is not a replacement for your ESP’s preview, test data, test sends, and final approval process.

Choose the skill for your platform

ESP Skills currently covers ten platforms:

Platform Skill Language
Iterable iterable-handlebars Handlebars
Klaviyo klaviyo-django Django templates
Braze braze-liquid Liquid
Customer.io customerio-liquid Liquid
Salesforce Marketing Cloud sfmc-ampscript AMPscript, GTL, and SSJS
Marketo Engage marketo-velocity Tokens and Velocity
HubSpot hubspot-hubl HubL
MoEngage moengage-jinja Jinja
Sailthru / Zeta Engage sailthru-zephyr Zephyr
Zeta Marketing Platform zeta-zml ZML

Mailchimp merge-tag support is planned.

Install the skill for the platform you use. The skills are deliberately separated so the AI does not apply Klaviyo rules to Braze or confuse ZML with Zephyr.


How to install ESP Skills

The project is free, open source, and currently in beta.

Claude Code

Add the Email Love marketplace, then install the skill for your platform. For Klaviyo, the commands are:

claude plugin marketplace add email-love/esp-skills
claude plugin install klaviyo-django@email-love-esp

Replace klaviyo-django with the skill name from the table above when you use another platform.

Once installed, you do not need to invoke the skill by name. Ask an ordinary question about your ESP template and Claude loads the relevant guidance.

Claude apps and ChatGPT

The same skill files work in Claude and ChatGPT. There is no separate ChatGPT edition.

At the time of writing, the project has not published packaged files through GitHub Releases. To install one now, download the repository, run its build script, and upload the .skill file created for your platform. A technical teammate can do this once and share the file with the team.

In Claude, upload it under Settings, Capabilities, Skills. In ChatGPT, use Skills, Create, Upload from your computer. ChatGPT skill uploads require an eligible business or education plan.

An uploaded skill is a snapshot. When the skill is updated, upload the new file to replace the old version.

Full installation and update instructions are maintained in the ESP Skills repository.


Use the skill as a specialist, not an autopilot

ESP Skills reduces a specific kind of risk: an AI assistant confidently mixing up similar templating languages.

It does not remove the need to understand the campaign rule you are implementing. You still need to know which customers should see each block, which fields are available, what should happen when data is missing, and who approves the send.

The most reliable workflow is straightforward:

  1. Build and review the email design in Figma.
  2. Export it with Email Love.
  3. Use the relevant ESP Skill to add or review the templating logic.
  4. Test every meaningful data branch in your ESP.
  5. Send only after the normal human review.

Email Love handles the design and production structure. ESP Skills helps Claude or ChatGPT work with the platform-specific logic layered on top.

That means fewer templating rules to memorize, fewer plausible-looking guesses, and a clearer way to troubleshoot the code when something goes wrong.

Install the skill for your ESP on GitHub.

Much love,
Andy

Email: [email protected]
Twitter: @emaillove