/brevo:email-template-to-dndfrom brevo
Converts email HTML into a Brevo drag-and-drop editor template. Handles the conversion, reports what was lost, and guides the user on remaining manual edits.
Ships in brevo. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Saves finished email HTML as a template in Brevo's drag-and-drop editor. Brevo converts the HTML into a design in the same call and reports what it couldn't keep; you fix what you can, then tell the user what is left. It never writes a design by hand, never sends, and saves transactional templates inactive.
| Step | Tool |
|---|---|
| Name the account | accounts_get_account |
| Pick an active sender | senders_get_senders |
| Check the sender's domain is authenticated | domains_get_domains |
| Save the HTML as a drag-and-drop template | email_editor_create_template |
| Fix it, or change it later (content, subject, preview text, sender) | email_editor_update_template |
| Read a template this conversation didn't write | templates_get_smtp_template |
| Fix a missing sender email, or activate after a yes | templates_update_smtp_template |
| Only to preview the design or the report without saving | email_editor_convert_html |
If a tool a step needs isn't in your tool list, stop that step and tell the user their Brevo connection doesn't offer it (connection rules below). Never build a design yourself instead.
permission_denied) means this connection doesn't
allow that action; reconnecting won't change it. Say so, skip that step, and carry on with
the fallback the skill gives (for a template render: the test send and its outcome check).
If the skill gives no fallback for that step, stop the step and tell the user.subaccount_id on every call: every Brevo tool takes it per call,
and a call without it acts on the main account.get_brevo_guide. Don't call get_brevo_guide for it again in this
conversation.getbrevo/brevo-skills, npx skills add getbrevo/brevo-skills, or, with a shell, the Brevo CLI
(npm i -g @getbrevo/cli, then brevo skill install). brevo skill check lists copies that are
behind.list_brevo_guides with installed set to the version in the
metadata of each Brevo skill you have, if the tool accepts installed; otherwise call it
with no arguments and compare the versions yourself. For a stale one, follow its update
hint.get_brevo_guide with its name: it returns the current text.Keep what you read from Brevo in this conversation and reuse it, instead of calling the same
tool again. The cache is your own notes in the conversation, never a file. Key every entry by
account and sub-account ID (none for the main account), and note when you fetched it
(fetchedAt). Never show or reuse an entry from another account or sub-account.
| What | Keep it | Fetch again when |
|---|---|---|
| Account (company, address, own email), senders, contact attributes | About 10 minutes | Time is up. An attribute in the email isn't in the cached list and the cache is more than about a minute old: fetch the attributes once more before reporting it (the user may have just added it). The user switches account or sub-account, or says they changed it in Brevo |
| Sender domains (whether each is authenticated) | Same as senders | Same as senders |
| Brand kit | The whole conversation (one read) | The user says they changed it in Brevo, or switches account. After this conversation's own save, update the cache with the approved values; don't read it back |
| Templates this conversation created or read | The whole conversation | The user says they edited it in Brevo's editor (fetch it before a preview or test). After this conversation's own update, apply the change to the cache |
| Lists and segments | Not cached | Fetch when needed |
Call budget for a transactional template (write, check, save, preview, test): about 11 calls with the cache (account, senders, attributes, brand kit, save, 3 sample renders, sender domains, test send, outcome) against about 16 without it (the account read 3 times, attributes and senders twice, and the template read back). Each fix round that re-checks attributes would add one more call without it.
email-template-write and checked with
email-template-check, or HTML the user brings from elsewhere (another tool, an old
template). Read converter-notes.md for what converts
cleanly. In short: each part of the email (header, hero, body, footer) is its own row
(<tr><td>) of the main 600px table, since each row becomes one editor section; keep
<style> blocks closed.
The editor's Style tab is taken from the first paragraph, heading, button and coloured
link, so brand fonts and colours become the template's styles only when they sit there
(email-template-write writes them that way).template (a transactional or campaign template) or automation_template
(automation email). Always pass it: the save tool defaults to automation_template. A
campaign template is picked by the user when they create the campaign in Brevo; a campaign
draft from HTML is email-campaign-create.previewText is what reaches the inbox), sender (an active one from the cached
senders, else senders_get_senders; never invent one; warn when its domain isn't
authenticated or is a free mailbox domain, as email-test-preview step 4 describes) and
editor language (en, fr, de, it or pt: the email's language when it is one
of these, else en). Take them from the answers to email-template-write step 1; ask only
for what is still missing.Saving creates an inactive draft; it isn't approval of the look. The user sees the email at the preview link (step 5) before any test send. Show, in one message, and ask "Save it?":
Save as a drag-and-drop template:
- Name: <name>
- Type: transactional template | campaign template | automation email
- Subject: <subject> Preview text: <preview text>
- Sender: <sender name> <sender email>
On a yes, call email_editor_create_template once with name (at most 100 characters),
type (always), subject, previewText, senderId and senderName (the confirmed
sender's ID and own name; always pass them when a sender is known, or the template is saved
with no sender), locale and html = the HTML as written. Leave normalize out (on by
default); send false only when the user asks to convert the HTML exactly as written. Never
send newsletterContent with html, and never convert first to copy a design back. No HTML
tags in name, subject, preview text or sender name (merge tags are fine).
It returns id, sender and conversion. Keep the HTML and the reply out of the chat.
Check the sender in the reply. A template with no sender email fails every send, test
sends included, with "From field is missing". sender.email empty, or sender.name not the
confirmed sender's name: call templates_update_smtp_template with sender = {"id": <the confirmed sender id>, "name": "<that sender's name>"}. Don't read the template back.
Cache the template (with any sender fix applied). It opens at
https://app.brevo.com/templates/email/edit/<id>.
Read conversion and fix before telling the user anything; the yes to "Save it?" covers these
fix rounds, so don't ask again. Each fix edits only the affected
lines of the HTML, then calls email_editor_update_template with the same templateId and
the whole html again (the update replaces the whole design). At most 3 rounds; never create
a second template.
In conversion | Fix |
|---|---|
lost (texts, links, images, tags): in the HTML sent, not in the HTML saved | Simplify that part, as converter-notes.md describes. A URL that only gained https:// is fine, and so is text also listed in notKept.hidden (the row below handles it). A lost tag sat between rows or across cells: move it inside one <p>. A lost list: <p> lines |
notKept.styleRules.warning (an unclosed brace) | Close the brace in the <style> block |
normalizer.dropped (for example an image or a second link removed from a button) | Move the image or link to its own row |
notKept.hidden (usually the preheader) | Its text goes in previewText (send it in the update if it isn't there yet); remove the hidden element from the HTML. No round just for this when previewText already has it |
Then tell the user what is left, in one or two sentences, not a list: mobile or
dark-mode styles (notKept.styleRules.notCopied reasons mobile, dark-mode: not supported
yet), Outlook-only content (notKept.outlookOnly), anything still in lost or
normalizer.remaining. Hover effects and font imports need no mention. Nothing left: say
"Saved; nothing was lost". Never present a template that lost content as if it were fine.
A transactional template is created inactive: test sends work, live sends need it
active. Activate it only after the user says yes (templates_update_smtp_template with
isActive: true), or tell them to activate it in Brevo.
Read native-blocks.md and list only the steps this email needs.
Loops and conditions inside text blocks already work; the editor steps are only for native
blocks: display conditions if the user wants a whole section shown to some contacts, a
Dynamic content block for a picture per item, Video or Product blocks to swap in, checking the
Social block after the first open, and picking the brand's uploaded font in the Style tab when
the brand kit has one (HTML carries only its fallback).
Then go to email-test-preview: render with sample data when it has template logic, share the preview link above and
wait for the user's yes before any test send.
For a later change to a drag-and-drop template (this conversation saved it, or the user says it is one). Updating works only on drag-and-drop templates without an A/B test or multiple languages; for those, tell the user to change it in Brevo's editor.
email-template-write
step 8), and check it again (email-template-check). A template this conversation didn't
write: read its HTML (htmlContent) once with templates_get_smtp_template, edit that, and
send it as html in the next step; it may convert less cleanly, so say so.email_editor_update_template
once with templateId (the same ID) and only what changed: html = the whole edited HTML
when the content changed (even a small fix resends all of it); subject, previewText,
name, senderId and senderName only when they changed.conversion lists (step 3).htmlContent to templates_update_smtp_template for a design: the template
then loses drag-and-drop editing. That tool is only for sender (step 2's fix) and
isActive.Then render it once with params: {} when it has template logic, share the preview link again and wait for a new yes
before any test send (email-test-preview step 3).
| Response | Meaning | What to do |
|---|---|---|
| 400 | A wrong input: HTML in a text field, both html and newsletterContent, a sender not in the account, or (update) a template not built in the drag-and-drop editor | Fix the call; don't count it as a round. If it still fails, show the error and stop |
| 413 | HTML over 2 MiB | Shorten the email (fewer sections, smaller inline content), send again |
| 422 | The HTML can't be converted (no email container table, nothing it could keep) | Explain in plain words, fix the HTML, send again. Counts as a round; at most 3 |
| A template error | A tag is broken (often {% else %} inside {% for %}) | Name the tag, fix it, retry once |
| 403 on update, about a campaign | The campaign is being sent or was sent | Say it can't be changed |
| 5xx | Brevo-side failure | An update: retry once. A create: don't retry, since it may have saved; tell the user it failed on Brevo's side, not because of their email, and ask them to check the templates list for it before saving again |
| 404 on update ("Invalid route") | Updating isn't available on this connection right now; the template is still there | Don't retry or work around it. Tell the user what you would have fixed and that they can change it in Brevo's editor, and keep the template in the cache |
| 401, or 403 about the login | Connection expired | Reconnect Brevo in the agent's settings |
| 403 "required scope not present" | The connection doesn't allow this action | Say so; reconnecting won't help. Skip the step |
email_editor_create_template converts and saves in one call, with html;
email_editor_update_template replaces a saved design in place, also with html.
email_editor_convert_html saves nothing: use it only when the user wants to see the
design or the report before saving.templates_update_smtp_template fixes a missing sender email and activates a template;
domains_get_domains says whether the sender's domain is authenticated. On a
sub-account, every call passes subaccount_id.email_editor_create_template accepts the types template and automation_template
only. To send the design as a campaign, the user picks the saved template when creating
the campaign in Brevo.What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
brevo, email-templates, drag-and-drop-editor, html-conversion
10 skills in this plugin
/automation-createCreates a Brevo automation workflow as a draft, in one call, from its triggers and steps. Use when the user asks for an automation or a workflow in Brevo, for example "send a welcome email when someone joins my newsletter list", "email customers 2 days after their order", "if they opened it, add them to a list" or "remind contacts on their birthday". Confirms the account, reads which triggers and steps the account can use and the fields of each, looks up every ID with Brevo tools, generates filters from the user's words, validates the whole workflow, shows the plan, and creates the draft only after a yes. Also edits an existing automation ("change the delay to 3 days", "swap the email", "add a step") by sending its whole new definition, after showing what changes and who is affected. Uses only the trigger and step types the account's catalog lists. Never activates without the user's explicit go-ahead./brevo-cliUse when working in a project that uses the Brevo Developer CLI (the `brevo` binary from `@getbrevo/cli`) — managing OAuth apps, UI apps, and Brevo Functions, scaffolding integrations, running the local OAuth test server, or invoking any `brevo …` command. Activates on: brevo, brevo cli, brevo app, brevo function, app-config.json, OAuth Brevo, BREVO_API_KEY, getbrevo./brevo-guideUse when the user asks for something in Brevo (email, SMS, WhatsApp, contacts, CRM and so on) and you don't already have a Brevo skill for the job, or when they ask what Brevo skills or guides exist, or where to get, install or update them. Loads the current skill text from the Brevo MCP server with its get_brevo_guide tool, which works in every client with nothing to install, and says where to install the skills once if the user wants them without a tool call. Never asks for an API key./emailEntry point for Brevo email work. Use when the user asks to write, check, preview, test-send or prepare a Brevo email campaign or email template, or to use or change their brand kit (for example "create a Black Friday campaign for my VIP list and send me a test"). Confirms the Brevo account, splits the request into steps, names the email skill for each step, and sets the safety rules every email action follows - drafts only, and nothing sent to real recipients without an explicit yes./email-brand-kitUse when the user wants an email in their brand (logo, colours, fonts, social links), asks what their Brevo brand kit holds, wants to set up or refresh their brand kit from their website, or wants to change one part of it (logo, colours, fonts, social links, custom social icons, brand website). Reads the account's brand kit and turns it into concrete email styles for email-template-write. Suggests a kit from the user's website (a limited lookup that changes no brand values), shows the current kit next to the suggestion, and saves only the parts the user approves, in as few calls as the hourly limit needs. Never invents brand values./email-campaign-createCreates a Brevo email campaign as a draft. Use when the user wants finished email HTML turned into a campaign for one of their contact lists or segments, with a verified sender (for example "create the campaign for my VIP list"). Picks the list and an active sender, confirms, creates the draft, and reports its ID and link. Never sends or schedules - it shows a "Ready to send" summary and the user sends it from Brevo. Use after email-template-write and email-template-check.npx claudepluginhub getbrevo/brevo-skills --plugin brevoOther plugins' skills for the same job