CONNECT APP
Build with Mailchimp
Marketing
- OAuth
MCP
Give your agent Mailchimp tools
Every Mailchimp action is exposed as an MCP tool on Pipedream's remote server. Point a client at it with your end user's ID and Connect resolves that user's Mailchimp account for each tool call — you store no tokens.
// accessToken: mint a short-lived token with the Connect SDK — see the MCP guide
const transport = new StreamableHTTPClientTransport(
new URL("https://remote.mcp.pipedream.net/v3"),
{
requestInit: {
headers: {
Authorization: `Bearer ${accessToken}`,
"x-pd-project-id": "{project_id}",
"x-pd-environment": "production",
"x-pd-external-user-id": "{external_user_id}", // any stable ID for this user in your system
"x-pd-app-slug": "mailchimp",
},
},
},
)
const mcp = new Client({ name: "my-agent", version: "1.0.0" })
await mcp.connect(transport)
const { tools } = await mcp.listTools()
// e.g. run Add Member To Segment:
const result = await mcp.callTool({
name: "mailchimp-add-segment-member",
arguments: {
listId: "List Id",
segmentId: "Segment ID",
},
})# access_token: mint a short-lived token with the Connect SDK — see the MCP guide
headers = {
"Authorization": f"Bearer {access_token}",
"x-pd-project-id": "{project_id}",
"x-pd-environment": "production",
"x-pd-external-user-id": "{external_user_id}", # any stable ID for this user in your system
"x-pd-app-slug": "mailchimp",
}
async with streamablehttp_client("https://remote.mcp.pipedream.net/v3", headers=headers) as (read, write, _):
async with ClientSession(read, write) as session:
await session.initialize()
tools = await session.list_tools()
# e.g. run Add Member To Segment:
result = await session.call_tool("mailchimp-add-segment-member", {
"listId": "List Id",
"segmentId": "Segment ID",
})API PROXY
Call the Mailchimp API directly
For an endpoint with no pre-built tool, the Connect proxy forwards your request to the Mailchimp API with the connected user's credentials attached. You store no tokens and write no refresh logic.
const resp = await pd.proxy.get({
externalUserId: "{external_user_id}", // any stable ID for this user in your system
accountId: "apn_xxxxxxx",
url: "https://login.mailchimp.com/oauth2/metadata",
})
// Any allowed Mailchimp endpoint works here. Pipedream attaches the
// connected account's credentials to the outgoing request.# The path segment is the target URL, URL-safe base64 encoded:
# https://login.mailchimp.com/oauth2/metadata
curl "https://api.pipedream.com/v1/connect/{project_id}/proxy/aHR0cHM6Ly9sb2dpbi5tYWlsY2hpbXAuY29tL29hdXRoMi9tZXRhZGF0YQ?external_user_id={external_user_id}&account_id=apn_xxxxxxx" \
-H "Authorization: Bearer {access_token}" \
-H "x-pd-environment: production"SDK
Run Mailchimp actions from your backend
Connect a user's Mailchimp account once, then run Add Member To Segment on their behalf from your own code — TypeScript, Python, or plain HTTP.
import { PipedreamClient } from "@pipedream/sdk"
const pd = new PipedreamClient({
projectId: process.env.PIPEDREAM_PROJECT_ID!,
clientId: process.env.PIPEDREAM_CLIENT_ID!,
clientSecret: process.env.PIPEDREAM_CLIENT_SECRET!,
projectEnvironment: "production",
})
const result = await pd.actions.run({
id: "mailchimp-add-segment-member",
externalUserId: "{external_user_id}", // any stable ID for this user in your system
configuredProps: {
mailchimp: { authProvisionId: "apn_xxxxxxx" },
listId: "List Id",
segmentId: "Segment ID",
},
})from pipedream import Pipedream
pd = Pipedream(
client_id="{oauth_client_id}",
client_secret="{oauth_client_secret}",
project_id="{project_id}",
project_environment="production",
)
result = pd.actions.run(
id="mailchimp-add-segment-member",
external_user_id="{external_user_id}", # any stable ID for this user in your system
configured_props={
"mailchimp": {"authProvisionId": "apn_xxxxxxx"},
"listId": "List Id",
"segmentId": "Segment ID",
},
)curl -X POST https://api.pipedream.com/v1/connect/{project_id}/actions/run \
-H "Content-Type: application/json" \
-H "X-PD-Environment: production" \
-H "Authorization: Bearer {access_token}" \
-d '{
"external_user_id": "{external_user_id}",
"id": "mailchimp-add-segment-member",
"configured_props": {
"mailchimp": { "authProvisionId": "apn_xxxxxxx" },
"listId": "List Id",
"segmentId": "Segment ID"
}
}'TOOLS
Mailchimp actions
On-demand operations your product or agent can configure and run on behalf of a connected user.
-
Add Member To Segment
actionAdds a new member to a static segment. See docs hereWritev0.0.3 -
Add Note to Subscriber
actionAdds a new note to an existing subscriber. See docs hereWritev0.2.4 -
Add Or Remove Members Tags
actionAdd or remove member tags. See docs hereWritev0.0.3 -
Add or Update Subscriber
actionAdds a new subscriber to an audience or updates existing subscriber. See docs hereWritev0.2.5 -
Add Subscriber To Tag
actionAdds an email address to a tag within an audience. See docs hereWritev0.2.4 -
Create Campaign
actionCreates a new campaign draft. See docs hereWritev0.2.4 -
Create List
actionCreates a new list. See docs hereWritev0.0.3 -
Delete Campaign
actionDelete a specific campaign. See docs hereWritev0.0.3 -
Delete List
actionDeletes an existing list. See docs hereWritev0.0.3 -
Delete List Member
actionPermanently deletes a member. See docs hereWritev0.0.3 -
Edit A Campaign Template Content
actionEdits a defined content area of a custom HTML template. See docs hereWritev0.0.3 -
Get A Campaign Report
actionGets a campaign report. See docs hereRead-onlyv0.0.2 -
Get A Campaign Report
actionGets a campaign report. See docs hereRead-onlyv0.0.4 -
Get Campaign
actionGets metadata of a specific campaign. See docs hereRead-onlyv0.0.3 -
Get List
actionSearches for lists. See docs hereRead-onlyv0.0.3 -
Get List Activities
actionRetrieves up to the previous 180 days of daily detailed aggregated activity stats for a list. See docs hereRead-onlyv0.0.3 -
Get List Member Activities
actionGet the last 50 events of a member's activity on a specific list. See docs hereRead-onlyv0.0.4 -
Get List Member Tags
actionRetrieves a list of all member tags. See docs hereRead-onlyv0.0.3 -
List Audience List Id Options
actionRetrieves available options for the Audience List Id field.Read-onlyv0.0.1 -
List Campaign ID Options
actionRetrieves available options for the Campaign ID field.Read-onlyv0.0.1 -
List Segment Members
actionRetrieves a list of all segment members. See docs hereRead-onlyv0.0.3 -
List Store Id Options
actionRetrieves available options for the Store Id field.Read-onlyv0.0.1 -
Remove Member From A Segment
actionRemoves a member from the specified static segment. See docs hereWritev0.0.3 -
Search Campaigns
actionSearches for the campaigns. See docs hereRead-onlyv0.0.3 -
Search Lists
actionSearches for lists. See docs hereRead-onlyv0.0.2 -
Search Members/Subscribers
actionSearches for a subscriber. The search can be restricted to a specific list, or can be used to search across all lists in an account. See docs hereRead-onlyv0.0.4 -
Send a Campaign
actionSends a campaign draft to the audience signed up for the campaign. See docs hereWritev0.2.4 -
Unsubscribe Email
actionUnsubscribe an email address from an audience. See docs hereWritev0.2.4 -
Update Campaign
actionUpdate a campaign. See docs hereWritev0.0.3 -
Update List
actionUpdates an existing list. See docs hereWritev0.0.3
EVENTS
Mailchimp triggers
Event sources your backend can deploy for users and receive through a webhook.
-
Link Clicked
triggerEmit new event when a recipient clicks a pre-specified link in an specific campaign.v0.0.3 -
New Audience
triggerEmit new event when an audience is added to the connected Mailchimp account.v0.0.3 -
New Campaign
triggerEmit new event when a new campaign is created or sentv0.0.3 -
New Customer
triggerEmit new event when a new customer is added to a selected store.v0.0.3 -
New File
triggerEmit new event when a new file is added to the File Manager of the connected Mailchimp account.v0.0.3 -
New List Event (Instant)
triggerEmit new event when the following occurs on an audience list: a campaign is sent or cancelled, a subscriber is added, unsubscribed, has a profile update, or has the associated email address changed, or cleaned.Instantv0.0.2 -
New Open
triggerEmit new event when a recipient opens an email in a specific campaign.v0.0.3 -
New or Updated List Segment
triggerEmit new event when segment is either created or updated.v0.0.3 -
New or Updated Subscriber (Instant)
triggerEmit new event when a subscriber is added or updated (on profile, or email address change) in an audience list.Instantv0.0.2 -
New Order
triggerEmit new event when an order is added to your store, or Mailchimp account.v0.0.3 -
New Segment Tag Subscriber
triggerEmit new event when a subscriber is added to a segment or tags within an audience list.v0.0.3 -
New Subscriber (Instant)
triggerEmit new event when a subscriber is added to an audience list.Instantv0.0.2 -
New Unsubscriber (Instant)
triggerEmit new event when a subscriber is removed from an audience list.Instantv0.0.2
MULTI-APP
Use Mailchimp with other popular apps
Most products don't stop at one integration. Pair Mailchimp with the other apps your users rely on, and ship use cases that span both.
- App slug
- mailchimp
- Authentication
- OAuth
- Categories
- Marketing
- Actions
- 30
- Triggers
- 13
- API proxy
- Available