create_campaign
Create a new email sequence: the campaign plus one email per entry in steps (the first is the initial email, the rest follow-ups).
Create email campaign · Changes data
Create a new email sequence: the campaign plus one email per entry in steps (the first is the initial email, the rest follow-ups). The campaign is created active but sends nothing until contacts are added with add_prospect_to_campaign. To change one email later use update_campaign_step; to see the result use get_campaign. websiteId comes from list_websites. Returns emailCampaign (its id is the campaignId) and templates[], one server response per step: a step rejected for bad merge fields comes back with an error there while the campaign and the other steps still exist, so check every entry and fix failures with update_campaign_step (templateId from get_campaign). Writing rules: Write the body as plain text, one paragraph per line, no blank lines between paragraphs (each line becomes one <p>; never add empty paragraphs or <br><br> for spacing). Merge fields need a fallback with this syntax: {{ first_name | there }}, {{ company_name | your company }}, {{ position | your role }}, {{ industry | your industry }}, {{ website | your website }} (not default("...")); a bare {{company_name}} renders empty when the company is unknown. End every body with {{sender_signature}} on its own line, then {{unsubscribe_text}} on its own line, and nothing after them; never type your own sign-off (Best regards, name) or unsubscribe sentence, those two variables render them. They and sender* fields take no fallback.
| Connection | Account URL, team member URL or OAuth |
|---|
Parameters
| Parameter | Type | Required | Accepts | Description |
|---|---|---|---|---|
websiteId | string | Yes | any | Website id (24 hex characters) from list_websites. |
name | string | Yes | any | Campaign name shown in the app. |
emailAccountId | string | Yes | any | Required by the schema but not used: a campaign is not tied to one mailbox. Sending mailboxes are picked per contact in add_prospect_to_campaign. Pass any mailbox id from list_email_accounts. |
steps | object[] | Yes | any | The emails of the sequence, in order, one object per email. At least one step is needed before contacts can be added. |
steps[].subject | string | Yes | any | Subject line. Merge fields need a fallback, e.g. Quick idea for {{ company_name | your team }}. |
steps[].body | string | Yes | any | Plain text, one paragraph per line, no blank lines, ending with {{sender_signature}} then {{unsubscribe_text}} on their own lines. |
steps[].delayDays | number | No | any | Whole days to wait after the previous step. 0 for the first step. Default 0. |
settings | object | No | any | Optional sending schedule object; omitted keys use the defaults. daysRange: days of the week it may send, numbers 0-6 where 0 is Sunday, default [1,2,3,4,5] (Monday to Friday). timeSlot: sending window { start, end } in whole hours (0-23) of the campaign timezone, default { start: 9, end: 17 }. timezone: IANA timezone of the window, default America/New_York; supported: America/Los_Angeles, America/Denver, America/Chicago, America/New_York, UTC, Europe/London, Europe/Paris, Europe/Athens, Australia/Perth, Australia/Adelaide, Australia/Sydney, Asia/Dubai, Asia/Riyadh, Asia/Karachi, Asia/Kolkata, Asia/Dhaka, Asia/Ho_Chi_Minh, Asia/Tokyo, Pacific/Guadalcanal, Pacific/Auckland, Pacific/Midway, Pacific/Honolulu, America/Anchorage, America/Puerto_Rico, America/St_Johns, America/Sao_Paulo. |
Tool definition
What your assistant receives from tools/list:
{
"name": "create_campaign",
"title": "Create email campaign",
"annotations": {
"title": "Create email campaign",
"readOnlyHint": false,
"destructiveHint": false,
"idempotentHint": false,
"openWorldHint": false
},
"inputSchema": {
"type": "object",
"properties": {
"websiteId": {
"type": "string",
"description": "Website id (24 hex characters) from list_websites."
},
"name": {
"type": "string",
"description": "Campaign name shown in the app."
},
"emailAccountId": {
"type": "string",
"description": "Required by the schema but not used: a campaign is not tied to one mailbox. Sending mailboxes are picked per contact in add_prospect_to_campaign. Pass any mailbox id from list_email_accounts."
},
"steps": {
"type": "array",
"description": "The emails of the sequence, in order, one object per email. At least one step is needed before contacts can be added.",
"items": {
"type": "object",
"properties": {
"subject": {
"type": "string",
"description": "Subject line. Merge fields need a fallback, e.g. Quick idea for {{ company_name | your team }}."
},
"body": {
"type": "string",
"description": "Plain text, one paragraph per line, no blank lines, ending with {{sender_signature}} then {{unsubscribe_text}} on their own lines."
},
"delayDays": {
"type": "number",
"description": "Whole days to wait after the previous step. 0 for the first step. Default 0."
}
},
"required": [
"subject",
"body"
]
}
},
"settings": {
"type": "object",
"description": "Optional sending schedule object; omitted keys use the defaults. daysRange: days of the week it may send, numbers 0-6 where 0 is Sunday, default [1,2,3,4,5] (Monday to Friday). timeSlot: sending window { start, end } in whole hours (0-23) of the campaign timezone, default { start: 9, end: 17 }. timezone: IANA timezone of the window, default America/New_York; supported: America/Los_Angeles, America/Denver, America/Chicago, America/New_York, UTC, Europe/London, Europe/Paris, Europe/Athens, Australia/Perth, Australia/Adelaide, Australia/Sydney, Asia/Dubai, Asia/Riyadh, Asia/Karachi, Asia/Kolkata, Asia/Dhaka, Asia/Ho_Chi_Minh, Asia/Tokyo, Pacific/Guadalcanal, Pacific/Auckland, Pacific/Midway, Pacific/Honolulu, America/Anchorage, America/Puerto_Rico, America/St_Johns, America/Sao_Paulo."
}
},
"required": [
"websiteId",
"name",
"emailAccountId",
"steps"
]
}
}list_campaigns
List the email campaigns of one website, newest first, with their status (isActive), schedule, steps (emailCampaignTemplates), health and a cached stats snapshot (statsRollup: contacted, sent, opens, clicks, replies, bounces and rates, refreshed about every 5 minutes; see computedAt).
update_campaign_step
Rewrite one email (step) of an existing campaign: its subject, body and/or delay.