Mailchimp Block
Manage audiences and members in Mailchimp
Add members to an audience, list members, and get audience details through the Mailchimp Marketing API. Authenticate with a Mailchimp API key and data center.
Overview
| Property | Value |
|---|---|
| Type | mailchimp |
| Category | tools |
| Color | #FFE01B |
When to Use
- Subscribe a new user to a mailing list after they sign up or complete a form
- Fetch all members of an audience to audit, sync, or process them in downstream blocks
- Retrieve audience (list) metadata such as name, member count, and campaign defaults
- Automate email list growth by wiring a trigger block directly into this block
- Pass a dynamically computed email address from an earlier block into the subscriber field
- Inspect list configuration before sending a campaign to confirm the audience is correct
Configuration
Operation
Type: dropdown | Required: yes (defaults to mailchimp_add_member)
Selects which Mailchimp API action to execute. Every operation requires listId, dc, and apiKey.
| Label | ID | Required fields beyond the shared ones |
|---|---|---|
| Add member | mailchimp_add_member | email |
| List members | mailchimp_list_members | — |
| Get list | mailchimp_get_list | — |
List ID
Type: short-input | Required: when any operation is selected
The Mailchimp audience (list) ID. Visible for all three operations. Find it in your Mailchimp account under Audience > All contacts > Settings > Audience name and defaults.
Placeholder: Audience ID
Type: short-input | Required: for mailchimp_add_member only
The email address of the subscriber to add. Hidden when the operation is mailchimp_list_members or mailchimp_get_list.
Placeholder: subscriber@example.com
Data Center
Type: short-input | Required: yes (all operations)
The Mailchimp data center prefix for your account (e.g. us21). This is the suffix of your Mailchimp API key, after the final hyphen.
Placeholder: us21
Mailchimp API Key
Type: short-input (password) | Required: yes (all operations)
Your Mailchimp Marketing API key. Stored as a secret; use {{MAILCHIMP_API_KEY}} to reference an environment variable, or paste the key directly.
Placeholder: ...-us21
Inputs & Outputs
Inputs:
operation(string) — Operation to perform (mailchimp_add_member,mailchimp_list_members, ormailchimp_get_list)apiKey(string) — Mailchimp API keydc(string) — Mailchimp data center (e.g.us21)listId(string) — Audience (list) IDemail(string) — Subscriber email (required formailchimp_add_memberonly)
Outputs:
data(json) — Result object or array from Mailchimp. Formailchimp_add_memberandmailchimp_get_listthis is the Mailchimp object; formailchimp_list_membersthis is an array of member objects.metadata(json) — Response metadata. Containsid(string) for add-member and get-list operations; containscount(number) for list-members.
Tools
- Mailchimp Add Member (
mailchimp_add_member) — POSTs tohttps://{dc}.api.mailchimp.com/3.0/lists/{listId}/memberswithstatus: subscribed. Required params:apiKey,dc,listId,email. Returns the created member object andmetadata.id. - Mailchimp List Members (
mailchimp_list_members) — GETs all members fromhttps://{dc}.api.mailchimp.com/3.0/lists/{listId}/members. Required params:apiKey,dc,listId. Returns an array of member objects andmetadata.count. - Mailchimp Get List (
mailchimp_get_list) — GETs audience details fromhttps://{dc}.api.mailchimp.com/3.0/lists/{listId}. Required params:apiKey,dc,listId. Returns the list object andmetadata.id.
YAML Example
mailchimp_1:
type: mailchimp
name: "Add Subscriber"
inputs:
operation: "mailchimp_add_member"
apiKey: "{{MAILCHIMP_API_KEY}}"
dc: "us21"
listId: "{{form_block.audienceId}}"
email: "{{form_block.email}}"
connections:
outgoing:
- target: next-block-id