A powerful Mautic plugin that seamlessly integrates RSS feed content into your emails using the GrapesJS email builder. Import news articles, blog posts, or any RSS feed content directly into your email campaigns with a single click.
- 🎯 GrapesJS Integration - Native block in the GrapesJS builder for easy content import
- 📰 RSS Feed Support - Import content from any RSS feed
- 🎨 Customizable Templates - Define your own MJML templates with token support
- ✅ Multi-Selection - Select multiple RSS items at once
- 🔧 Flexible Configuration - Configure RSS URL, fields, and templates per installation
- 🚀 No Core Modifications - Clean extension using Mautic's plugin system
Find the RSS Feed block in your GrapesJS email builder's block panel:
Configure your RSS feed settings in Mautic Settings → Plugins:
Select the RSS items you want to import into your email:
-
Add the plugin to your Mautic installation:
composer require mautic/email-rss-import-bundle
-
Clear the Mautic cache:
php bin/console cache:clear
-
Navigate to Mautic Settings → Plugins
-
Click "Install/Upgrade Plugins"
-
Find "Email RSS Import" and click to configure it
-
Clone or download this repository into your Mautic plugins directory:
cd /path/to/mautic/plugins git clone <repository-url> MauticEmailRssImportBundle
-
Clear the Mautic cache:
php bin/console cache:clear
-
Navigate to Mautic Settings → Plugins
-
Click "Install/Upgrade Plugins"
-
Find "Email RSS Import" and click to configure it
If you're hosting this plugin in a private repository, add it to your composer.json:
{
"repositories": [
{
"type": "vcs",
"url": "https://github.com/your-username/mautic-email-rss-import-bundle.git"
}
],
"require": {
"mautic/email-rss-import-bundle": "^1.0"
}
}Then run:
composer update mautic/email-rss-import-bundle
php bin/console cache:clearNavigate to Settings → Plugins → Email RSS Import to configure:
Enter the URL of the RSS feed you want to import from.
Default: https://feeds.bbci.co.uk/news/rss.xml
Define which fields to extract from the RSS feed (one per line).
Available fields:
title- The article titlelink- The article URLdescription- Article description/summarycategory- Article category/categoriespubDate- Publication datemedia- Featured image/media URL
Define the MJML template for each RSS item. Use tokens to insert RSS field values.
Available tokens: {title}, {link}, {description}, {category}, {pubDate}, {media}
Example template:
<mj-section background-color="#ffffff" padding-top="25px" padding-bottom="0">
<mj-column width="100%">
<mj-image src="{media}" alt="{title}" padding-top="0" padding-bottom="20px"></mj-image>
<mj-text color="#000000" font-family="Ubuntu, Helvetica, Arial, sans-serif" font-size="20px" line-height="1.5" font-weight="500" padding-bottom="0px">
<p>{title}</p>
</mj-text>
<mj-text color="#000000" font-family="Ubuntu, Helvetica, Arial, sans-serif" font-size="16px" line-height="1.5" font-weight="300" align="justify">
<p>{description}</p>
</mj-text>
<mj-button background-color="#486AE2" color="#FFFFFF" href="{link}" font-family="Ubuntu, Helvetica, Arial, sans-serif" padding-top="20px" padding-bottom="40px">READ MORE</mj-button>
<mj-text color="#666666" font-family="Ubuntu, Helvetica, Arial, sans-serif" font-size="12px">
<p>{category} - {pubDate}</p>
</mj-text>
</mj-column>
</mj-section>-
Open the Email Builder
- Create a new email or edit an existing one
- Click "Builder" to launch GrapesJS
-
Find the RSS Feed Block
- Look in the left sidebar blocks panel
- Scroll to the "Extra" category
- Click on the "RSS Feed" block (orange RSS icon)
-
Select Content
- A modal will appear showing all available RSS items
- Use checkboxes to select the items you want to import
- Use "Select All" or "Deselect All" for bulk selection
- Click "Insert Selected Items"
-
Save Your Email
- The selected RSS items will be inserted into your email
- Each item will be formatted according to your template
- Items are inserted in chronological order from the feed
- Extension System: The plugin registers itself with GrapesJS using Mautic's
window.MauticGrapesJsPluginsextension system - Block Registration: A custom block is added to the GrapesJS BlockManager
- RSS Fetching: When clicked, the plugin fetches RSS content from your configured feed via AJAX
- Token Replacement: Selected items are processed through the template with tokens replaced by actual values
- Content Insertion: The rendered MJML is inserted into the email canvas
- Backend Controller:
RssController.php- Fetches and parses RSS feeds - Integration Class:
EmailRssImportIntegration.php- Handles plugin configuration - Frontend Extension:
grapesjs-rss-import.js- GrapesJS block and modal functionality - Event Subscriber:
AssetSubscriber.php- Injects JavaScript assets
- RSS 2.0
- Media RSS (for featured images)
- Multiple categories per item
- Mautic 4.x or higher
- PHP 7.4 or higher
- GrapesJS Builder Plugin enabled
- SimpleXML PHP extension
- Ensure the plugin is Published in Settings → Plugins
- Ensure the "Active" setting is set to Yes in plugin configuration
- Clear Mautic cache:
php bin/console cache:clear - Check browser console for JavaScript errors
- Ensure your template only contains valid MJML components
- Do not wrap the template in
<mjml>or<mj-body>tags (these are added automatically) - Ensure all text content is wrapped in
<mj-text>components - Validate your MJML at https://mjml.io/try-it-live
- Check that the RSS URL is accessible from your server
- Verify the RSS URL returns valid XML
- Check server logs for any PHP errors
- Ensure your server can make outbound HTTP requests
MauticEmailRssImportBundle/
├── Assets/
│ ├── css/
│ │ └── rss-import.css
│ ├── img/
│ │ └── rss-icon.png
│ └── js/
│ └── grapesjs-rss-import.js
├── Config/
│ └── config.php
├── Controller/
│ └── RssController.php
├── EventListener/
│ └── AssetSubscriber.php
├── Integration/
│ └── EmailRssImportIntegration.php
├── Resources/
│ └── views/
├── Translations/
│ └── en_US/
│ └── messages.ini
├── MauticEmailRssImportBundle.php
└── README.md
To add custom RSS field parsing, modify RssController.php:
// Handle custom namespace
$namespaces = $item->getNamespaces(true);
if (isset($namespaces['custom'])) {
$custom = $item->children($namespaces['custom']);
$value = (string) $custom->customField;
}Frederik Wouters
This plugin is provided as-is for use with Mautic installations.
For issues, questions, or contributions, please open an issue in the repository.
To make this plugin available via Composer for everyone:
-
Push to GitHub (or GitLab/Bitbucket):
git init git add . git commit -m "Initial release v1.0.0" git tag v1.0.0 git remote add origin https://github.com/your-username/mautic-email-rss-import-bundle.git git push -u origin main git push --tags
-
Submit to Packagist:
- Go to https://packagist.org
- Sign in with your GitHub account
- Click "Submit"
- Enter your repository URL:
https://github.com/your-username/mautic-email-rss-import-bundle - Packagist will automatically track new releases via your Git tags
-
Auto-Update Hook (Optional):
- In your GitHub repository settings, add Packagist webhook for automatic updates
- Settings → Webhooks → Add webhook
- Payload URL:
https://packagist.org/api/github?username=YOUR_USERNAME
When releasing new versions:
# Update composer.json version if needed
git add .
git commit -m "Release v1.1.0"
git tag v1.1.0
git push && git push --tagsPackagist will automatically detect the new tag and update the package.
- Initial release
- GrapesJS block integration
- RSS feed parsing with configurable fields
- MJML template support with token replacement
- Multi-item selection
- Configuration interface
- Drag-and-drop block functionality
- Composer support


