Mailchimp Connector

Connect your Mailchimp account to Brevo via Tajo for seamless audience migration, campaign data synchronization, and unified marketing automation across both platforms.

Overview

PropertyValue
PlatformMailchimp
CategoryMarketing
Setup ComplexityEasy
Official IntegrationYes
Data SyncedContacts, Campaigns, Automations, Events
API Base URLhttps://{dc}.api.mailchimp.com/3.0

Features

  • Audience sync - Migrate and sync Mailchimp audiences with Brevo contact lists
  • Campaign data - Sync campaign performance data for unified reporting
  • Automation migration - Map Mailchimp automations to Brevo workflows
  • Engagement metrics - Sync opens, clicks, and bounce data to Brevo attributes
  • Segment mapping - Replicate Mailchimp segments as Brevo lists or segments
  • E-commerce data - Sync store, product, and order data from Mailchimp e-commerce
  • Tag sync - Map Mailchimp tags to Brevo contact attributes or lists
  • Template migration - Export Mailchimp templates for use in Brevo campaigns

Prerequisites

Before you begin, ensure you have:

  1. A Mailchimp account (Free, Essentials, Standard, or Premium)
  2. A Mailchimp API key or OAuth app
  3. A Brevo account with API access
  4. A Tajo account

Authentication

API Key Authentication

Generate an API key from Mailchimp Account > Extras > API Keys.

Terminal window
curl https://{dc}.api.mailchimp.com/3.0/ping \
--user "anystring:{api_key}" \
-H "Content-Type: application/json"

The {dc} data center prefix is the last part of your API key (e.g., us21).

OAuth 2.0

For multi-account integrations:

Terminal window
# Authorization URL
https://login.mailchimp.com/oauth2/authorize?
response_type=code&
client_id={client_id}&
redirect_uri={redirect_uri}
# Token exchange
curl -X POST https://login.mailchimp.com/oauth2/token \
-d "grant_type=authorization_code" \
-d "client_id={client_id}" \
-d "client_secret={client_secret}" \
-d "redirect_uri={redirect_uri}" \
-d "code={auth_code}"

Data Center

Always extract the data center from your API key or OAuth metadata endpoint. Using the wrong data center will result in authentication failures.

Configuration

Basic Setup

connectors:
mailchimp:
enabled: true
api_key: "${MAILCHIMP_API_KEY}"
data_center: "us21"
# Data sync options
sync:
audiences: true
campaigns: true
automations: true
ecommerce: true
# Audience to Brevo list mapping
audience_mapping:
"Main Audience": 40
"Newsletter": 41
"Customers": 42

Field Mapping

Map Mailchimp merge fields to Brevo contact attributes:

Default Mappings

Parameter Type Description
email_address required
string

Subscriber email (unique identifier)

FNAME optional
string

First name merge field, maps to FIRSTNAME

LNAME optional
string

Last name merge field, maps to LASTNAME

PHONE optional
string

Phone merge field, maps to SMS

status optional
string

Subscription status (subscribed, unsubscribed, cleaned, pending)

tags optional
array

Subscriber tags for segmentation

stats.avg_open_rate optional
number

Average email open rate

stats.avg_click_rate optional
number

Average email click rate

Custom Merge Field Mapping

field_mapping:
# Standard fields
email_address: email
FNAME: FIRSTNAME
LNAME: LASTNAME
PHONE: SMS
# Engagement metrics
stats.avg_open_rate: AVG_OPEN_RATE
stats.avg_click_rate: AVG_CLICK_RATE
member_rating: ENGAGEMENT_SCORE
# E-commerce fields
ecommerce_data.total_revenue: TOTAL_REVENUE
ecommerce_data.number_of_orders: ORDER_COUNT
# Custom merge fields
MMERGE5: COMPANY_NAME
MMERGE6: CUSTOMER_TYPE

API Endpoints

Audiences (Lists)

MethodEndpointDescription
GET/3.0/listsList all audiences
GET/3.0/lists/{list_id}Get audience details
GET/3.0/lists/{list_id}/membersList audience members
POST/3.0/lists/{list_id}/membersAdd a member
PUT/3.0/lists/{list_id}/members/{hash}Update a member
POST/3.0/lists/{list_id}Batch subscribe/unsubscribe

Campaigns

MethodEndpointDescription
GET/3.0/campaignsList campaigns
GET/3.0/campaigns/{id}Get campaign details
GET/3.0/reports/{id}Get campaign report
GET/3.0/reports/{id}/email-activityGet email activity

Automations

MethodEndpointDescription
GET/3.0/automationsList automations
GET/3.0/automations/{id}Get automation details
GET/3.0/automations/{id}/emailsList automation emails

E-commerce

MethodEndpointDescription
GET/3.0/ecommerce/storesList connected stores
GET/3.0/ecommerce/stores/{id}/customersList store customers
GET/3.0/ecommerce/stores/{id}/ordersList store orders
GET/3.0/ecommerce/stores/{id}/productsList store products

Events

Campaign Events

EventTriggerUse Case
campaign.sentCampaign deliveredPerformance tracking
campaign.openedEmail openedEngagement scoring
campaign.clickedLink clickedInterest tracking
campaign.bouncedEmail bouncedList hygiene

Subscriber Events

