Overview
Mailchimp (by Intuit) combines list marketing with Mandrill, its developer-focused transactional email infrastructure. In BrokerOS, the Mailchimp integration is implemented inintegrations/mail/mailchimp/src/index.ts under the Turborepo workspace package @brokeros/int-mail-mailchimp.
Administrators connect Mailchimp and Mandrill directly in the BrokerOS Web UI at Dashboard -> Marketing -> Email -> Settings. All API tokens are encrypted with AES-256-GCM and stored in the database (MarketingIntegration).
Architecture and Dispatch Sequence
The Mailchimp integration implements theIEmailMarketingProvider contract from @brokeros/types. Outbound marketing and transactional emails route directly to the Mandrill API endpoint.
Step 1: Obtain Credentials from Mandrill
- Log into your Mandrill dashboard at mandrillapp.com (or Mailchimp Transactional via Mailchimp account settings).
- Navigate to Settings -> API Keys.
- Click + New API Key, label it (e.g.
BrokerOS Production), and copy the key string. - Under Settings -> Sending Domains, add your sending domain and verify the DNS records (DKIM and SPF TXT).
- Identify your Mailchimp server prefix (e.g.
us1,us20), visible in your Mailchimp portal URL.
Step 2: Connect in the BrokerOS Web Dashboard
In your BrokerOS dashboard:- Navigate to Dashboard -> Marketing -> Email -> Settings.
- Open the Providers & Domains tab (
/dashboard/marketing/email/settings?tab=providers). - Click Add Provider and select Mailchimp.
- Fill in the modal connection fields:
- Click Verify & Connect. BrokerOS sends a live ping to
https://mandrillapp.com/api/1.0/users/ping.jsonto verify the key, encrypts it with AES-256-GCM, and stores it in the database.
Step 3: Register Inbound Webhook URL
To automate bounce suppression and unsubscribe management:- In your Mandrill portal, navigate to Settings -> Webhooks.
- Click Add a Webhook.
- Set the Post URL to:
- Check the events for Message Is Unsubscribed and Message Hard-Bounced (Cleaned).
- Save the webhook. Incoming webhooks are parsed by
MailchimpWebhookParserto update lead opt-in states.
Webhook Telemetry Handling
Integration Implementation Details
The core client logic lives inintegrations/mail/mailchimp/src/index.ts.
Live Validation Check
When configured in the UI,MailchimpClient.validate() sends a heartbeat ping to Mandrill: