update_sequence_tool
Edits the sequence of an EXISTING DRAFT campaign, like the campaign editor: add a step, update an existing step (fill a manual campaign's empty placeholder steps, rewrite subject/body, change email threading — on one step or on every email step at once, ai-generated campaigns included — or change wait days), or delete a step. Pick the action with the action argument. Steps are addressed by 1-based position along the main sequence and the campaign by id or fuzzy name; no step ids needed. Without campaignId, when campaignName fits more than one draft the call edits only one, without asking: a draft with exactly that name, or else one picked by fuzzy match; the result names the campaign it edited. Both the id and the name lookup match only campaigns that were never launched: a campaign that was launched, whether running, paused or stopped, is refused and left unchanged. It changes only the stored draft in FuseAI and sends nothing; what the subject, body and threading fields say about sending applies once the campaign is launched separately, for example with update_campaign_status_tool. After launch, {Column: } tokens in a subject or body insert each contact's value from that column of the campaign's lists, and {{}} tokens have AI write that part for each contact, which costs credits for each message that uses them. add_step and delete_step are not safe to retry: repeating an add_step can add a duplicate step, and because a delete moves every later step up one place, repeating a delete_step deletes whichever step moved into that position; check the steps with get_campaign_sequence_steps_tool before retrying. In a branched campaign the steps inside a condition's lanes are not counted: edit them by id with update_sequence_step_tool, and note that a step added at the end of a main sequence closed by a condition goes just before that condition, and that deleting a condition step also deletes both of its lanes and every step in them. It cannot change which mailboxes send a step; use update_sequence_step_tool (allowedInboxes) for that. Do NOT use for creating a brand-new campaign.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"action": "<action>"
},
"name": "update_sequence_tool"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| body | No | Message body. For add_step it is REQUIRED for email and linkedin_message and must be omitted for linkedin_connection / dialer. For update_step, omitting body leaves the current body unchanged; you cannot edit the body of an ai-generated step. === IF the step is "email": HTML ONLY === Output well-formed HTML. Never raw markdown, never plain text with newline characters. Conversion rules: - Wrap each paragraph in <p>...</p>. - Use an empty <p></p> ONLY where you intentionally want a visible blank line (e.g. before/after the greeting, before the signature, between major sections). Email clients collapse <p> margins, so an empty <p></p> is the way to render a real visual gap. Do NOT insert <p></p> between every paragraph by default — only where a blank line genuinely belongs. - Single newlines inside a paragraph become <br>. - **text** or __text__ becomes <b>text</b>; *text* or _text_ becomes <i>text</i>. - [label](https://url) becomes <a href="https://url">label</a>. - Lines starting with '- ' or '* ' become <ul><li>...</li></ul>; lines starting with '1. ' become <ol><li>...</li></ol>. - Lines starting with '# ' / '## ' / '### ' become <h1> / <h2> / <h3>. - Personalization: only these tokens are substituted (single braces, exact names): {Contact Full Name}, {Contact First Name}, {Contact Last Name}, {Contact Company}, {Contact Job Title}, {Contact Industry}, {Sender Full Name}, {Sender First Name}, {Sender Last Name}, {Sender Job Title}, {Sender Signature}. The {Sender …} tokens take the name, title and signature of the mailbox or LinkedIn account that sends the step; the campaign's sender name and job title fill in only when that account has none. Unknown tokens like {firstName} or {{companyDomain}} are sent to the prospect literally. Never emit raw asterisks, underscores, or markdown. - Email example: input 'Hi {Contact First Name},\n\nLoved your **post** on LinkedIn.\n\nBest,\nNico' → '<p>Hi {Contact First Name},</p><p></p><p>Loved your <b>post</b> on LinkedIn.</p><p></p><p>Best,<br>Nico</p>'. === IF the step is "linkedin_message": PLAIN TEXT ONLY === LinkedIn does not render HTML. The recipient sees whatever you send literally, tags and all. - Do NOT wrap in <p>, do NOT use <br>, do NOT use <b>/<i>/<a>/<ul>/<ol>/<h1> etc. Any HTML tag will appear as raw characters in the recipient's inbox. - Use real newline characters (\n) for line breaks. Use a blank line (\n\n) for paragraph spacing. - Do NOT use markdown either — no **bold**, no *italic*, no [links](url). LinkedIn renders all of those as literal characters too. Just write the words. - Personalization: only these tokens are substituted: {Contact Full Name}, {Contact First Name}, {Contact Last Name}, {Contact Company}, {Contact Job Title}, {Contact Industry}, {Sender Full Name}, {Sender First Name}, {Sender Last Name}, {Sender Job Title}, {Sender Signature}. The {Sender …} tokens take the name, title and signature of the mailbox or LinkedIn account that sends the step; the campaign's sender name and job title fill in only when that account has none. Unknown tokens are sent literally. - LinkedIn example: input 'Hey {Contact First Name}, loved your post on AI.\n\nWould you be open to a 15 min chat next week?' → 'Hey {Contact First Name}, loved your post on AI.\n\nWould you be open to a 15 min chat next week?' (sent as-is, no tags). === IF the step is "linkedin_connection" or "dialer": NO BODY === Do not pass a body. These steps are configured without message content. | |
| action | Yes | What to do to the campaign's sequence. "add_step" = append/insert a brand-new step (requires channel). "update_step" = change an EXISTING step — fill a manual campaign's empty placeholder step, rewrite its subject/body, change its email threading, or change its wait days (requires position, except a threading-only change which may omit position to hit all email steps). "delete_step" = remove an existing step (requires position). | |
| channel | No | REQUIRED for action "add_step": the channel of the new step — "email", "linkedin_message", "linkedin_connection" (one per sequence; must come before any LinkedIn messages), or "dialer" (multiple allowed). Ignored for update_step / delete_step (the existing step's own channel is used). | |
| subject | No | Email subject line — only for email steps (add_step or update_step). Plain text, no HTML/markdown. Send-time semantics: the FIRST email step starts the thread with this subject. A follow-up email with replyInSameThread true (or omitted) is sent as a reply inside the existing thread and INHERITS that thread's subject — its own subject is ignored. A follow-up with replyInSameThread false starts a NEW thread with this subject (if empty, it falls back to the first email step's subject). On update_step, omitting subject leaves the step's current subject unchanged. | |
| position | No | 1-based position along the main sequence, counting ALL of its steps (not just emails); the steps inside a condition's lanes are not counted. For "add_step": optional — where to insert the new step; omitted = appended at the end. For "update_step": REQUIRED when changing subject/body/daysBetween; may be omitted ONLY for a threading-only change, which then applies to every email step in the campaign (non-email steps are left untouched, so it is safe on mixed sequences). For "delete_step": REQUIRED; the step to remove. Deleting a condition step also deletes both of its lanes and every step in them. | |
| campaignId | No | The id of the campaign to modify (a 24-hex MongoDB id). ALWAYS pass this when editing a campaign you just created — it targets that exact campaign and avoids matching a different campaign with the same name. Omit it (and rely on campaignName) only when the user references an existing campaign you have no id for. | |
| daysBetween | No | Number of days to wait before this step. For add_step it defaults to 1 when omitted. For update_step, omitting it leaves the current value unchanged; setting it requires a position. | |
| campaignName | No | The name of the existing campaign to modify, resolved via fuzzy match. Required when campaignId is not provided; ignored when campaignId is present (the id is authoritative). | |
| replyInSameThread | No | Email threading — only valid for email steps; omit (null) for every other channel. true (the backend default) = the email is sent as a reply inside the existing thread and inherits the thread's subject. false = the email starts a NEW thread using its own subject — provide a subject in that case. Set false ONLY when the user signals separate threads: they explicitly ask ("different threads", "don't send follow-ups as replies") or they supply a distinct subject for each email. An explicit instruction always wins over the subjects heuristic. On update_step you can set this with no position to flip ALL email steps at once — the only way to change threading on an ai-generated campaign (whose step CONTENT is not editable). |