Skip to content
Back to skills

Email Template To Dnd

ASecurity

Turns email HTML into a design that opens in Brevo's drag-and-drop editor, and saves it as a template. Use when the user wants an email they can edit visually in the drag-and-drop editor, wants HTML imported as an editable design, or wants an automation email, transactional or campaign template saved as a design. Explains how to write HTML that converts cleanly, saves it in one call (email_editor_create_template with the HTML, converted on Brevo's side), fixes what the conversion report says ...

  • 19 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added December 4, 2026
ai-agentsgoshellapi

Works with

  • cli
  • api
  • mcp

Security analysis

A92/100
  • mediumInstalls packages at runtime which could introduce malicious dependencies

Pro scans all 4 files and shows the line behind each finding

Scanned December 4, 2026

npx -y skills add getbrevo/brevo-skills --skill email-template-to-dnd --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Email Template To Dnd?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Email Template To Dnd
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/getbrevo-email-template-to-dnd/badge)](https://www.skillsdirectory.com/skills/getbrevo-email-template-to-dnd)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: email-template-to-dnd
description: Turns email HTML into a design that opens in Brevo's drag-and-drop editor, and saves it as a template. Use when the user wants an email they can edit visually in the drag-and-drop editor, wants HTML imported as an editable design, or wants an automation email, transactional or campaign template saved as a design. Explains how to write HTML that converts cleanly, saves it in one call (email_editor_create_template with the HTML, converted on Brevo's side), fixes what the conversion report says was lost or left out, tells the user in one or two sentences what is left, and lists the editor steps left to do.
metadata:
  version: 1.2.0
  status: beta
  author: brevo
---
# Email HTML to drag-and-drop design

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.

## Brevo connection rules

- Every Brevo call goes through the Brevo MCP server's tools. The user's connection carries
  their authentication (OAuth). **Never ask for an API key, never ask the user to paste a key
  into the chat, and never put a key in a file or command.**
- If a tool returns 401, or 403 about the login or token, ask the user to reconnect Brevo in
  their agent's settings.
- A 403 "required scope not present" (`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.
- If a tool a step needs is missing from your tool list, stop that step and say that the
  user's Brevo connection doesn't offer it (connections can differ). Don't improvise with
  other tools. Writing HTML never needs a tool; offer it, and the steps to finish in Brevo.
- On a sub-account, pass `subaccount_id` on every call: every Brevo tool takes it per call,
  and a call without it acts on the main account.
- Show a tool's error message as returned, after a plain-language summary. Don't invent a
  cause the tool didn't give.

## Where this skill comes from

- You already have this skill: it is in your context, whether installed, from the plugin, uploaded
  or fetched with `get_brevo_guide`. Don't call `get_brevo_guide` for it again in this
  conversation.
- To have it without a tool call next time, install it once: the Brevo plugin from
  `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.
- Once per conversation, call `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.
- If you don't have the skill, call `get_brevo_guide` with its name: it returns the current text.

## Working rules for every step

- Follow the steps in order. Don't skip, merge or reorder them, and don't add steps this skill
  doesn't have.
- Use only the tools this skill names, with the arguments it describes. Never invent a tool, a
  parameter, an ID or an email address; ask the user instead; batch open questions.
- Before anything is created, changed or sent, say in plain words what will happen and wait for
  the user's yes. A yes covers only what you described.
- Read each Brevo object once per conversation and reuse it. Re-read only after something
  changed it.
- Report a result only from what the tool returned. If a call failed or returned nothing,
  say so; never describe it as done.
- Reply in the user's language, and keep names, IDs and addresses exactly as Brevo shows them.

## Conversation cache (every email skill)

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 |

- **A failed fetch never blocks.** Skip the check that needed it, say so in one line ("I
  couldn't read your contact attributes, so that check was skipped"), and go on.
- **Errors:** a 5xx is retried once, then the user is told it is on Brevo's side. A 404 when
  reading a cached template: drop it from the cache and tell the user it no longer exists.
  A 404 on an update is not that: keep the cache and follow the skill's error table. A 429 on
  the brand kit: keep the cached kit and say the hourly limit is reached.
- **"What do you have cached?"** List each entry (what, account, when fetched) without
  secrets. **"Refresh"** clears everything; fetch again as each step needs it.
- If you can't tell how much time has passed, fetch the 10-minute items again when the user
  starts a new email.
- Never keep API keys, tokens or passwords in the cache or anywhere in the conversation.

**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.

## 1. Collect the inputs

- **The HTML**, written for drag-and-drop output with `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](references/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).
- **The type:** `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`.
- **Name, subject, preview text** (the hidden preheader is dropped on conversion, so
  `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.

## 2. Confirm and save

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>`.

## 3. Fix what the conversion report lists

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](references/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.

## 4. Activate only after a yes

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.

## 5. Tell the user what is left in the editor

Read [native-blocks.md](references/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.

## 6. Change a saved design

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.

1. Edit only the affected lines of the HTML kept with the email (`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.
2. Show what changes and ask "Update it?". On a yes, call `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.
3. Fix what `conversion` lists (step 3).
4. Never send `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).

## Refusals and errors

| 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 |

## Requirements

- `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.

## Output rules

- Do one thing per request: create one template, one campaign, one list. Never create a
  second object to "fix" the first without the user's go-ahead.
- Don't paste large inputs or outputs (HTML, design JSON, full reports) into the chat
  unless the user asks. Summarize them.
- Describe problems by what the user sees ("the 'Shop the sale' button"), never by
  selectors, block types or internal field names.
- **Keep it short:** results, not process, one line per finished step; never list what
  passed. More only for what needs the user's decision (a loss, a warning).
- End the last reply with the object's name, ID, Brevo link and what is left to do, in
  about five lines.

Files in this skill

  • SKILL.md17.5 KB
  • agents/openai.yaml364 B
  • references/converter-notes.md7.4 KB
  • references/native-blocks.md3.1 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in ai-agents →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.