EventTriggerUse Case
subscribeNew subscriber addedWelcome flow
unsubscribeSubscriber opted outPreference management
profileProfile updatedAttribute sync
cleanedEmail cleaned (bounced)List maintenance

E-commerce Events

EventTriggerUse Case
ecommerce.orderOrder placedPost-purchase flow
ecommerce.cartCart updatedAbandoned cart recovery

Code Examples

Initialize Connector

import { TajoClient } from '@tajo/sdk';
const tajo = new TajoClient({
apiKey: process.env.TAJO_API_KEY,
brevoApiKey: process.env.BREVO_API_KEY
});
// Connect Mailchimp
await tajo.connectors.connect('mailchimp', {
apiKey: process.env.MAILCHIMP_API_KEY
});

Migrate Audiences to Brevo

// Full audience migration from Mailchimp to Brevo
await tajo.connectors.sync('mailchimp', {
type: 'full',
resources: ['audiences', 'campaigns', 'ecommerce'],
options: {
preserveTags: true,
migrateSegments: true,
includeUnsubscribed: false
}
});
// Check migration status
const status = await tajo.connectors.status('mailchimp');
console.log(status);
// {
// connected: true,
// lastSync: '2024-01-15T10:30:00Z',
// contactsMigrated: 52000,
// campaignsSynced: 245,
// segmentsMapped: 18
// }

Sync Campaign Engagement Data

// Sync campaign performance to Brevo attributes
await tajo.connectors.sync('mailchimp', {
type: 'incremental',
resources: ['campaigns'],
options: {
syncEngagement: true,
updateContactMetrics: true,
since: '2024-01-01'
}
});

Rate Limits

Mailchimp Marketing API rate limits:

TypeLimitDetails
Standard10 concurrent requestsPer API key
Batch operations500 operations per batchPer request
Export limit1 concurrent exportPer account
Transactional25 requests/secondPer API key

Rate Limit Strategy

Mailchimp limits concurrent connections rather than requests per second. Use batch endpoints and implement retry logic with exponential backoff on 429 responses.

Troubleshooting

Common Issues

IssueCauseSolution
401 UnauthorizedInvalid API key or wrong data centerVerify API key and extract correct dc prefix
Member existsEmail already in audienceUse PUT instead of POST to update existing members
Compliance stateGDPR deletion prevents re-addContact must re-subscribe through a signup form
Batch timeoutLarge batch operationSplit into smaller batches of 500 operations
Missing merge fieldsCustom fields not createdCreate merge fields in Mailchimp before mapping

Debug Mode

Enable verbose logging:

connectors:
mailchimp:
debug: true
log_level: verbose
log_api_calls: true

Test Connection

Terminal window
tajo connectors test mailchimp
# ✓ API connection successful
# ✓ Audiences readable
# ✓ Campaigns readable
# ✓ E-commerce data accessible
# ✓ Webhook configured

Best Practices

  1. Use batch operations - Use batch subscribe/unsubscribe for bulk updates
  2. Preserve subscriber status - Respect subscription consent during migration
  3. Map merge fields first - Create corresponding Brevo attributes before syncing
  4. Sync engagement data - Import open/click rates for historical segmentation
  5. Handle compliance states - Respect GDPR and permanent deletion states
  6. Use incremental sync - Sync only changes since last sync to reduce API usage

Security

  • API Key Authentication - Secret key passed as HTTP Basic Auth password
  • OAuth 2.0 - Token-based authorization for multi-account access
  • TLS encryption - All API communication encrypted via HTTPS
  • Webhook verification - Validate webhook source with shared secret
  • Data center isolation - Data stored in region-specific data centers

Open-Source Implementation Map

This section is derived from official or public repository material discovered for the Mailchimp connector. Use it as the engineering companion to the setup guide above: it shows where the API surface lives, what implementation assets exist, and how Tajo should translate them into reliable Brevo sync behavior.

Repository Snapshot

RepositoryCommitLanguages / formatsFiles
mailchimp/mailchimp-client-lib-codegen69fce60mustache (394), JSON (20), YAML (13), Markdown (13), swagger-codegen-ignore (12), png (10)503

Integration Shape

graph LR
Source["Mailchimp API / repository"] --> Auth["Auth and scopes"]
Source --> Objects["Objects, events, and schemas"]
Auth --> Tajo["Tajo connector runtime"]
Objects --> Tajo
Tajo --> Brevo["Brevo contacts, attributes, lists, campaigns"]
Tajo --> Ops["Backfill, cursor, retries, logs"]

What To Reuse

  • mailchimp-client-lib-codegen
  • This tool is used to auto-generate and publish both Mailchimp Marketing and Transactional client libraries.
  • Quick start
  • Generate clients
  • Published clients — Internal

Tajo Revamp Checklist

  • Keep authentication setup aligned with the vendor docs and the public repository’s current API shape.
  • Map primary resources into explicit Tajo sync objects with stable external IDs.
  • Prefer cursor-based or updated-at incremental sync where the API exposes it; otherwise document the fallback.
  • Treat webhook handlers as idempotent and replay-safe, especially for order, contact, ticket, and campaign events.
  • Capture pagination, rate limits, retry headers, and partial-failure behavior in connector smoke tests.
  • Keep examples small and runnable against sandbox or test-mode accounts.

Sources

Subscribe to updates

developer-docs

Drop your email or phone number — we'll send you what matters next.

auto-detect
AI Assistant

Hi! Ask me anything about the docs.