Sync Salesforce contacts to Mailchimp weekly
Recipe ToolsMarketingCRM
What it does
When a scheduled trigger runs every Sunday at 8:30 PM, this automation queries Salesforce for contacts and syncs new ones to Mailchimp. For each contact found, it checks if that subscriber exists in Mailchimp, adds them if not, and logs any errors to a lookup table.
Who it's for
Marketing operations teams who need to keep Mailchimp audiences in sync with Salesforce contacts on a regular schedule.
How teams use this
Keep marketing lists current weekly
Run the sync every Sunday so Mailchimp audiences always reflect the latest contacts in Salesforce. No manual uploads or list maintenance is needed.
Sync only secondary contacts to Mailchimp
Filter the Salesforce SOQL query to include only secondary contacts so primary and secondary audiences stay separate in Mailchimp.
Track sync failures for the team
Store all errors in the lookup table so the team can review what failed and why, then retry those records manually or in the next cycle.
Notify on sync completion
Add a step to send a summary message to a Slack channel after the sync finishes so the team knows the job ran and how many contacts were added.
How it works
- Run sync every Sunday evening. This automation starts on a weekly schedule every Sunday at 8:30 PM so Mailchimp audiences stay current with Salesforce.
- Search Salesforce for contacts. Query Salesforce using SOQL to find all contacts that match the criteria for syncing to Mailchimp as secondary contacts.
- Check if subscriber exists in Mailchimp. For each contact from Salesforce, search Mailchimp to see if that subscriber is already in the audience before adding them.
- Add new subscribers to Mailchimp. When a contact is not found in Mailchimp, add them as a subscriber to the audience so they receive campaigns and updates.
- Log errors and update Salesforce. Record any sync failures in the error lookup table and update the contact record in Salesforce with the final sync status.