Xero and Mailchimp integration
Xero runs your accounting and customer records. Mailchimp runs your email marketing and audience management. Connecting the two keeps your customer mailing list synchronized with your active accounts in Xero, avoids sending to stale email addresses, and tracks which orders and customers from Xero have engaged with your campaigns. ml-connector handles the very different authentication models on each side and moves contact and order data on a schedule you control.
What moves between them
Contacts move from Xero into Mailchimp lists. When a contact is created or updated in Xero, ml-connector fetches the full record and syncs the email address, name, and tracking fields into a designated Mailchimp list. When a contact email changes in Xero, ml-connector updates the matching member in Mailchimp or re-subscribes if the address was previously removed. Optionally, sales invoices from Xero can sync into Mailchimp e-commerce orders to track which customers have purchased and which have received follow-up campaigns. Updates flow one direction only: Xero to Mailchimp.
How ml-connector handles it
ml-connector stores the Xero OAuth2 credentials and uses the refresh token to obtain new access tokens every 30 minutes before expiry. It validates the Xero-tenant-id header per customer and verifies incoming Xero webhook signatures using the separate signing key obtained from the Xero Developer portal. When a contact webhook arrives, ml-connector fetches the full Xero contact record and upserts it into the Mailchimp list by email address. For Mailchimp, ml-connector extracts the data center prefix from the API key, constructs the correct regional endpoint URL, and authenticates with HTTP Basic Auth on every call. Because Xero webhooks contain metadata only, ml-connector follows every webhook with a GET to fetch the complete record before mapping into Mailchimp. For e-commerce orders, ml-connector maps Xero invoice line-item amounts to Mailchimp order financial status and tracks the order total with the Xero invoice date. Mailchimp has no webhook signature verification for the Marketing API, so ml-connector relies on HTTPS and secret webhook URLs for security. Every sync carries a full audit trail and can be replayed if a downstream call fails.
A real-world example
A small consulting firm uses Xero for accounting and tracks client invoices alongside contact information. They market to current and past clients using Mailchimp email campaigns. Before the integration, the sales team manually exported the Xero client list to a CSV every few months and re-imported it into Mailchimp, leading to duplicate subscribers, stale email addresses, and missed unsubscribe requests. With Xero and Mailchimp connected, each new client added to Xero automatically appears in the Mailchimp audience within minutes, email address changes in Xero sync back to Mailchimp so campaigns reach the right address, and unsubscribes in Mailchimp can be surfaced back to the sales team. The manual export-import cycle is gone, and the Mailchimp audience is always fresh.
What you can do
- Sync Xero contacts into Mailchimp lists automatically, mapped by email address with name and organization fields.
- Update Mailchimp list members when a contact email, name, or status changes in Xero.
- Resolve the Mailchimp data center prefix from the API key and route calls to the correct regional endpoint.
- Bridge Xero OAuth2 authentication and Mailchimp API key authentication without exposing secrets.
- Track Xero sales invoices as e-commerce orders in Mailchimp with financial status and order totals.
Questions
- Which direction does data move between Xero and Mailchimp?
- Contacts and orders move from Xero into Mailchimp. When a contact is created, updated, or its email changes in Xero, ml-connector syncs that contact into the Mailchimp list. Updates flow one direction only; Mailchimp unsubscribes and list edits do not flow back to Xero.
- How does ml-connector handle Xero's webhook metadata-only payloads?
- Xero webhooks contain only the resource ID and event type, not the full record. ml-connector follows every webhook with a GET request to fetch the complete contact or invoice record before syncing into Mailchimp. This ensures all required fields (email, name, address) are included in the sync.
- How does ml-connector authenticate to Xero and Mailchimp?
- For Xero, ml-connector stores the OAuth2 client credentials and uses the refresh token to obtain new access tokens automatically before the 30-minute expiry. For Mailchimp, ml-connector uses HTTP Basic Auth with the API key and extracts the data center prefix from the key to route calls to the correct endpoint. Both credential sets are encrypted and stored per customer.
Related integrations
More Xero integrations
Other systems that connect to Mailchimp
Connect Xero and Mailchimp
Free to use. Add your credentials, ping your real systems, and see if we fit.
Get started