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

**URL:** <https://forum.mautic.org/t/ai-email-sections-generate-mjml-sections-in-the-grapesjs-builder-from-a-text-prompt/38388>\
**Category:** 3rd Party Addons\
**Created:** [July 29, 2026, 5:19pm UTC](https://forum.mautic.org/t/ai-email-sections-generate-mjml-sections-in-the-grapesjs-builder-from-a-text-prompt/38388 "2026-07-29T17:19:26Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![introfini](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/introfini/32/14915_2.png) [@introfini](https://forum.mautic.org/u/introfini)\
**Post date:** [July 29, 2026, 5:19pm UTC](https://forum.mautic.org/t/ai-email-sections-generate-mjml-sections-in-the-grapesjs-builder-from-a-text-prompt/38388/1 "2026-07-29T17:19:27Z")

</div>

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](https://us1.discourse-cdn.com/flex020/uploads/mautic/original/2X/a/a3b7551b93fbd233e5b9f005f9d189747f062a90.gif)

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.

- GitHub: [GitHub - Bloomidea/mautic-plugin-ai-email-sections: Mautic plugin that generates and edits MJML sections in the GrapesJS email builder from a text description, with allowlist validation and preservation invariants. · GitHub](https://github.com/Bloomidea/mautic-plugin-ai-email-sections)
- Packagist: [bloomidea/mautic-plugin-ai-email-sections - Packagist.org](https://packagist.org/packages/bloomidea/mautic-plugin-ai-email-sections)

Feedback, issues and PRs are very welcome!
