✨ Train your first AI chatbot free — no credit card neededStart free →
Alee
← All tutorials
Tutorial · 11 min read

Automate Chat Leads With n8n: Alee Webhook to CRM

Step-by-step guide to automate chat leads with n8n: catch the Alee webhook, branch by intent, and push leads to CRM, Google Sheets, Slack, and email.

Your Alee bot can answer questions all day, but a captured name and email is only worth something if it lands somewhere you'll act on it. n8n is the glue: it catches every lead Alee sends, then fans it out to your CRM, a Google Sheet, a Slack channel, and an email — all in one visual workflow, no code. This guide builds that workflow end to end, including branching for hot vs. cold leads and a worked example you can copy.

What you're building

The shape of the automation is simple:

  1. A visitor chats with your Alee bot and shares their name, email, or phone.
  2. Alee fires a webhook — an HTTP POST carrying the lead and conversation details — to a URL you control.
  3. n8n receives that POST on a Webhook node, then runs whatever steps you wire up: save to a sheet, create a CRM contact, ping Slack, send an email.
  4. Optionally, n8n branches: hot leads (say, anyone who mentioned pricing or a demo) get an instant Slack alert and a CRM task; everyone else just lands in a nurture sheet.

n8n can be the cloud version or self-hosted on your own server — common in India for keeping data in-country and avoiding per-execution pricing. Either works; the only thing that matters is that n8n exposes a public webhook URL Alee can reach.

Step 1: Create the webhook in n8n first

