The native Bricks Builder Mailchimp integration can sometimes be unreliable, hard to troubleshoot, and lacks the option to update existing contacts.
Code: https://github.com/janjcwebtech/bricks-mailchimp-integration
???? What You’ll Learn in the video:
✔ How to create a custom Bricks form action for Mailchimp
✔ How to send form submissions to Mailchimp without using the native integration
✔ How to enable contact updates instead of failing on duplicate emails
✔ How to log and troubleshoot errors more easily
If you’re using Bricks Builder for WordPress and want a more flexible Mailchimp setup, this method gives you better control over your email marketing and is simple to modify for your needs.
Update version 2.0 – June 2026: This grew into a full plugin
When I wrote the original post above, this was a single code snippet for Mailchimp. It solved the immediate problem, but it was on my to-do list to rebuild it as a proper plugin. With help of Claude code it took just few hours.
Bricksforms Marketing Integrations (v2.0.0) is built on a provider-based architecture, so connecting Bricks forms to a new marketing platform is easy. Plugin is issued under GPL-2.0+ license so feel free to build on top of it.
What changed
| Original snippet | Now (v2.0.0) | |
|---|---|---|
| Form | Code in your theme | Installable plugin |
| Providers | Mailchimp only | Mailchimp + EmailOctopus (more coming) |
| Field mapping | Hard-coded | Per-form, via Bricks field selects |
| API keys | Plain options | Encrypted at rest (AES-256-CBC) |
| Update existing contacts | ✔ | ✔ |
| Tags & subscriber status | Limited | Per-form control |
| Adding a platform | Fork the code | Register via a filter |
| Errors | Dig through error_log |
Inline form messages + optional debug mode |
What you get now
- ✔ Multiple providers – choose “Mailchimp” or “EmailOctopus” straight from the form’s Actions dropdown.
- ✔ Per-form field mapping – map email, first name, and last name to the real fields on each form in the builder.
- ✔ Tags and subscriber status set per form.
- ✔ Updates existing subscribers instead of failing on a duplicate email — the original pain point that started all this.
- ✔ API keys encrypted at rest with a dedicated key
- ✔ Custom success/error messages and an optional debug mode that surfaces the API’s own error detail.
Bundled providers:
- Mailchimp — Marketing API v3.0: upsert members, tags, merge fields (datacenter auto-detected from the key).
- EmailOctopus — API v2: Bearer auth, upsert contacts, custom field tags, configurable status.
Setup, end to end
- Install and activate the plugin.
- Settings → Bricksforms Marketing Integrations → paste your API key(s). They’re encrypted the moment they’re saved.
- Edit a Bricks Form element → Actions → add a provider.
- In the provider’s settings group, enter the list/audience ID and map the fields.
On security
Keys are encrypted with AES-256-CBC using a dedicated, auto-generated key. For version-controlled or multi-environment setups you can define your own:
define( 'BMI_ENCRYPTION_KEY', 'your-long-random-string' );
If a stored key can’t be decrypted, you get an admin notice. Not a silent failure.
For developers: add your own provider
Each provider is a class implementing a shared contract, and you can register one from a separate plugin without touching the core:
add_filter( 'bmi/providers', function ( $providers ) {
$providers[] = new My_Provider();
return $providers;
});
The settings page and the Bricks form controls build themselves by iterating the provider registry, so a new provider appears everywhere automatically. MailerLite, HubSpot, Brevo, ActiveCampaign, and ConvertKit are on the roadmap.
Requirements: WordPress 5.8+ (tested to 6.8) · PHP 8.0+ · Bricks Builder 1.12.2+
Get it: https://github.com/janjcwebtech/Bricksforms-marketing-integrations/
Relevant links
https://forum.bricksbuilder.io/t/custom-form-actions/6491
https://forum.bricksbuilder.io/t/sendy-co-bricks-form-custom-action-integration-finally/23087




