Mailchimp Audience Sync from Dataverse
When a contact is created or updated in Dataverse, the flow upserts them into a Mailchimp audience with merge fields and unsubscribes contacts flagged as opted-out. A daily reconciliation keeps the Mailchimp audience aligned with the Dataverse marketing-consent state.
Provided as-is, without warranty of any kind. Review and test each pattern in a non-production environment before deploying it to live automations. See our Terms.
Overview
This solution keeps a Mailchimp audience continuously aligned with marketing-consent state held in Dataverse. It ships as two cloud flows + one Dataverse table in a single solution: a real-time sync that upserts or unsubscribes a contact when its consent/details change in Dataverse, and a daily reconciliation that re-reads and re-syncs the whole contact set and emails a summary to marketing ops.
Why it matters: marketing runs in Mailchimp, but the customer record and consent live in Dataverse. Keeping them in sync prevents emailing opted-out contacts (a compliance risk) and stops the audience drifting stale. The flows ship Off; going live requires only authorizing the three connections and setting the environment-variable values.
Connector accuracy: the build uses the real shared_mailchimp ops verified against the live swagger - AddMembers (batch upsert, body/members) for subscribing and updatemember (PATCH, member identified by plain email, connector computes the MD5 subscriber hash) for unsubscribing. No HTTP fallback and no in-flow hashing.
Use Case
A marketing team runs campaigns in Mailchimp but manages contacts and consent in Dataverse (synced from a Power App, a web form, or a CRM). They want the Mailchimp audience to mirror the CRM automatically, honoring opt-outs the moment they happen and reconciling nightly as a safety net.
Flow Architecture
When a Marketing Contact Is Created or Changed
Dataverse SubscribeWebhookTrigger (Create-or-Update, Organization scope)Real-time flow 1 trigger; watches consent/detail columns only (loop-safe)
Initialize variables
Initialize Variable x3Correlation id (guid), Mailchimp audience id, changed contact email
Check Marketing Consent
IfBranches on flowlibs_marketingconsent == true
Subscribe / Unsubscribe Member
Mailchimp AddMembers or updatememberUpsert as subscribed (with FNAME/LNAME/COMPANY) or set unsubscribed
Write Sync Result Back
Compose + Dataverse UpdateRecordWrites status, last-synced, source, and correlation id back to the row
Run Daily Reconciliation
Recurrence (Day/1)Scheduled flow 2 trigger; daily realignment safety net
List Marketing Contacts
Dataverse ListRecordsReads all contacts (email, name, company, consent, segment)
Filter Opted In / Opted Out
Filter Array x2Splits contacts by marketing consent
Reconcile Subscribe / Unsubscribe
Foreach + Mailchimp AddMembers / updatememberRe-subscribes opted-in and unsubscribes opted-out contacts
Send Reconciliation Report
Compose + Outlook SendEmailV2Environment Variables
| Schema name | Type | Default | Description |
|---|---|---|---|
| flowlibs_MailchimpAudienceId | String | (set per tenant) | Target Mailchimp audience (list) id |
| flowlibs_MarketingOpsEmail | String | marketing@yourcompany.com | Recipient of the daily reconciliation report |
| flowlibs_MarketingContactTableName | String | flowlibs_marketingcontact | Logical name of the watched Dataverse table (trigger entity) |
Connectors & Connections
| Connector | API name | Actions used |
|---|---|---|
| Mailchimp | shared_mailchimp | AddMembers updatemember |
| Microsoft Dataverse | shared_commondataserviceforapps | SubscribeWebhookTrigger ListRecords UpdateRecord |
| Office 365 Outlook | shared_office365 | SendEmailV2 |
Note — All connections are referenced as solution connection references; the flow is portable between environments as long as a connection is mapped at import time.
Customization Guide
Almost every realistic variant of this flow can be implemented by changing environment variable values. A few cases require small edits inside the flow definition — those are called out explicitly below.
- Segmentation tags / merge fields
- flowlibs_segmenttag is carried for future use; map it to a Mailchimp tag or merge field. Define custom merge fields (COMPANY, SEGMENT) in the audience before go-live.
- Double opt-in
- Change the subscribe status from subscribed to pending in the AddMembers member object if your compliance model requires confirmation.
- Production upsert hardening
- AddMembers adds new members; to bulk-update existing members' merge fields, enable Mailchimp update_existing or route updates through updatemember.
- Reconciliation cadence
- Adjust the Recurrence trigger (e.g. hourly) or scope List Marketing Contacts with a $filter on modifiedon for large audiences.
- Bounce/unsubscribe write-back
- Add a companion flow consuming Mailchimp's OnMemberSubscribed (or a webhook) to write Mailchimp-side opt-outs/bounces back into Dataverse.
Key Expressions
The flow is intentionally light on Power Fx / WDL gymnastics — the heaviest expressions are the branch-name concatenation and the approval outcome check. They are listed below in the order they appear in the flow.
EXPR.01Opt-in gate (condition)
True when the contact consented
EXPR.02Member email (trigger)
Mailchimp member key
EXPR.03Row primary key for write-back
Dataverse row id
EXPR.04Opted-in filter (reconciliation)
Keeps opted-in contacts
EXPR.05Opted-out filter
Keeps opted-out contacts
EXPR.06Report counts
Subscribed count (and likewise for opted-out)
Customize & download
Generate a ready-to-import copy of this solution with your environment-variable values baked in — available on Base, Pro, or Team.
Upgrade to customize
Comments
Sign in to join the conversation.
Sign inNo comments yet. Be the first to share your experience with this flow.