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 Tool | an AI Agent node decides what to do — reads a thread, writes a draft |
| HTTP Request | the 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.
| Step | Call |
|---|---|
| Create a lead | POST /contacts (needs projectId or listId) |
| Enrol in a campaign | POST /automations/{id}/enroll |
| Read a conversation | GET /contacts/{id}/messages |
| Leave a draft | POST /contacts/{id}/drafts (sender_id + text) |
| Send directly | POST /contacts/{id}/messages — owner/admin key only |
| Build a campaign | POST /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 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.