Mailchimp¶
Mailchimp is an all-in-one marketing platform that helps businesses manage and talk to their clients, customers, and other interested parties through email marketing campaigns, automated messages, and targeted ads.
omniload supports Mailchimp as a source.
URI format¶
The URI format for Mailchimp is as follows:
mailchimp://?api_key=<api-key>&server=<server-prefix>
URI parameters:
api_key: The API key used for authentication with the Mailchimp APIserver: The server prefix for your Mailchimp account (e.g.,us10,us19)
The URI is used to connect to the Mailchimp API for extracting data.
Setting up a Mailchimp Integration¶
To get your Mailchimp API credentials:
Log in to your Mailchimp account
Navigate to Account → Extras → API keys
Create a new API key or use an existing one
Note your server prefix from your API key (the part after the dash, e.g.,
us10fromxxxxx-us10)
Once you have your credentials, here’s a sample command that will copy the data from Mailchimp into a DuckDB database:
omniload ingest --source-uri 'mailchimp://?api_key=your_api_key&server=us10' --source-table 'campaigns' --dest-uri duckdb:///mailchimp.duckdb --dest-table 'mailchimp.campaigns'
The result of this command will be a table in the mailchimp.duckdb database.
Tables¶
Mailchimp source allows ingesting the following sources into separate tables:
Table |
PK |
Inc Key |
Inc Strategy |
Details |
|---|---|---|---|---|
- |
- |
replace |
Retrieves account information including company details, account tier, and contact information. |
|
- |
- |
replace |
Retrieves account export information. |
|
id |
date_created |
merge |
Retrieves audience (list) information including subscriber counts and list settings. |
|
id |
- |
replace |
Retrieves third-party applications authorized to access your account. |
|
id |
create_time |
merge |
Retrieves automated email workflows and their configurations. |
|
- |
- |
replace |
Retrieves batch operation status and results. |
|
id |
- |
replace |
Retrieves folders used to organize campaigns. |
|
id |
create_time |
merge |
Retrieves email campaigns including their content, settings, and metadata. |
|
- |
- |
replace |
Retrieves recent activity feed from your Mailchimp account. |
|
id |
updated_at |
merge |
Retrieves websites connected to your Mailchimp account. |
|
id |
last_message.timestamp |
merge |
Retrieves conversation threads from connected channels. |
|
id |
updated_at |
merge |
Retrieves e-commerce store information including products and orders. |
|
id |
updated_at |
merge |
Retrieves Facebook ad campaigns managed through Mailchimp. |
|
id |
updated_at |
merge |
Retrieves landing pages created in Mailchimp. |
|
lists_activity |
- |
- |
replace |
Retrieves recent activity for list members. Includes |
lists_clients |
- |
- |
replace |
Retrieves email clients used by list members. Includes |
lists_growth_history |
- |
- |
replace |
Retrieves historical growth data for the list. Includes |
lists_interest_categories |
- |
- |
replace |
Retrieves interest categories (groups) for the list. Includes |
lists_locations |
- |
- |
replace |
Retrieves geographic locations of list members. Includes |
lists_merge_fields |
- |
- |
replace |
Retrieves custom merge fields defined for the list. Includes |
lists_segments |
- |
- |
replace |
Retrieves segments (filtered subsets) of the list. Includes |
id |
send_time |
merge |
Retrieves campaign performance reports and analytics. |
|
reports_advice |
- |
- |
replace |
Retrieves feedback and suggestions for improving campaign performance. Includes |
reports_domain_performance |
- |
- |
replace |
Retrieves email performance broken down by email domain. Includes |
reports_locations |
- |
- |
replace |
Retrieves geographic location data for campaign opens. Includes |
reports_sent_to |
- |
- |
replace |
Retrieves list of recipients who were sent the campaign. Includes |
reports_sub_reports |
- |
- |
replace |
Retrieves sub-reports for A/B test campaigns. Includes |
reports_unsubscribed |
- |
- |
replace |
Retrieves list of members who unsubscribed from the campaign. Includes |
Use these as --source-table parameter in the omniload ingest command.
Examples¶
Ingesting Campaign Data¶
omniload ingest \
--source-uri 'mailchimp://?api_key=your_api_key&server=us10' \
--source-table 'campaigns' \
--dest-uri duckdb:///mailchimp.duckdb \
--dest-table 'mailchimp.campaigns'
The reports_advice table will include a reports_id column that references the parent campaign report.
The lists_segments table will include an audiences_id column that references the parent audience/list.
Notes¶
[!NOTE] Nested resources (e.g.,
reports_advice,lists_segments) automatically include a reference to their parent resource through an ID column (reports_idoraudiences_id).