Send leads to a webhook
Send every new or changed lead to Zapier, Make, n8n or your own system as signed JSON, and check that it came from selXP.
A webhook sends each new or changed lead to an address you choose, as JSON. Use it when your CRM has no connection here yet, or to pass leads to Zapier, Make, n8n or your own system. It sits under CRM sync and works like a CRM connection: it can be for the whole group or for one company, and it retries what fails.
Each company or the group has one connection: a CRM or a webhook.
Connect
- Open CRM sync and tap Connect.
- Choose Webhook: Zapier, Make or your own system.
- Fill in the fields below.
- Tap Save and test. The app sends a test call and tells you what the address answered.
| Field | What it is |
|---|---|
| For | The whole group, or one company. |
| Name shown to your team | Any name you choose. |
| Webhook address | Where to send the leads. It must start with https://. In Zapier, Make or n8n, it is the address of a “catch hook” or webhook trigger. |
| Signing secret | At least 16 characters. Tap Make one for a strong one, and give the same secret to whoever checks the calls. It is stored encrypted and never shown again. |
When you change a connection, leave the secret empty to keep the one already stored. Switching a connection between Odoo and a webhook needs a new key or secret.
What is sent
Every new lead, and every lead that changes, with:
- The lead: its score, temperature, notes, value, event, product interests, owner, company in your group and the answers to your own questions.
- The person: name, job title, emails and phones.
- The company: name and website.
- Its history (notes, calls, messages, visits) and its tasks. Turn either off under Also send.
Card photos and files stay in selXP. A lead that has not changed is not sent again.
Send all leads sends every lead the connection serves, for the leads you had before connecting.
When something fails
The buttons, the Not sent list and Send again work as they do for a CRM. See CRM sync.
| The address answers | What happens |
|---|---|
| Any 2xx | Sent. |
| 401 or 403 | The connection pauses and your super admins are told. Leads wait until you tap Test connection. |
| 429, any 5xx, or no answer in 15 seconds | Tried again later, five more times, further apart each time. Then listed under Not sent. |
| Any other 4xx | Listed under Not sent at once. |
For whoever sets up the receiving end
Each call is a POST with a JSON body and these headers:
| Header | What it is |
|---|---|
x-selxp-event |
ping when the connection is saved or tested, lead.saved for a lead |
x-selxp-delivery |
A new id for every call |
x-selxp-timestamp |
When it was sent, in seconds since 1970 (UTC) |
x-selxp-signature |
sha256= and the HMAC-SHA256 of <timestamp>.<body> with the signing secret |
A lead.saved body looks like this:
{
"event": "lead.saved",
"version": "1",
"sentAt": "2026-11-08T09:12:44.120Z",
"lead": {
"id": "6f1c2e0a-…",
"title": "Huda Karim, Delta Pumps",
"score": 72,
"temperature": "HOT",
"notes": "Needs valves",
"interestNote": null,
"opportunityAmount": 25000,
"opportunityCurrency": "AED",
"capturedAt": "2026-11-08T08:00:00.000Z",
"eventName": "Trade Expo 2026",
"interests": ["Ball valves"],
"ownerEmail": "sara@yourcompany.com",
"ownerName": "Sara",
"unitName": "Your Company LLC",
"teamId": "…",
"answers": [{ "question": "Timeline", "answer": "This quarter" }]
},
"contact": {
"id": "…",
"fullName": "Huda Karim",
"jobTitle": "Procurement Lead",
"emails": ["huda@delta-pumps.example"],
"phones": ["+966500000111"]
},
"company": { "id": "…", "name": "Delta Pumps", "website": null },
"history": [{ "id": "…", "type": "CALL", "at": "…", "by": "Sara", "text": "Asked for a quote" }],
"tasks": [{ "id": "…", "title": "Send quote", "dueOn": "2026-11-10", "state": "OPEN", "ownerEmail": "…" }]
}
- The whole lead comes every time, with up to 50 history entries and its tasks. Use
lead.idto update the record you made the first time, and the ids inhistoryandtasksto skip ones you have. historyandtasksare empty when they are turned off.- Any field may be
null. New fields may be added;versionchanges only if one is taken away or changes meaning.
Check that it came from selXP
Work out the HMAC over the raw body exactly as it arrived, and compare it in constant time. Turn away a timestamp more than five minutes old. In Node:
import { createHmac, timingSafeEqual } from "node:crypto";
function fromSelxp(rawBody, headers, secret) {
const timestamp = headers["x-selxp-timestamp"];
if (Math.abs(Date.now() / 1000 - Number(timestamp)) > 300) return false;
const expected = `sha256=${createHmac("sha256", secret).update(`${timestamp}.${rawBody}`).digest("hex")}`;
const given = String(headers["x-selxp-signature"] ?? "");
return given.length === expected.length && timingSafeEqual(Buffer.from(given), Buffer.from(expected));
}
Zapier’s and Make’s own webhook triggers do not check signatures. They work without it; the secret matters once you add a check step.
Good to know
- Your plan sets how many connections you can have. See Your plan and seats.
- Erasing a person here does not touch what the webhook already received. See Privacy requests.
- Goals, streaks and rankings are never sent.
- To have your own system fetch leads when it wants, instead of receiving each one, give it an API key: see Read leads with an API key.
Still stuck?
Ask your company's admin, or write to hello@lucidarc.ae. Say which screen you were on and what you expected to happen.