create_campaign_from_template
One-shot helper for the happy path: fork a starter template, optionally tweak the template strings, and create the campaign, all in a single tool call.
When to use this vs create_campaign:
Use create_campaign_from_template when the user's intent fits one of the 26 starters ('cold intro to founders', 'book a demo', 'recruiting a senior hire', 'investor outreach'). One call, one campaign.
Use the explicit list_sequence_templates → validate → preview → create_campaign loop when the user wants something custom enough that you need to show them a draft first.
Placeholders: some copy has [bracketed placeholders] only the sender can write. Fill them with placeholder_values (keys include the brackets; call list_sequence_templates to see which a template has). A campaign with an unfilled placeholder cannot be activated: asking for status 'active' returns an unfilled_placeholders error, and a draft is created with unfilled_placeholders listed in the response. To keep a bracket in a message on purpose, put a backslash before it: [Free webinar] is sent as [Free webinar].
Customizations the user typically asks for can be supplied via template_overrides, a map of step-id → new template string. Step ids are fixed by role: invite, view-profile, opener, follow-up-1, close-out, like-first, like-after-opener, with a '-connected' suffix on the copy that goes to people already connected (e.g. opener-connected), plus if-connection. Overrides replace the whole body, so a step with variables should keep them and you should also check the fallback with preview_messages. The validator runs before the API call; structural issues come back as { error: { code: 'validation_failed', issues: [...] } }.
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": {
"name": "<name>",
"template_key": "<template_key>",
"accountIds": "<accountIds>"
},
"name": "create_campaign_from_template"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | Campaign name shown to the user | |
| status | No | 'draft' keeps the campaign editable; 'active' launches it after validation. | draft |
| accountIds | Yes | LinkedIn sender account ids that will execute this campaign. | |
| dailyLimits | No | Daily caps for THIS CAMPAIGN, e.g. { connection_invite: 20, follow_up_message: 30 }. Each number is a total per day across every sender on the campaign, not per account, and not a range the runner varies. Each sending account ALSO has its own daily caps (get_account with include daily_limits); a send needs room under both, so the lower one governs. Omit to leave the campaign uncapped, in which case the account limits alone govern, that is a safe default and usually the right one. Unknown action keys are rejected by the API rather than ignored, so spell them exactly: connection_invite, follow_up_message, inmail, profile_view, profile_follow, post_like_comment, withdraw_connection_request. | |
| audienceData | No | e.g. { urls: [...] } for linkedin_urls, or { listId } for lead_list. | |
| template_key | Yes | Which starter template to fork: cold-intro, founder-to-founder, short-and-punchy, value-first, problem-led, referral-ask, warm-follow-up, re-engage, congratulations, thanks-after-meeting, book-a-demo, free-trial, case-study, agency-lead-gen, freelancer-intro, passive-candidate, senior-hire, referral-for-role, partner-intro, affiliate-reseller, webinar-invite, meetup-dinner, conference-pre-meet, investor-outreach, podcast-guest, customer-feedback. See list_sequence_templates. The old keys cold_intro, warm_followup and investor_outreach still work. | |
| audienceSource | No | Where the audience comes from: linkedin_urls, csv or lead_list. The shape of audienceData depends on it. | |
| idempotency_key | No | Optional UUID for safe retries: send the same key when repeating a request so it is applied once. | |
| placeholder_values | No | Fill the template's [placeholders]. Keys include the brackets, e.g. { '[what you help with]': 'outbound for B2B SaaS' }. | |
| template_overrides | No | Map of step-id → new body string. Customizes the forked sequence without rebuilding the tree. Ids are fixed by role (invite, opener, follow-up-1, close-out, with a '-connected' suffix for already-connected people); an id the template does not have is an error. Example: { 'invite': 'Hi {{firstName}}, my custom note...' } |