AI Email Sections: generate MJML sections in the GrapesJS builder from a text prompt

Hi everyone,

We’ve just released AI Email Sections, a free (GPL) plugin that adds an AI assistant panel to Mautic’s GrapesJS email builder. You describe a section in plain text (“a hero for the summer collection”, “a 3-column product grid with buttons”) and it generates ready-to-use MJML directly in the builder, styled with your theme’s colours and fonts.

demo

What makes it different from pasting AI output into the builder by hand:

  • Validated generation, not raw AI output. Every response goes through an MJML validator with a strict tag allowlist (no mj-raw, no invented tags), and invalid responses are retried automatically with the validator’s feedback. What lands in your email is always MJML the builder understands.
  • Edit mode with preservation guarantees. Select an existing section and ask for a change (“make it two columns”); the plugin verifies the edit didn’t silently drop your links, images or personalisation tokens.
  • Theme-aware. It reads your theme’s palette and typography so generated sections match the rest of the email, and it knows your custom contact fields, so {contactfield=...} tokens work out of the box.
  • Brand brief. An optional free-text setting where you describe your brand voice; it’s applied to every generation.

Requirements: Mautic 7, an Anthropic API key (each generation costs a fraction of a cent), or any OpenAI-compatible endpoint including local models.

Install: composer require bloomidea/mautic-plugin-ai-email-sections, then reload plugins.

Feedback, issues and PRs are very welcome!