Guide: n8n

Wire Sprootal into n8n — as MCP tools for an AI Agent, or as plain HTTP nodes — and react to replies with a webhook trigger.

n8n

Two ways to use Sprootal from n8n. Pick by whether a model is making the decisions.

Use when
MCP Client Toolan AI Agent node decides what to do — reads a thread, writes a draft
HTTP Requestthe workflow already knows what to do — create, enrol, tag

B. As plain HTTP nodes

Same key, Authorization: Bearer YOUR_API_KEY, base https://sprootal.com/api/v1.

StepCall
Create a leadPOST /contacts (needs projectId or listId)
Enrol in a campaignPOST /automations/{id}/enroll
Read a conversationGET /contacts/{id}/messages
Leave a draftPOST /contacts/{id}/drafts (sender_id + text)
Send directlyPOST /contacts/{id}/messages — owner/admin key only
Build a campaignPOST /automations

Reacting to replies

Add a Webhook node, copy its production URL, and subscribe:

curl -s -X POST "https://sprootal.com/api/v1/webhooks" \
  -H "Authorization: Bearer $KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "n8n",
    "url": "https://your-n8n.example.com/webhook/sprootal",
    "events": ["conversation.new_message", "draft.approved", "draft.superseded"]
  }'

Verify X-LeadGen-Signature (t=<timestamp>,v1=<hmac>) with the signingSecret from the response, inside the five-minute tolerance window. Failed deliveries retry five times with exponential backoff, and every attempt is visible under GET /webhooks/deliveries — so a workflow that was down for ten minutes does not lose the reply. An endpoint that fails 20 times running gets disabled automatically and fires webhook.disabled; re-enable it once the n8n webhook URL is reachable again.


Three workflows worth building

Qualify and enrol. Form or CRM trigger → AI Agent (+ MCP) → the agent creates the contact, tags it, and enrols it in the right campaign.

Draft the reply, notify the human. Webhook (conversation.new_message) → AI Agent writes a draft with create_draft → Slack message linking the Inbox. Build the MCP key without send scopes and the workflow genuinely cannot send — only approving in Sprootal does.

Log outcomes. Webhook (draft.approved, draft.discarded) → append to a sheet. Which drafts humans kept and which they threw away is the most useful training signal you have.


Two traps

**A send is accepted, not instant.** `POST /contacts/{id}/messages` and `POST /drafts/{draftId}/approve` both answer `202` and queue the send behind the sender's pacing — the response's `position` and `estimated_send_at` tell you roughly when it'll actually go out. Don't build a retry loop around "it looks slow"; check `GET /messages/queue/{id}` instead. See [Account Safety](/help/account-safety).

A draft can expire. If the conversation moves on before anyone reviews it, your draft is swept away and you get draft.superseded. Handle that event by redrafting against the new state, not by re-posting the old text.