---
title: "Mailchimp Connector"
description: "Complete Mailchimp integration guide for syncing audiences, campaigns, automations, and engagement data with Brevo via Tajo."
url: https://tajo.io/docs/connectors/marketing/mailchimp/
markdown: https://tajo.io/docs/connectors/marketing/mailchimp.md
lang: en-US
robots: noindex
---

# Mailchimp Connector

Connector status: In progress Being built. Not verified yet.

| Source field | Destination field | Sample value |
| --- | --- | --- |
| `record.id` | `source_id` | `record_1042` |
| `record.updated_at` | `updated_at` | `2026-10-18T08:00:00Z` |
| `record.value` | `value` | `sample_value` |

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

## Overview

| Property | Value |
| --- | --- |
| **Platform** | Mailchimp |
| **Category** | Marketing |
| **Setup Complexity** | Easy |
| **Official Integration** | No |
| **Data Synced** | Contacts, Campaigns, Automations, Events |
| **API Base URL** | `https://{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.

```bash
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:

```bash
# 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

```yaml
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

```yaml
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)

| Method | Endpoint | Description |
| --- | --- | --- |
| `GET` | `/3.0/lists` | List all audiences |
| `GET` | `/3.0/lists/{list_id}` | Get audience details |
| `GET` | `/3.0/lists/{list_id}/members` | List audience members |
| `POST` | `/3.0/lists/{list_id}/members` | Add a member |
| `PUT` | `/3.0/lists/{list_id}/members/{hash}` | Update a member |
| `POST` | `/3.0/lists/{list_id}` | Batch subscribe/unsubscribe |

### Campaigns

| Method | Endpoint | Description |
| --- | --- | --- |
| `GET` | `/3.0/campaigns` | List campaigns |
| `GET` | `/3.0/campaigns/{id}` | Get campaign details |
| `GET` | `/3.0/reports/{id}` | Get campaign report |
| `GET` | `/3.0/reports/{id}/email-activity` | Get email activity |

### Automations

| Method | Endpoint | Description |
| --- | --- | --- |
| `GET` | `/3.0/automations` | List automations |
| `GET` | `/3.0/automations/{id}` | Get automation details |
| `GET` | `/3.0/automations/{id}/emails` | List automation emails |

### E-commerce

| Method | Endpoint | Description |
| --- | --- | --- |
| `GET` | `/3.0/ecommerce/stores` | List connected stores |
| `GET` | `/3.0/ecommerce/stores/{id}/customers` | List store customers |
| `GET` | `/3.0/ecommerce/stores/{id}/orders` | List store orders |
| `GET` | `/3.0/ecommerce/stores/{id}/products` | List store products |

## Events

### Campaign Events

| Event | Trigger | Use Case |
| --- | --- | --- |
| `campaign.sent` | Campaign delivered | Performance tracking |
| `campaign.opened` | Email opened | Engagement scoring |
| `campaign.clicked` | Link clicked | Interest tracking |
| `campaign.bounced` | Email bounced | List hygiene |

### Subscriber Events

| Event | Trigger | Use Case |
| --- | --- | --- |
| `subscribe` | New subscriber added | Welcome flow |
| `unsubscribe` | Subscriber opted out | Preference management |
| `profile` | Profile updated | Attribute sync |
| `cleaned` | Email cleaned (bounced) | List maintenance |

### E-commerce Events

| Event | Trigger | Use Case |
| --- | --- | --- |
| `ecommerce.order` | Order placed | Post-purchase flow |
| `ecommerce.cart` | Cart updated | Abandoned cart recovery |

## Code Examples

### Initialize Connector

```javascript
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

```javascript
// 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

```javascript
// 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:

| Type | Limit | Details |
| --- | --- | --- |
| Standard | 10 concurrent requests | Per API key |
| Batch operations | 500 operations per batch | Per request |
| Export limit | 1 concurrent export | Per account |
| Transactional | 25 requests/second | Per 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

| Issue | Cause | Solution |
| --- | --- | --- |
| 401 Unauthorized | Invalid API key or wrong data center | Verify API key and extract correct `dc` prefix |
| Member exists | Email already in audience | Use PUT instead of POST to update existing members |
| Compliance state | GDPR deletion prevents re-add | Contact must re-subscribe through a signup form |
| Batch timeout | Large batch operation | Split into smaller batches of 500 operations |
| Missing merge fields | Custom fields not created | Create merge fields in Mailchimp before mapping |

### Debug Mode

Enable verbose logging:

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

### Test Connection

```bash
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

## Related Resources

- [Mailchimp Marketing API Reference](https://mailchimp.com/developer/marketing/api/)
- [Mailchimp API Guides](https://mailchimp.com/developer/marketing/guides/quick-start/)
- [Brevo Connector](https://tajo.io/docs/connectors/marketing/brevo)
- [ActiveCampaign Connector](https://tajo.io/docs/connectors/marketing/activecampaign)
- [Customer Sync Skill](https://tajo.io/docs/skills/data-sync/customer-sync)

## 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

| Repository | Commit | Languages / formats | Files |
| --- | --- | --- | --- |
| [mailchimp/mailchimp-client-lib-codegen](https://github.com/mailchimp/mailchimp-client-lib-codegen) | 69fce60 | mustache (394), JSON (20), YAML (13), Markdown (13), swagger-codegen-ignore (12), png (10) | 503 |

### Integration Shape

```mermaid
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

- [mailchimp/mailchimp-client-lib-codegen](https://github.com/mailchimp/mailchimp-client-lib-codegen)
- [Vendor documentation](https://mailchimp.com/developer/marketing/api/)
