Mailchimp
Description
Section titled “Description”This module provides a complete integration with Mailchimp Marketing API v3.0. Operations are organized into the following categories:
- Audiences/Lists: List, create, get, update and delete audiences.
- Subscribers/Members: List, add, get, update, add/update (upsert), archive and permanently delete subscribers. Supports merge fields (FNAME, LNAME, custom fields) and tags.
- Tags: List tags for a list, add and remove tags from a member, get member tags.
- Campaigns: List, create, get, update, delete, send, schedule, unschedule, pause, resume, replicate and send test email. Manage campaign content.
- Templates: List, get, create, update and delete templates.
- Segments: List, create, get, update, delete segments. Add and remove members from segments.
- Merge Fields: List, create, update and delete custom fields.
- Reports: Get campaign report, click details, opens, unsubscribes and bounces.
- Automations: List, get, pause, start automations and add subscribers.
- Account: Get account info and connectivity ping.
- Batch: Bulk member subscription with option to update existing ones.
The Mailchimp API key contains the datacenter (format: xxxxx-dc), which is automatically extracted to build the base URL.
Configuration
Section titled “Configuration”| Parameter | Type | Required | Description |
|---|---|---|---|
| credentials_id | credentials | Yes | Mailchimp credentials |
| operation | select | Yes | Operation to perform (getLists, addMember, sendCampaign, etc.) |
Common parameters per operation:
| Parameter | Type | Required | Description |
|---|---|---|---|
| listId | text | Depends on operation | Audience/list ID |
| text | Depends on operation | Subscriber email | |
| firstName | text | No | First name (merge field FNAME) |
| lastName | text | No | Last name (merge field LNAME) |
| status | text | No | Status: subscribed, unsubscribed, cleaned, pending |
| tags | text | No | Tags separated by comma |
| mergeFields | text | No | Additional fields in JSON |
| campaignId | text | Depends on operation | Campaign ID |
| subjectLine | text | Depends on operation | Campaign subject line |
| fromName | text | Depends on operation | Sender name |
| replyTo | text | Depends on operation | Reply-to email |
| count | text | No | Number of results (default: 100) |
| offset | text | No | Offset for pagination |
Credentials
Section titled “Credentials”Requires Mailchimp type credentials with:
- apiKey: Mailchimp API Key (format:
xxxxx-usXXwhere usXX is the datacenter) - Authentication is done via Basic Auth with the API key
Output
Section titled “Output”{ "lists": [ { "id": "abc123def4", "name": "Mi Audiencia Principal", "stats": { "member_count": 1500 } } ]}Usage Example
Section titled “Usage Example”Basic case - Add subscriber
Section titled “Basic case - Add subscriber”{ "credentials_id": "mi-mailchimp", "operation": "addMember", "listId": "abc123def4", "email": "nuevo@cliente.com", "firstName": "Juan", "lastName": "Garcia", "status": "subscribed", "tags": "cliente-nuevo,web"}API Used
Section titled “API Used”- Mailchimp Marketing API v3.0 (
https://{dc}.api.mailchimp.com/3.0)
- The subscriber email is hashed with MD5 internally (Mailchimp API requirement)
- The
addOrUpdateMember(upsert) operation is ideal to avoid errors with existing subscribers - When creating campaigns, a segment can be specified with
segmentId - Custom merge fields are passed as JSON in the
mergeFieldsfield - The
batchSubscribeoperation allows bulk subscription by passing a JSON array of members - API errors are captured and reported with Mailchimp detail
Related Nodes
Section titled “Related Nodes”- Mailchimp List Audiences (sub-node)
- Other sub-nodes for each available operation