Mailchimp ACTION
Update Campaign
Update a campaign. See docs here
- Action
- Writes data
- Destructive
- OAuth
- SDK
- MCP
IMPLEMENTATION
Call this tool
Connect a user's Mailchimp account once, then configure and run Update Campaign from your backend or agent.
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-update-campaign",
externalUserId: "{external_user_id}", // any stable ID for this user in your system
configuredProps: {
mailchimp: { authProvisionId: "apn_xxxxxxx" },
campaignId: "Campaign ID",
listId: "List Id",
},
})
console.log(result)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-update-campaign",
"configured_props": {
"mailchimp": { "authProvisionId": "apn_xxxxxxx" },
"campaignId": "Campaign ID",
"listId": "List Id"
}
}'// 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()
// listTools() hands your model this tool's input schema, so it can
// fill the arguments itself:
const result = await mcp.callTool({
name: "mailchimp-update-campaign",
arguments: {
campaignId: "Campaign ID",
listId: "List Id",
},
})SCHEMA
Inputs
Pipedream supplies the connected account. Your application provides the operation-specific values below. Dynamic inputs are resolved against that user's account.
| Property | Type | Description |
|---|---|---|
campaignId Campaign ID | string | The unique ID of the campaign Required Dynamic |
listId List Id | string | The unique ID of the list Required Dynamic |
savedSegmentId Saved segment ID | string | The ID for an existing saved segment. Optional Dynamic |
prebuiltSegmentId Prebuilt segment ID | string | The prebuilt segment ID, if a prebuilt segment has been designated for this campaign. Optional |
segmentMatch Segment match | string | Segment match type. Optional |
segmentConditions Segment condition | any | Segment match conditions. Optional |
subjectLine Subject line | string | The subject line for the campaign. Optional |
previewText Preview text | string | The preview text for the campaign. Optional |
title Title | string | The title of the campaign. Optional |
fromName From name | string | The 'from' name on the campaign (not an email address). Optional |
replyTo Reply to | string | The reply-to email address for the campaign. Note: while this field is not required for campaign creation, it is required for sending. Optional |
useConversation Use conversations | boolean | Use Mailchimp Conversation feature to manage out-of-office replies. Optional |
toName To name | string | The campaign's custom 'To' name. Optional |
folderId Folder ID | string | If the campaign is listed in a folder, the ID for that folder. Optional |
authenticate Authenticate | boolean | Whether Mailchimp authenticated the campaign. Defaults to true. Optional |
autoFooter Auto footer | boolean | Automatically append Mailchimp's default footer to the campaign. Optional |
inlineCss Inline css | boolean | Automatically inline the CSS included with the campaign content. Optional |
autoTweet Auto tweet | boolean | Automatically tweet a link to the campaign archive page when the campaign is sent. Optional |
autoFbPost Auto facebook post | string[] | An array of Facebook page ID to auto-post to. Optional |
fbComments Facebook comment | boolean | Allows Facebook comments on the campaign (also force-enables the Campaign Archive toolbar). Defaults to true. Optional |
templateId Template ID | string | The ID of the template to use. Optional |
opens Opens | boolean | Whether to track opens. Defaults to true. Cannot be set to false for variate campaigns. Optional |
htmlClicks HTML clicks | boolean | Whether to track clicks in the HTML version of the campaign. Defaults to true. Cannot be set to false for variate campaigns. Optional |
textClicks Text clicks | boolean | Whether to track clicks in the plain-text version of the campaign. Defaults to true. Cannot be set to false for variate campaigns. Optional |
goalTracking Goal tracking | boolean | Whether to enable Goal tracking. Optional |
ecomm360 E-commerce tracking | boolean | Whether to enable eCommerce360 tracking. Optional |
googleAnalytics Google analytics | string | The custom slug for Google Analytics tracking (max of 50 bytes). Optional |
clicktale Clicktale | string | The custom slug for ClickTale tracking (max of 50 bytes). Optional |
salesforceCampaign Salesforce campaign | boolean | Create a campaign in a connected Salesforce account. Optional |
salesforceNotes Salesforce notes | boolean | Update contact notes for a campaign based on subscriber email addresses. Optional |
capsuleNotes Capsule notes | boolean | Update contact notes for a campaign based on subscriber email addresses. Must be using Mailchimp's built-in Capsule integration. Optional |
socialImageUrl Social image url | string | The url for the header image for the preview card. Optional |
socialDescritpion Social description | string | A short summary of the campaign to display. Optional |
socialTitle Social title | string | The title for the preview card. Typically the subject line of the campaign. Optional |
REFERENCE
Tool details
Behavior hints are published with the component in the Pipedream registry and surface as MCP tool annotations, so an agent can reason about a tool before it calls it.
- Registry key
- mailchimp-update-campaign
- Version
- 0.0.3
- App
- Mailchimp
- Authentication
- OAuth
- Read-only
- No
- Destructive
- Yes
- Open world
- Yes
- Source
- View on GitHub ↗