Mailchimp
Connect & Ingest data from Mailchimp
Mailchimp is an email marketing platform that helps businesses manage subscriber lists, create and send campaigns, and analyze email marketing performance. The Sling Mailchimp connector extracts data from the Mailchimp Marketing API, supporting audiences, campaigns, automations, member data, segments, and analytics.
Setup
The following credentials and inputs are accepted:
Secrets:
api_key(required) -> Your Mailchimp API key
Inputs:
server_prefix(required) -> Your Mailchimp datacenter server prefix (e.g.,us4,us5,us6,us13, etc.)
Getting Your API Key
Log in to your Mailchimp account
Click on your profile icon in the bottom left corner
Select Account or go to Account > Extras > API keys
Scroll down to the Your API Keys section
Click Create A Key to generate a new API key
Copy the API key (it looks like:
abc123def456abc123def456abc123def456ab12-us4)
The API key itself contains your server prefix. For example:
abc123-us4means your server prefix isus4abc123-us13means your server prefix isus13
Using sling conns
Environment Variable
See here to learn more about the .env.sling file.
Sling Env File YAML
See here to learn more about the sling env.yaml file.
Replication
Here's an example replication configuration to sync Mailchimp data to a PostgreSQL database:
Incremental sync example:
Full refresh example:
Endpoints
Audience Management
lists
Email lists/audiences
No
list_members
Members in each audience
Yes
segments
Audience segments
Yes
segment_members
Members in each segment (child of segments)
No
interest_categories
Interest categories in audiences (child of lists)
No
interests
Interests within categories (child of interest_categories)
No
tags
Tags applied to audiences (child of lists)
No
Campaign Management
campaigns
Email campaigns
Yes
unsubscribes
Unsubscribe events from campaigns (child of campaigns)
No
email_activity
Email activity (opens, clicks, etc.) for campaigns (child of campaigns)
No
Automation
automations
Automation workflows
No
Analytics
reports
Campaign performance reports
Yes
To discover available endpoints:
Parent-Child Endpoints
Some endpoints are children of parent endpoints and require the parent to run first:
list_members -> Requires
liststo run first (iterates through each list)segments -> Requires
liststo run firstsegment_members -> Requires
segmentsto run firstinterest_categories -> Requires
liststo run firstinterests -> Requires
interest_categoriesto run firsttags -> Requires
liststo run firstunsubscribes -> Requires
campaignsto run firstemail_activity -> Requires
campaignsto run first
Incremental Sync
The Mailchimp connector supports time-based incremental sync for the following endpoints:
campaigns - Syncs new campaigns by
create_timelist_members - Syncs new/modified members by
last_changedsegments - Syncs new/modified segments by
updated_atreports - Syncs new campaign reports by
send_time
How it works
First run: Fetches all records from the beginning
Subsequent runs: Only fetches records created or modified after the last sync timestamp
Rate Limiting
The Mailchimp API has rate limits that vary by account type:
Free/Standard: 10 requests/second
Premium: 10 requests/second
The connector automatically:
Uses conservative rate limiting (5 requests/second)
Retries with exponential backoff on 429 (rate limit) responses
Common Use Cases
Sync Campaign Performance Analytics
Sync Audience and Subscriber Data
Sync Audience Structure and Configuration
Sync All Mailchimp Data
If you are facing issues connecting, please reach out to us at support@slingdata.io, on discord or open a Github Issue here.
Last updated
Was this helpful?