← All posts
Guides8 min read

[GUIDES] · Jun 20, 2026 · 17:00

How to capture leads with a chatbot and send them to your CRM

The honest version: muro's chat captures a visitor's name and email without forcing a form before they can talk, and you push those leads to your CRM or a spreadsheet with the API and webhooks. Here is the exact flow, with a working webhook snippet.

Tm

The muro team

muro.chat

#lead capture#crm#webhooks#api#automation#guides

Here is a real comment we keep seeing, almost word for word: "I just want to automatically capture the user's email and do something with it. I can't find a solution to capturing emails reliably." It sounds like it should be a solved problem. It is not, because most chat widgets get the timing wrong. They either slam a form in front of you before you can ask a single question, or they never ask at all and the visitor leaves without you ever knowing who they were.

This guide is about the reliable middle. How to collect a name and email inside a real conversation, without a wall, and then actually do something with that lead: push it to your CRM, a spreadsheet, or whatever tool your sales follow-up lives in. We will be straight about what muro does natively and what you wire up yourself, because the honest version is more useful than a feature list.

Why email capture feels unreliable

The unreliability is almost always a timing problem, not a technical one. There are two classic failure modes:

  • The wall. A form blocks the chat: "Enter your email to start." Most visitors with a quick question just close the tab. You traded a conversation for a contact you will never get because you got neither.
  • The void. The chat is friendly and frictionless, the visitor asks their question, gets an answer, and leaves happy. You helped them, but you have no idea who they were and no way to follow up. Great support, zero pipeline.

The fix is to ask for the email at the moment the visitor already wants something from you. After they have asked a question, or when they want a reply that cannot land instantly, is exactly when handing over an email feels like a fair trade instead of a toll booth.

What muro captures, and how

muro's chat collects a visitor's name and email as part of the conversation, not as a gate in front of it. People can start typing and asking immediately. The contact fields come up naturally: when a visitor wants a follow-up, or when the AI or a teammate needs a way to reach them back, the chat asks for an email right there in the thread. The visitor types it like any other message. No separate form, no page reload.

Once an email is in, that visitor is no longer anonymous. Their name and email attach to the conversation, so your inbox shows a real person instead of "Visitor 4821," and every reply you send has somewhere to go.

Worth saying plainly: muro does not have a native, one-click CRM integration. There is no "connect HubSpot" button. What it has is an open way out: a REST API, webhooks, and an MCP server, so you can push leads wherever you want. For most people that is actually the more flexible answer, and it is the same plumbing whether your CRM is HubSpot, Pipedrive, Notion, Airtable, or a plain Google Sheet.

The flow: from chat to CRM

Here is the concrete path a lead takes. Every step below is real product behavior, not a promise.

  1. 01A visitor opens the chat and asks a question. No form, no wall.
  2. 02The AI answers from your docs, or a teammate replies. At the right moment the chat asks where to send a follow-up, and the visitor leaves their email (and name).
  3. 03muro fires a visitor.identified webhook the instant that email is captured.
  4. 04Your endpoint (a tiny function, or an n8n/Zapier/Make workflow) receives the event and creates or updates the contact in your CRM or spreadsheet.
  5. 05Your sales follow-up happens in the tool you already use, with a real name and email instead of an anonymous session.

The key event is visitor.identified. It fires the moment a visitor hands over an email, which is exactly the signal a lead pipeline keys off. (A name-only update does not count as an identification, so you only get a lead event when there is actually a way to contact the person.) The payload is small and predictable:

json{
  "id": "evt_…",
  "type": "visitor.identified",
  "organization_id": "org_…",
  "created_at": "2026-06-20T10:00:00.000Z",
  "data": {
    "visitor": { "id": "vis_…", "email": "[email protected]", "name": "Marie" }
  }
}

The webhook receiver

You point a muro webhook at a URL you control and subscribe it to visitor.identified. Each delivery is a POST with an x-muro-signature header so you can verify it really came from muro before trusting it. Here is a minimal Node receiver that verifies the signature and forwards the lead to a CRM:

jsimport crypto from 'node:crypto';

export default async function handler(req, res) {
  // 1. Verify the signature against the RAW body (do not JSON.parse first).
  const sig = req.headers['x-muro-signature'];            // "t=…,v1=…"
  const v1  = sig.split(',').find(p => p.startsWith('v1=')).slice(3);
  const expected = crypto
    .createHmac('sha256', process.env.MURO_WEBHOOK_SECRET) // whsec_…
    .update(req.rawBody)
    .digest('hex');
  if (!crypto.timingSafeEqual(Buffer.from(v1), Buffer.from(expected))) {
    return res.status(401).end('bad signature');
  }

  // 2. Only act on the lead event.
  const event = JSON.parse(req.rawBody);
  if (event.type === 'visitor.identified') {
    const { email, name } = event.data.visitor;
    await fetch('https://your-crm.example/contacts', {
      method: 'POST',
      headers: { 'content-type': 'application/json' },
      body: JSON.stringify({ email, name, source: 'muro-chat' }),
    });
  }

  res.status(200).end('ok');
}

That is the whole thing. Verify, check the type, forward the lead. Deliveries retry on a backoff if your endpoint is down, so a brief outage does not lose you a contact.

No code? Use n8n, Zapier, or Make

If you do not want to host an endpoint, you do not have to. n8n, Zapier, and Make all let you start a workflow from an incoming webhook. Paste their generated URL into muro as the webhook target, subscribe to visitor.identified, and then drag in the CRM or Sheets step on the other side. The visitor's email and name land in fields you map once, and every new lead flows through automatically. Same flow as the code above, just clicked together instead of written.

Getting more emails without being annoying

A few habits make capture more reliable without turning the chat into a lead-gen trap:

  • Ask after value, not before. Let the AI answer the first question, then offer to follow up by email.
  • Make the ask a sentence, not a form. "Want me to email you when this ships? What's your address?" feels human.
  • Never block the conversation on it. A visitor who refuses to give an email should still get help. You keep the goodwill, and they often hand it over later anyway.
  • Let the AI do the early lifting so a human is never the bottleneck on a lead at 2am. muro's AI answers from your docs and hands off to a person when it should, which keeps the chat alive when you are not.

Reliable email capture is not one magic setting. It is good timing plus a clean path out to wherever your follow-up lives. muro gives you both halves: a chat that collects name and email inside the conversation, and an honest, open way to move those leads onward.

✦ ✦ ✦

If you have been stuck trying to capture emails reliably and route them somewhere useful, this is the setup that holds up. The chat collects the lead in context, the visitor.identified webhook fires, and your CRM or spreadsheet fills itself. Start a free trial, no card needed, and wire up your first lead flow this afternoon. Want the full surface first? Read the API and webhooks docs.

Tm

✎ Written by

The muro team

muro.chat