add_leads_to_campaign
Add people to an existing campaign from any audience source the app supports. The backend materializes each entry into a prospect (deduped by LinkedIn URL within the campaign); people already in the campaign or blocklisted are skipped. Provide an audienceSource + audienceData, the same shapes create_campaign uses: linkedin_urls ({ urls }), csv ({ rows } with per-lead fields and custom variables), lead_list ({ listId }, adds everyone in a lead list) or linkedin_search ({ url } with a Sales Navigator people-search URL, adds the first ~125 people of that search, run on the campaign's first sending account). To import a whole search (up to ~2,500), make it the campaign's audience instead (update_campaign while paused) or build a list with create_lead_list with search_url and add that list. Returns counts { added, updated, skipped, failed } for linkedin_urls and csv: skipped includes blocklisted contacts and people already in the campaign; failed = invalid URL. Also returns truncated and truncatedTokens when a personalization value ran past the 500 character cap and was stored cut, which is a successful add whose copy was altered rather than a failure, so it needs checking separately from the counts above.
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": {
"campaign_id": "<campaign_id>",
"audienceData": "<audienceData>"
},
"name": "add_leads_to_campaign"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| campaign_id | Yes | Id of the campaign (from list_campaigns). | |
| audienceData | Yes | linkedin_urls: { urls: ["https://www.linkedin.com/in/..."] }. csv: { rows: [{ linkedinUrl, fullName, company, jobTitle, email, custom: { ... } }] }. lead_list: { listId } (the id from list_lead_lists or create_lead_list). linkedin_search: { url }. IMPORTANT: per-lead personalization values must be NESTED under `custom` on each row. A loose top-level key is accepted by the request and then silently dropped, which returns 200 with a correct `added` count and no personalization at all. Each value is trimmed and truncated at 500 characters. That is no longer silent: the response reports `truncated` (how many values were cut) and `truncatedTokens` (which variables), which matters most when the value is a whole written message rather than a short phrase. | |
| audienceSource | No | Type of audience being added: linkedin_urls (default), csv, lead_list or linkedin_search. | linkedin_urls |
| idempotency_key | No | Optional UUID for safe retries: send the same key when repeating a request so it is applied once. |