You need n8n's URL before Alee has anywhere to send to, so start here.

  1. In n8n, create a new workflow and add a Webhook node as the trigger.
  2. Set the method to POST.
  3. Copy the Production URL (and note the Test URL too — you'll use that while building).
  4. Leave Respond on "Immediately" so Alee gets a fast 200 back and the chat never lags.
  5. Click Listen for test event so the node waits to capture the first real payload.

Keep this tab open — you'll come back once Alee has sent a sample.

Step 2: Point Alee's lead webhook at n8n

In your Alee dashboard, open the bot you want to wire up and find its leads / integrations settings — the area where you configure where captured contacts go (CRM, Google Sheets, email, or a webhook).

  1. Choose the webhook option as the destination.
  2. Paste the n8n Test URL for now (you'll swap to the Production URL once everything works).
  3. Make sure lead capture is actually turned on for the bot — Alee should be asking for name, email, or phone at a natural point in the chat. If you haven't set that up, do it first; the webhook only fires when there's a lead to send.
  4. Save.

If Alee offers a "send test" button, use it. Otherwise, open your bot's preview chat, trigger the lead capture (give it a fake name and email), and let the conversation complete.

Step 3: Capture the payload and see your fields

Back in n8n, the Webhook node should now show the captured event. Expand it and look at the JSON. You'll typically see fields like the lead's name, email, phone, the bot name or ID, a timestamp, and often the conversation transcript or the question that triggered capture.

Write down the exact field paths n8n shows — for example body.email, body.name, body.message. You'll reference these in every node downstream using n8n expressions like {{ $json.body.email }}. Getting the paths right here saves you debugging later.

If a field you expected is missing, it's almost always because the bot didn't collect it. Adjust what the bot asks for, or treat that field as optional in your workflow.

Step 4: Send the lead to your destinations

Now add nodes after the Webhook node — in parallel (drag multiple connections out of it) or in sequence. Here are the common destinations and what to set.

Google Sheets (the simplest reliable log)

  • Add a Google Sheets node, action Append row, then connect your account and pick the spreadsheet and tab.
  • Map columns to expressions: Name → {{ $json.body.name }}, Email → {{ $json.body.email }}, Phone → {{ $json.body.phone }}, Source → {{ $json.body.botName }}, Time → {{ $json.body.timestamp }}.
  • A sheet is the perfect catch-all backup even if you also push to a CRM — you always have the raw list.

CRM (HubSpot, Zoho, Pipedrive, etc.)

  • Add your CRM's node (n8n has native nodes for HubSpot, Zoho CRM, Pipedrive, Salesforce, and more).
  • Use the Create or update contact action matched on email so re-submissions don't create duplicates.
  • Map name, email, phone, and add a note with the conversation context so your salesperson opens the follow-up already knowing what the person wanted.
  • If your CRM isn't on the list, use a generic HTTP Request node to hit its API directly.

Slack (instant team alert)

  • Add a Slack node, action Send message, to a channel like #leads.
  • Write a readable message: New lead from {{ $json.body.botName }}: {{ $json.body.name }} ({{ $json.body.email }}) — asked: "{{ $json.body.message }}".
  • This is the fastest way for a human to jump on a hot lead within minutes.

Email (for you or the lead)

  • Add an Email / SMTP node (or Gmail). Send the lead details to your own inbox to notify the team.
  • To auto-reply to the lead, send to {{ $json.body.email }} with a short, warm "thanks, we'll be in touch" — only if the visitor expects a reply.

WhatsApp / SMS (India-friendly)

  • If you run WhatsApp Business or an SMS provider with an API, add an HTTP Request node to message {{ $json.body.phone }}. For Indian audiences a WhatsApp confirmation often converts better than email.

Step 5: Add branching for hot vs. cold leads

Not every lead deserves the same treatment. Use n8n's IF node (two outcomes) or Switch node (many outcomes) to route them.

A simple hot/cold split with an IF node:

  1. Add an IF node right after the Webhook node.
  2. Set a condition that defines "hot." For example: the triggering message contains pricing, demo, buy, or quote. In n8n you can use a condition like {{ $json.body.message }} contains pricing, and add OR rows for the other keywords.
  3. True branch (hot): Slack alert → create a CRM task/deal → append to sheet with a "HOT" tag.
  4. False branch (cold/nurture): append to a nurture sheet → optional gentle auto-email. No Slack ping, so the channel stays signal, not noise.

Other branch ideas:

  • By bot. If you run multiple client bots (the Agency or Scale plans let you), switch on {{ $json.body.botName }} and route each client's leads to their own sheet, channel, or CRM pipeline.
  • By field completeness. If a phone number is present, send WhatsApp; if only email, send email.
  • By geography. If you collect a city or pin code, route metro leads to one rep and the rest to another.

Step 6: Test, then go live

  1. Run the workflow in n8n's editor with the Test URL still active and fire a test lead from Alee. Watch each node light up green.
  2. Fix any red node — usually a wrong field path or an unauthenticated credential.
  3. Once the full chain works, swap the Alee webhook from the Test URL to the Production URL, and toggle the n8n workflow to Active. The Test URL only listens while you're watching; Production runs always-on.
  4. Send one more real lead end to end and confirm it reaches every destination.

Worked example: gym membership leads

Say you run a gym and your Alee bot answers questions about timings, fees, and trainers, then asks for the visitor's name and phone.

  • Webhook node catches: name, phone, message ("Do you have a women's batch in the morning?"), botName ("FitZone Bot").
  • IF node checks if message contains join, fees, membership, batch, or trial.
  • Hot branch: Slack to #walk-ins ("Hot lead — Priya, 98xxxxxxx, wants the morning women's batch"), create a Zoho CRM lead with the question in the notes, and append to Google Sheets tagged HOT.
  • Cold branch: append to a nurture sheet and send a WhatsApp with the fee card.

Your front-desk staff sees Priya in Slack within seconds and calls before she's left the website, while the sheet and CRM keep a clean record for follow-up.

Tips and troubleshooting

  • No payload arriving? Re-check the n8n URL in Alee, that lead capture is on, and that the node is listening (Test URL) or the workflow is Active (Production URL).
  • Fields look empty? The path is often $json.body.<field>, not $json.<field>. Match exactly what the Webhook node shows.
  • Duplicates in your CRM? Use "create or update" matched on email instead of "create."
  • Consent and privacy. You're collecting personal data — add a short consent line in the chat, mention the bot in your privacy policy, and only auto-message people who expect to hear back.
  • Prefer no n8n? Alee can also send leads straight to a CRM, Google Sheets, or email without a middle layer. Use n8n when you want branching, multiple destinations, or enrichment. See the features overview for the native options, and more guides for related walkthroughs.

n8n turns a single Alee webhook into an entire lead pipeline — logged, routed, alerted, and followed up — without writing a line of code. Build it once and every future lead flows through automatically. If you're still choosing a platform, here's how Alee stacks up in our Alee vs SiteGPT comparison, and you can browse the full tutorials library for more.

Frequently asked questions

Do I need a paid plan to use the n8n webhook?

Lead capture and the webhook destination are part of how Alee routes leads, and you can start experimenting on the Free plan within its monthly message limit. As your volume grows you'll likely want a paid tier for more bots and messages — compare them on the pricing page.

What data does Alee send in the webhook payload?

Typically the captured lead fields (name, email, phone), which bot sent it, a timestamp, and the conversation context such as the triggering question or transcript. The exact fields depend on what your bot is configured to collect — inspect the first real payload in your n8n Webhook node to see precisely what you get.

Can I send the same lead to more than one place at once?

Yes. Drag multiple connections out of the n8n Webhook node, or chain nodes in sequence, to push a single lead to Google Sheets, your CRM, Slack, and email simultaneously. Add an IF or Switch node when you want different leads to take different paths.

Ready to turn conversations into a real pipeline? [Start free](/signup) with Alee, capture your first lead, and wire it into n8n in an afternoon.

Try it in your own Alee bot

Train it on your site, embed it anywhere, capture leads 24/7. Free to start, no card.

Keep learning