Import an email

Files and assets

Import an email

Bring an email you already have into the editor: paste its HTML, or drop in a picture of it. People edit it as blocks instead of starting again.

In the editor#

Open the Body panel, then Templates, then Import email. Paste the HTML or choose an .html file. Without AI the email is converted on the spot, in the browser, and nothing is sent anywhere. A design that already has content is never replaced without asking, and one undo brings it back.

The importer reads layout tables the way a person does. A row with one cell becomes a section, a row with two to four cells becomes columns (with their widths), and the headings, paragraphs, lists, pictures, buttons, dividers and spacing inside become blocks. It keeps the colors, font sizes, alignment, section backgrounds, button colors, the content width, the title and the hidden preview line. Anything it cannot place is kept as text, so no words are lost.

With AI: from a picture#

When an AI importer is set up, the dialog also takes a picture of the email (a screenshot or a mockup). The AI rebuilds it as blocks, using the HTML as well if you add it. Tick Rebuild with AI to use it on HTML alone, which helps with layouts that have many columns. Add a short note if something must stay as it is.

The setup needs nothing new when you already use AI. The three built-in providers (OpenAI, Anthropic, Gemini) read pictures, and the same adapter serves the importer:

tsai.ts
import { createAnthropicAdapter } from "react-email-craft";

const adapter = createAnthropicAdapter({ apiKey: process.env.CLAUDE_AI_KEY });

// The editor calls this from the Import dialog
const { design, summary, warnings } = await adapter.importDesign({
  image: { mime: "image/png", data: base64WithoutThePrefix },
  html: optionalHtml,
  hint: "keep the header exactly"
});

On your own backend, admin.ai("importDesign", { image, html, hint }) does the same with the key kept on the server, and the AI route of the Cloud API accepts importDesign as a method (it counts as a design generation). A picture is a PNG, JPG, WebP or GIF of up to 5 MB.

Without the editor#

The HTML conversion is also an endpoint, with no key and no AI:

bash
curl -X POST https://api.mailkaro.com/v3/import   -H "content-type: application/json"   -d '{ "html": "<table>...</table>", "title": "Spring offer" }'
# { "design": { ... }, "block_count": 14, "used_fallback": false }

What to expect#

PropertyControlsDefault
Headings, text, listsKept, with color, size and alignmentInline links and bold stay inside the text
PicturesKept, with the link and a width as a percentageA picture of the email only reaches the AI, never your storage
ButtonsA link with its own color or padding, or a cell that holds only a linkA plain link in a footer stays a link in text
ColumnsTwo to four cells side by sideFive or more are read one after another
Anything elseKept as textIf nothing is found, the HTML is kept in one HTML block
An import is a start, not a copy. Email HTML varies a lot, and AI can misread a picture, so look through the result before you send it. The AI sees the picture and the HTML you add and nothing else, and its answer is turned into blocks by the editor, so it can only produce blocks the editor knows.