adrianjean / craft-formie-mautic
CraftCMS Formie integration for the Mautic email marketing platform.
Installs: 0
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 0
Forks: 0
Open Issues: 0
pkg:composer/adrianjean/craft-formie-mautic
Requires
- php: >=8.1
- craftcms/cms: ^5.0
- verbb/formie: ^3.0
README
A CraftCMS Verbb Formie integration module for the Mautic email marketing Platform. Tested with Mautic 6.x and 7.x. It allows Formie form submissions to automatically create or update contacts in Mautic, map custom fields, apply tags/segments, and handle opt-in consent. PRs and suggestions are welcome!
Requirements
| System | Version |
|---|---|
| CraftCMS | 5.x |
| Formie | 3.x |
| Mautic | 6.x or 7.x API |
| PHP | 8.1+ |
Mautic Setup
Ideally you have a Segment created with a Campaign that can ingest the contact and process it. If not, the contact will simply be added to Mautic.
Installation
At this time the module is distributed via GitHub only, but can be installed with Composer using the repository URL.
1. Install the module with composer
composer require adrianjean/craft-formie-mautic
2. Enable the Module in CraftCMS
Add to config/app.php:
'modules' => [ 'formie-mautic' => [ 'class' => \modules\formiemautic\FormieMauticModule::class, ], ], 'bootstrap' => ['formie-mautic'],
Configuration
- Generate the private and public keys in Mautic: Mautic → Settings → Configuration → API Credentials
- Configure Formie: Formie → Settings → Integrations, add a new Mautic Integration.
- Add the required credentials:
- Base URL — this is the URL to your Mautic 6.x or 7.x install.
- Public Key — generated in step 1.
- Private Key — generated in step 1.
You can use environment variables in your CraftCMS .env file like the following, or use your own:
$MAUTIC_BASE_URL
$MAUTIC_PUBLIC_KEY
$MAUTIC_PRIVATE_KEY
Usage
- Create a Formie form
- Add your fields + optional opt-in consent
- Go to Form → Integrations
- Add the Mautic Integation you created
- Click the refresh arrows, and then map your fields to Mautic fields
- Choose a Mautic Segment to assign contacts to
- Submit your form and verify contact creation/update in Mautic
Features
- Map Formie fields to Mautic custom fields
- Opt-in / consent checkbox
- Automatically assign a Mautic segment to new contacts
- Works with Mautic 6.x and 7.x API - Might work with Mautic 5.x but untested.
Known Issues or Future Functionality
No issues or features at this time.