Skip to content

Mailchimp

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.

ParameterTypeRequiredDescription
credentials_idcredentialsYesMailchimp credentials
operationselectYesOperation to perform (getLists, addMember, sendCampaign, etc.)

Common parameters per operation:

ParameterTypeRequiredDescription
listIdtextDepends on operationAudience/list ID
emailtextDepends on operationSubscriber email
firstNametextNoFirst name (merge field FNAME)
lastNametextNoLast name (merge field LNAME)
statustextNoStatus: subscribed, unsubscribed, cleaned, pending
tagstextNoTags separated by comma
mergeFieldstextNoAdditional fields in JSON
campaignIdtextDepends on operationCampaign ID
subjectLinetextDepends on operationCampaign subject line
fromNametextDepends on operationSender name
replyTotextDepends on operationReply-to email
counttextNoNumber of results (default: 100)
offsettextNoOffset for pagination

Requires Mailchimp type credentials with:

  • apiKey: Mailchimp API Key (format: xxxxx-usXX where usXX is the datacenter)
  • Authentication is done via Basic Auth with the API key
{
"lists": [
{
"id": "abc123def4",
"name": "Mi Audiencia Principal",
"stats": { "member_count": 1500 }
}
]
}
{
"credentials_id": "mi-mailchimp",
"operation": "addMember",
"listId": "abc123def4",
"email": "nuevo@cliente.com",
"firstName": "Juan",
"lastName": "Garcia",
"status": "subscribed",
"tags": "cliente-nuevo,web"
}
  • 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 mergeFields field
  • The batchSubscribe operation allows bulk subscription by passing a JSON array of members
  • API errors are captured and reported with Mailchimp detail
  • Mailchimp List Audiences (sub-node)
  • Other sub-nodes for each available operation