Skip to content
Browse documentation
On this page

Send events to webhooks

Send new leads, unanswered questions and downvoted answers to your CRM, Slack, Google Sheets, Zapier, Make or n8n.

On Starter and Pro, a site can send its events to up to 5 webhook URLs. Each event is a signed JSON POST, so anything that accepts a webhook can receive it: Zapier, Make, n8n, or your own code. From there you can add leads to HubSpot or Pipedrive, post them in Slack, or add a row to Google Sheets. Free doesn't include webhooks.

Only team owners and admins can add, change or delete webhooks and see their signing secrets. Anyone on the team can see the delivery log.

Add a webhook

  1. Open your site

    Open Sites and click the site.

  2. Open Webhooks

    Click Webhooks.

  3. Add the URL

    Paste the URL your tool gave you, tick the events you want and click Add webhook.

  4. Send a test event

    Click Send test event and check it arrived.

Webhook URLs must start with https:// and point to a public address.

Events

  • New lead (lead.created): a visitor left their email in the widget. Leads your team leaves from the dashboard preview are sent too, with "preview": true.
  • Unanswered question (question.unanswered): the assistant couldn't answer from your pages. Questions asked in the dashboard preview aren't sent.
  • Downvoted answer (answer.downvoted): a visitor rated an answer as not helpful. Sent once per answer, even if the visitor changes their vote.

What you receive

A new lead:

{
  "event": "lead.created",
  "id": "evt_5b1f…",
  "created_at": "2026-11-29T18:00:00.000Z",
  "site": { "id": "abc123", "name": "Acme Docs", "domain": "docs.acme.com" },
  "lead": {
    "id": "8c2e…",
    "name": "Ada",
    "email": "ada@example.com",
    "message": "Can someone call me about pricing?",
    "page_url": "https://docs.acme.com/pricing",
    "trigger": "human"
  },
  "question": "Do you have a plan for 50 seats?",
  "transcript": [
    { "role": "user", "text": "Do you have a plan for 50 seats?" },
    { "role": "assistant", "text": "I couldn't find that in these pages." }
  ],
  "conversation_id": "k3j9…",
  "preview": false,
  "dashboard_url": "https://app.talktomysites.com/app/sites/abc123/leads"
}

trigger is unanswered, human or button (the "Contact us" link). question is the question asked before the offer, and is null for the "Contact us" link. transcript holds the last few questions and answers of the visit.

An unanswered question or a downvoted answer:

{
  "event": "question.unanswered",
  "id": "evt_9a0c…",
  "created_at": "2026-11-29T18:00:00.000Z",
  "site": { "id": "abc123", "name": "Acme Docs", "domain": "docs.acme.com" },
  "question": {
    "id": "f41d…",
    "text": "Do you ship to Mars?",
    "answer": "I couldn't find anything about that in this documentation…",
    "sources": [{ "url": "https://docs.acme.com/shipping", "title": "Shipping" }],
    "page_url": "https://docs.acme.com/faq",
    "conversation_id": "k3j9…",
    "asked_at": "2026-11-29T17:59:58.000Z"
  },
  "dashboard_url": "https://app.talktomysites.com/app/sites/abc123/analytics"
}

page_url is only filled in when it's a page on your site. Send test event sends a made-up lead.created with "test": true.

Requests and retries

Every request is a POST with a JSON body and these headers:

  • X-TTMS-Event: the event name.
  • X-TTMS-Delivery: a unique ID for this delivery.
  • X-TTMS-Timestamp: when it was sent, in Unix seconds.
  • X-TTMS-Signature: v1= plus the signature (see below).

Reply with any 2xx status within 10 seconds. Redirects aren't followed.

If a delivery fails, it's tried again after 1 minute, 5 minutes, 30 minutes and 2 hours: five tries in all. A 404 or 410 isn't retried, since the URL is gone. If 5 deliveries in a row fail every try, the webhook turns itself off and owners and admins get an email. Fix the receiving end, then click Turn on.

Very rarely, the same delivery can arrive twice. Use X-TTMS-Delivery to skip repeats.

The delivery log

The Webhooks page lists the last 50 deliveries from the site, with their status, HTTP code, tries and any error or response. Click Resend on a failed one to try it again. Deliveries are kept for 30 days.

Check the signature

Zapier, Make and n8n don't need this. When you receive events in your own code, check that they came from Talk To My Sites: the signature is the hex HMAC-SHA256 of <timestamp>.<raw body>, keyed with the webhook's signing secret. Find the secret on the Webhooks page under Signing secret.

// Node.js / Express
import crypto from "node:crypto";

app.post("/ttms", express.raw({ type: "application/json" }), (req, res) => {
  const ts = req.get("X-TTMS-Timestamp");
  const sig = req.get("X-TTMS-Signature");
  const expected = "v1=" + crypto
    .createHmac("sha256", process.env.TTMS_WEBHOOK_SECRET)
    .update(`${ts}.${req.body}`)
    .digest("hex");
  const fresh = Math.abs(Date.now() / 1000 - Number(ts)) < 300;
  if (!fresh || !sig || sig.length !== expected.length ||
      !crypto.timingSafeEqual(Buffer.from(sig), Buffer.from(expected))) {
    return res.status(401).end();
  }
  const event = JSON.parse(req.body);
  res.status(200).end();
});

If the secret leaks, click Rotate secret. The old one stops working straight away, so update your code at the same time.

Recipes

Slack's own incoming webhooks expect a different format, so send events to Slack through Zapier, Make or n8n.

  • Zapier: create a Zap with the Webhooks by Zapier trigger and pick Catch Hook. Paste its URL into Talk To My Sites, click Send test event, and Zapier picks up the fields. Add an action: HubSpot: Create Contact, Pipedrive: Create Person, Google Sheets: Create Spreadsheet Row or Slack: Send Channel Message, mapping lead.email, lead.name, question and lead.page_url.
  • Make: start a scenario with Webhooks: Custom webhook, copy its address into Talk To My Sites and click Send test event so Make learns the structure. Then add your CRM, Sheets or Slack module.
  • n8n: add a Webhook node with HTTP method POST and use its production URL. Follow it with a HubSpot, Google Sheets or Slack node.

To send only leads into your CRM and unanswered questions into Slack, add two webhooks with different events.

Plans

Webhooks are on Starter and Pro. If your team moves to Free, nothing more is sent, and deliveries waiting for a retry are marked failed. Your webhooks stay on the page and start sending again when you upgrade.