Easy Email Builder

v0.1.3
io.github.Shahkarkhan440/easy-email-builder Checked 3 days ago Published 1 month ago

Design HTML email templates with AI: render to HTML and open them in a visual editor

These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.

get_block_reference Template format reference

The template format: block types and their properties, layout, colors, variables. Read this before writing a template.

list_templates List starter templates

Lists the starter email templates (welcome, newsletter, order confirmation, password reset, …) and the built-in header/footer ids usable in build_email.

ParameterTypeDescription
categorystringOnly list starter templates in this category

get_template Get a starter template

Returns a starter template to adapt. "tree" (default) is the nested format build_email accepts; "document" is the flat editor JSON.

ParameterTypeDescription
name *stringTemplate name from list_templates, e.g. "welcome"
formatstringDefault: tree

build_email Build email

Validates a template, renders the final email HTML, lists its variables, and returns a preview link that opens the email in the Easy Email Builder visual editor (where it can be edited and exported). Accepts the tree format ({ layout, header, footer, blocks }) or a flat editor document. On validation errors nothing is rendered; fix them and call again. "warnings" also flags things that break in Outlook or Gmail (nested columns, oversized images, unsupported CSS in raw HTML, clipping); fix those too unless the user accepts them.

ParameterTypeDescription
template *objectThe template: { layout?, header?, footer?, blocks: [...] } (see get_block_reference) or a flat editor document
documentOutputPathstringAlso write the flat editor document (JSON) to this file path
htmlOutputPathstringAlso write the HTML to this file path
includearrayWhat to return besides the preview link and variables. Default: ["html"]. "document" is the flat JSON for the EmailBuilder React component.
variablesobjectFallback values for contact variables used in the template, e.g. { "first_name": "there" }