Set Campaign Content
mailchimp.set_campaign_content
ActionEmailconnection required
Calls the Mailchimp API with the connection's credentials.
Set a draft campaign's body. Supply raw 'html', a 'url' for Mailchimp to import, or a 'template' — 'plain_text' may accompany any of them but is not a campaign body on its own.
Connection
- Required
- Yes — the node will not save without one
- Auth type
- API key
- Providers
- Mailchimp
- Secret shape
- the Mailchimp API key (…-<dc>)
- Config it needs
- dc
- Resolved by
- config.connection_id, else node.connection_id
Configuration
5 fields, 1 required. A dotted path is a nested object and name[] an array of objects — the editor renders the same tree.
| Field | Type | Required | Default | Constraints | Example |
|---|---|---|---|---|---|
campaign_id The campaign id returned by Mailchimp: Create Campaign or List Campaigns. | string | Yes | — | — | — |
html The campaign's raw HTML body. | string | No | — | — | <h1>Hello</h1><p>Our latest news.</p> |
url A public URL whose page Mailchimp imports as the campaign body. | string | No | — | url format | — |
template Build the body from a saved template, as a JSON object — {"id": 123, "sections": {"body": "…"}}. Template ids come from Mailchimp: List Templates. | object | No | — | — | — |
plain_text The plain-text alternative part. Optional; Mailchimp generates one from the HTML when it is left empty. | string | No | — | — | — |
- At least one of html, url, template must be set.
Example configuration
Every value below is the contract’s own example or default — nothing invented.
{
"html": "<h1>Hello</h1><p>Our latest news.</p>"
}Output
One shape.
result
| Field | Type | Example |
|---|---|---|
html The stored HTML body. | string | — |
plain_text The stored plain-text alternative. | string | — |
archive_html The body as it appears in the web archive. | string | — |
{
"archive_html": "",
"html": "",
"plain_text": ""
}See Set Campaign Content run in a workflow.
In a technical demo we add the Mailchimp connection, drop the node on the canvas and let Workflow Health pre-flight it before the first real run.