Mailchimp
Manage audiences, add subscribers, and send campaigns in Mailchimp.
On this page
Connect
Auth type: OAuth (oauth2). Click Connect and approve access on the provider's page. Appbricx runs the OAuth flow (signed single-use state, PKCE where the provider supports it), stores the tokens encrypted and refreshes them before they expire.
OAuth needs an OAuth app: the platform's when the operator configured one, or your own (admin panel, Integrations, Configure). You can also bring your own credentials.
- In the editor: Backend panel, Integrations tab, then Connect. This connects it for the project.
- For every project in a workspace: Workspace settings, Integrations.
- Owners and admins choose which integrations members may connect in the admin panel (Integrations tab), and can attach their own OAuth app there.
Call it from a workflow
Pass the action name and its input. The call resolves with { success, output, error? }; a missing connection resolves with success false and the reason. See ctx.integrations.invoke and ctx.integrations.call.
// .workflow.js (native ctx)
export async function run(ctx) {
const res = await ctx.integrations.invoke("mailchimp", "add_member_to_list", {
"list_id": "<list_id>",
"email_address": "<email address>",
"status_if_new": "subscribed"
});
if (!res.success) throw new Error(res.error);
ctx.log.info("Mailchimp answered", { output: res.output });
}// defineWorkflow module (@app/sdk ctx)
import { defineWorkflow } from "@app/sdk";
export default defineWorkflow({
id: "mailchimp-add-member-to-list",
name: "Mailchimp: Add or Update Subscriber",
description: "Calls Mailchimp when a row is created.",
trigger: { type: "entity_event", entity: "tickets", event: "created" },
async run(ctx, event) {
const res = await ctx.integrations.call("mailchimp", {
"action": "add_member_to_list",
"list_id": "<list_id>",
"email_address": "<email address>",
"status_if_new": "subscribed"
}) as { success: boolean; error?: string };
if (!res.success) throw new Error(res.error);
},
});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_listin catalog
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_audiencein catalog
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_campaignin catalog
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- Tier
- Built in