campaignstack_add_lead_to_sequence
Add one lead to an external provider's sequence (provider-parameterized: apollo sequences, instantly campaigns). The lead is resolved by email on the provider side (Apollo creates the contact in the tenant's account if it does not exist yet). Apollo also requires emailAccountId (a sending mailbox id). Duplicate adds are idempotent successes (status already_present). Set activateSequence to start an Apollo sequence after adding (best-effort: a sequence that is already active is left as is). Instantly handoffs are recorded so reply/bounce/unsubscribe state syncs back automatically. Free: no CampaignStack credits. Returns status: added, already_present, skipped_no_email (lead has no email), or error (e.g. INTEGRATION_NOT_CONNECTED, INTEGRATION_KEY_INSUFFICIENT_SCOPE when an Apollo key is not a master API key, LEAD_NOT_FOUND). Use campaignstack_list_external_sequences for sequence ids and campaignstack_list_external_email_accounts for Apollo mailbox ids.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| leadId | Yes | ||
| provider | Yes | Integration provider that owns the sequence. | |
| campaignId | Yes | Provider-side sequence id (from campaignstack_list_external_sequences). | |
| leadSource | No | Lead source table (default: global). Private leads are workspace-scoped CSV imports. | |
| workspaceId | No | Workspace ID (defaults to the bound workspace) | |
| emailAccountId | No | Provider-side sending mailbox id. REQUIRED for apollo (from campaignstack_list_external_email_accounts); unused by instantly. | |
| activateSequence | No | Start the sequence after adding if it is not running yet (best-effort). Apollo only. | |
| skipIfInWorkspace | No | Skip the lead if its email already exists anywhere in the provider workspace, not just this sequence. Instantly only. |