Generate a lead's emails with AI
generate_lead_sequenceWrite one lead's email sequence with AI — the Generate button of a SINGLE campaign, one lead at a time. SPENDS THE USER'S OPENAI CREDITS on their own key, so ask them before calling it. The lead needs a title or a description: the AI writes the pitch from the project details and refuses rather than inventing one. Replaces any existing draft for that lead. Does not apply to 'multi' campaigns, which use one shared set_sequence. NOTHING IS SENT — the draft waits at 'pending_review' for the user to approve in ReplyNorth.
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": {
"lead_id": "<lead_id>"
},
"name": "generate_lead_sequence"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| lead_id | Yes | The lead to write emails for — the `id` from list_leads, which is the lead's row in one campaign, not a contact id. SINGLE campaigns only. | |
| idempotency_key | No | Optional. Send the SAME value when retrying, so a generation is not paid for twice. |