Skip to main content

Overview

Mailchimp (by Intuit) combines list marketing with Mandrill, its developer-focused transactional email infrastructure. In BrokerOS, the Mailchimp integration is implemented in integrations/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 the IEmailMarketingProvider contract from @brokeros/types. Outbound marketing and transactional emails route directly to the Mandrill API endpoint.

Step 1: Obtain Credentials from Mandrill

  1. Log into your Mandrill dashboard at mandrillapp.com (or Mailchimp Transactional via Mailchimp account settings).
  2. Navigate to Settings -> API Keys.
  3. Click + New API Key, label it (e.g. BrokerOS Production), and copy the key string.
  4. Under Settings -> Sending Domains, add your sending domain and verify the DNS records (DKIM and SPF TXT).
  5. 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:
  1. Navigate to Dashboard -> Marketing -> Email -> Settings.
  2. Open the Providers & Domains tab (/dashboard/marketing/email/settings?tab=providers).
  3. Click Add Provider and select Mailchimp.
  4. Fill in the modal connection fields:
  1. Click Verify & Connect. BrokerOS sends a live ping to https://mandrillapp.com/api/1.0/users/ping.json to 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:
  1. In your Mandrill portal, navigate to Settings -> Webhooks.
  2. Click Add a Webhook.
  3. Set the Post URL to:
  4. Check the events for Message Is Unsubscribed and Message Hard-Bounced (Cleaned).
  5. Save the webhook. Incoming webhooks are parsed by MailchimpWebhookParser to update lead opt-in states.

Webhook Telemetry Handling


Integration Implementation Details

The core client logic lives in integrations/mail/mailchimp/src/index.ts.

Live Validation Check

When configured in the UI, MailchimpClient.validate() sends a heartbeat ping to Mandrill:

Outbound Payload Assembly

Campaign worker batches structure messages according to Mandrill transactional specifications: