You add a contact in Salesforce, then someone manually re-adds them to Mailchimp so they get the newsletter. Multiply that by every new lead and every email change, and you have a stale audience and wasted hours. The fix is a small, reliable integration: when a contact is created or updated in Salesforce, they're automatically created or updated in your Mailchimp audience. Here's how it works and what to watch for.
What "synced" should actually mean
For most businesses, a clean version 1 is one-directional: Salesforce is the source of truth for who your contacts are, and it pushes changes out to Mailchimp. When a contact is created or their email/name changes in Salesforce, the same person is added or updated in your Mailchimp audience — subscribed and ready for campaigns. No manual exports, no CSV uploads, no drift.
Build vs app: which to choose
There are AppExchange connectors and third-party sync tools, and they're fine when you need deep, bi-directional, engagement-level sync. But for the common need — "new Salesforce contacts should land in my Mailchimp list" — they're often overkill, carry a monthly fee, and add a dependency. A lightweight custom integration does exactly what you need, works on a free Mailchimp account, and has no recurring software cost. It's a few hours of setup for a result you fully control.
How the integration works
The mechanics are straightforward once you know Mailchimp's model. Mailchimp identifies a member in an audience by the lowercase MD5 hash of their email address, and its Marketing API exposes an "upsert" (PUT) that creates the member if new or updates them if they already exist. So the flow is:
- A contact is created or updated in Salesforce.
- Salesforce automation (a Flow or an Apex trigger) calls the Mailchimp Marketing API.
- The API upserts the member into your audience by email hash, setting their status to
subscribedand mapping fields like first and last name to merge fields.
// Conceptual upsert to Mailchimp Marketing API
PUT https://<dc>.api.mailchimp.com/3.0/lists/{audienceId}/members/{md5(lowercase email)}
{
"email_address": "jane@example.com",
"status_if_new": "subscribed",
"merge_fields": { "FNAME": "Jane", "LNAME": "Doe" }
}
Using the hashed-email upsert is what makes the sync idempotent: re-sending the same contact never creates a duplicate, it just updates.
What you need
- A Mailchimp audience (list) ID — found under Audience → Settings → "Audience name and defaults."
- An API key and your data center prefix (the
us21-style suffix in your account). - A Named Credential in Salesforce to store the endpoint and auth securely — so no secret ever lives in code.
- A field mapping — which Salesforce fields feed Mailchimp's email and merge fields.
Store the API key in a Named Credential, never in Apex. It keeps secrets out of source control, handles the auth header for you, and lets you move the integration between sandbox and production without code changes.
Gotchas worth knowing up front
- Free plan limits. A free Mailchimp account caps contacts and monthly sends — fine for many small businesses, but know the ceiling before you rely on it.
- Subscription status & compliance. Decide deliberately whether new contacts are
subscribed. Respect consent and anti-spam rules; if you use double opt-in, the member status behaves differently. - Unsubscribes. In a one-directional sync, someone who unsubscribes in Mailchimp shouldn't be force-re-subscribed by Salesforce. Use
status_if_newso you only set status for brand-new members, and never overwrite an existing opt-out. - Deduplication. Because the key is the email hash, contacts sharing an email collapse to one member — usually what you want, but worth confirming against your data.
- Bulkification. If you load many contacts at once, batch the callouts so you stay within Salesforce limits.
When to go further
Once one-directional sync is solid, you can layer on more: pulling unsubscribe and engagement data back into Salesforce, syncing to multiple audiences by segment, or tagging members based on Salesforce fields. Start simple, prove it works, then extend — a pattern that keeps integrations reliable instead of fragile.
Frequently asked questions
How do I automatically add Salesforce contacts to Mailchimp?
Trigger on contact create/update and call the Mailchimp Marketing API to upsert the member into your audience, keyed by the lowercase MD5 hash of their email.
Can I sync on the free Mailchimp plan?
Yes. A lightweight custom integration works with a free account and the Marketing API — you just need the audience ID and an API key, and should respect the free plan's limits.
Is it one-directional or two-way?
Either. A reliable v1 is one-directional with Salesforce as the source of truth; two-way sync is possible but adds complexity, so many teams start one-directional.