Mailchimp
Manage audiences, add subscribers, and send campaigns in Mailchimp.
On this page
Connect
Auth type: OAuth (oauth2). The connection holds the provider's OAuth tokens. They are sealed on the server and only opened when an action runs.
- From your agent: integrations {action: "connect", piece, credentials, env} stores the credentials for dev, prod or all. Answers name the fields, never the values.
- Or set the integration's project secrets with the secrets tool (SLACK_BOT_TOKEN, DISCORD_WEBHOOK_URL, TELEGRAM_BOT_TOKEN, TWILIO_ACCOUNT_SID and TWILIO_AUTH_TOKEN …): a call uses the connection, else those secrets. integrations {action: "catalog", piece} lists which ones work.
- Try one action now with integrations {action: "call", piece, piece_action, input}. It really sends.
Call it from a workflow
step.ctx.integrations.invoke("mailchimp", action, input) resolves with the provider's answer and rejects when Mailchimp isn't connected or refuses. Wrap it in step.run so a retry sends once. See step.ctx. Its actions run through the integration runner, which the server's operator turns on: integrations {action: "catalog", piece: "mailchimp"} says whether yours can call it.
// workflows/notify.ts: call Mailchimp when a booking is confirmed
import { on } from "@appbricx/workflows";
export const tellMailchimp = on.transition("booking", "status", "confirmed", async (_event, step) => {
// Recorded once: a retry doesn't send it twice. Rejects when Mailchimp isn't connected.
const output = await step.run("Mailchimp", () =>
step.ctx.integrations.invoke("mailchimp", "add_member_to_list", {
"list_id": "<list_id>",
"email_address": "<email address>",
"status_if_new": "subscribed"
}),
);
step.ctx.log("Mailchimp answered", output);
});{
"name": "integrations",
"arguments": {
"project_id": "<project-id>",
"action": "call",
"piece": "mailchimp",
"piece_action": "add_member_to_list",
"input": {
"list_id": "<list_id>",
"email_address": "<email address>",
"status_if_new": "subscribed"
},
"env": "dev"
}
}curl -X POST "$APP_ORIGIN/__appbricx/connector-proxy/mailchimp/add_member_to_list" \
-H "Authorization: Bearer $APP_KEY" \
-H "content-type: application/json" \
-d '{"props":{"list_id":"<list_id>","email_address":"<email address>","status_if_new":"subscribed"}}'Actions
add_member_to_list
Add or Update Subscriber. Add a new subscriber to an audience or update existing subscriber
| Input | Type | Description |
|---|---|---|
list_idrequired | id (picked from your account) | Audience you want to add the contact to |
email_addressrequired | text | Email address for the subscriber |
status_if_newrequired | one of "subscribed" | "unsubscribed" | "cleaned" | "pending" | "transactional" | Status for new subscribers |
email_typeoptional | one of "html" | "text" | Type of email this member wants to receive |
statusoptional | one of "subscribed" | "unsubscribed" | "cleaned" | "pending" | "transactional" | Current status of subscriber (for updates) |
first_nameoptional | text | First name of the subscriber |
last_nameoptional | text | Last name of the subscriber |
languageoptional | text | Subscriber language (e.g., "en", "es", "fr") |
vipoptional | boolean | VIP status for subscriber |
skip_merge_validationoptional | boolean | Accept member data without merge field values even if required |
create_audience
Create Audience. Create a new audience (list) in your Mailchimp account
| Input | Type | Description |
|---|---|---|
namerequired | text | The name of the list |
companyrequired | text | Company name for list contact information |
address1required | text | Street address for list contact information |
address2optional | text | Additional address information (optional) |
cityrequired | text | City for list contact information |
stateoptional | text | State or province for list contact information |
zipoptional | text | ZIP or postal code for list contact information |
countryrequired | text | Country for list contact information |
phoneoptional | text | Phone number for list contact information (optional) |
permission_reminderrequired | long text | The permission reminder for the list |
from_namerequired | text | Default from name for campaigns |
from_emailrequired | text | Default from email address for campaigns |
subjectrequired | text | Default subject line for campaigns |
languagerequired | text | Default language for campaigns (e.g., "en", "es", "fr") |
email_type_optionoptional | boolean | Whether the list supports multiple email formats (HTML/plain text) |
use_archive_baroptional | boolean | Whether campaigns use the Archive Bar in archives by default |
notify_on_subscribeoptional | text | Email address to send subscribe notifications to (optional) |
notify_on_unsubscribeoptional | text | Email address to send unsubscribe notifications to (optional) |
double_optinoptional | boolean | Whether to require subscriber confirmation via email |
marketing_permissionsoptional | boolean | Whether the list has marketing permissions (GDPR) enabled |
create_campaign
Create Campaign. Create a new Mailchimp campaign
| Input | Type | Description |
|---|---|---|
campaign_typerequired | one of "regular" | "plaintext" | "ab" | "rss" | "variate" | The type of campaign to create |
list_idrequired | id (picked from your account) | Audience you want to add the contact to |
subject_linerequired | text | The subject line for the campaign |
titlerequired | text | The title of the campaign |
from_namerequired | text | The name that will appear in the "From" field |
from_emailrequired | text | The email address that will appear in the "From" field |
reply_torequired | text | The email address that will receive replies |
to_nameoptional | text | The name that will appear in the "To" field (e.g., *|FNAME|*) |
content_typerequired | one of "template" | "html" | "url" | "multichannel" | How the campaign content is put together |
content_urloptional | text | The URL where the campaign content is hosted (required if content_type is "url") |
template_idoptional | text | The ID of the template to use (required if content_type is "template") |
html_contentoptional | long text | The HTML content for the campaign (required if content_type is "html") |
add_note_to_subscriber
Add Note to Subscriber. Add a note to a subscriber in your Mailchimp audience.
| Input | Type | Description |
|---|---|---|
list_idrequired | id (picked from your account) | Audience you want to add the contact to |
emailrequired | text | The email address of the subscriber to add a note to |
noterequired | long text | The note content to add to the subscriber |
add_subscriber_to_tag
Add Subscriber to Tag. Add a subscriber to a specific tag in your Mailchimp audience.
| Input | Type | Description |
|---|---|---|
list_idrequired | id (picked from your account) | Audience you want to add the contact to |
emailrequired | text | The email address of the subscriber to add to the tag |
tag_namerequired | text | The name of the tag to add the subscriber to |
archive_subscriber
Archive Subscriber. Archive an existing audience member
| Input | Type | Description |
|---|---|---|
list_idrequired | id (picked from your account) | Audience you want to add the contact to |
subscriber_hashrequired | text | MD5 hash of the lowercase email address, email address, or contact_id |
find_campaign
Find Campaign. Search all campaigns for the specified query terms
| Input | Type | Description |
|---|---|---|
queryrequired | text | Search terms to find campaigns |
fieldsoptional | long text | Comma-separated list of fields to return |
exclude_fieldsoptional | long text | Comma-separated list of fields to exclude |
find_customer
Find Customer. Find a customer by email address in a store
| Input | Type | Description |
|---|---|---|
store_idrequired | id (picked from your account) | Select the e-commerce store |
email_addressrequired | text | Email address to search for |
fieldsoptional | long text | Comma-separated list of fields to return |
exclude_fieldsoptional | long text | Comma-separated list of fields to exclude |
countoptional | number | Number of records to return (max 1000) |
offsetoptional | number | Number of records to skip for pagination |
find_subscriber
Find Subscriber. Search for subscribers across all lists or within a specific list. This action provides comprehensive subscriber information including merge fields, interests, and activity data.
| Input | Type | Description |
|---|---|---|
list_idrequired | id (picked from your account) | Audience you want to add the contact to |
emailrequired | text | Email address of the subscriber to search for |
include_fieldsoptional | array | Fields to include in the response (leave empty for all fields). Use dot notation for nested fields (e.g., "merge_fields.FNAME") |
exclude_fieldsoptional | array | Fields to exclude from the response. Use dot notation for nested fields |
find_tag
Find Tag. Search for tags on a list by name
| Input | Type | Description |
|---|---|---|
list_idrequired | id (picked from your account) | Audience you want to add the contact to |
nameoptional | text | Search query to filter tags (optional - if empty, returns all tags) |
get_campaign_report
Get Campaign Report. Get comprehensive report details for a specific sent campaign including opens, clicks, bounces, and performance metrics
| Input | Type | Description |
|---|---|---|
campaign_idrequired | id (picked from your account) | Select the campaign to get information for |
fieldsoptional | long text | Comma-separated list of fields to return (e.g., "opens.unique_opens,clicks.click_rate") |
exclude_fieldsoptional | long text | Comma-separated list of fields to exclude (e.g., "timeseries,_links") |
remove_subscriber_from_tag
Remove Subscriber from Tag. Remove a subscriber from a specific tag in your Mailchimp audience.
| Input | Type | Description |
|---|---|---|
list_idrequired | id (picked from your account) | Audience you want to add the contact to |
emailrequired | text | The email address of the subscriber to remove from the tag |
tag_namerequired | text | The name of the tag to remove the subscriber from |
unsubscribe_email
Unsubscribe Email. Unsubscribe an email address from an audience
| Input | Type | Description |
|---|---|---|
list_idrequired | id (picked from your account) | Audience you want to add the contact to |
email_addressrequired | text | Email address to unsubscribe |
skip_merge_validationoptional | boolean | Accept member data without merge field values even if required |
skip_duplicate_checkoptional | boolean | Ignore duplicates in the request |
update_existingoptional | boolean | Change existing members subscription status |
update_member_in_list
Update Member in an Audience (List). Update a member in an existing Mailchimp audience (list)
| Input | Type | Description |
|---|---|---|
emailrequired | text | Email of the new contact |
list_idrequired | id (picked from your account) | Audience you want to add the contact to |
statusrequired | one of "subscribed" | "unsubscribed" | "cleaned" | "pending" | "transactional" | Status |
Details
- Id
mailchimp- Category
- Marketing
- Tags
- email, newsletter, campaigns, audiences
- Package
@activepieces/piece-mailchimp@0.5.3- Runs
- Through the integration runner