Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Select an option

  • Save conradcaffier03/14ac281d313d9406e67438d7ea9b0a5f to your computer and use it in GitHub Desktop.

Select an option

Save conradcaffier03/14ac281d313d9406e67438d7ea9b0a5f to your computer and use it in GitHub Desktop.
n8n lead-automation blueprint — node by node (reel: SYSTEM)
Error in user YAML: (<unknown>): mapping values are not allowed in this context at line 2 column 327
---
name: lead-automation-blueprint
description: The exact n8n blueprint for a lead automation that turns an inbound lead into a booked call and a personal follow-up — while you sleep. Node-by-node build (Cal.com/Form → normalize → guardrail → AI qualify → Gmail follow-up → log; Telegram fallback for edge cases). No keys, just the buildable structure. Triggers: "lead automation", "n8n lead workflow", "book calls on autopilot", "auto follow-up email".
---

🆓 The Lead Automation Blueprint — a lead → a booked call, while you sleep

This is the exact n8n workflow I run for inbound leads — rebuilt as a blueprint you can wire in an afternoon. It captures a lead from two sources, lets an AI qualify + write a personal follow-up, sends it instantly, logs everything, and pings me on Telegram only for the edge cases. Given away free by @buildwith.conrad.


What it does (plain English)

A lead lands — from a Cal.com booking or your own form — and the workflow handles the whole first touch without you: it cleans the data, checks it's a real lead, has Claude write a personal reply, sends it via Gmail, and logs the lead + the reply. Anything that looks off gets flagged to you on Telegram instead of going out automatically. You wake up to booked calls and sent follow-ups.

 Cal.com booking ─┐
                  ├─▶ normalize ─▶ guardrail ─▶ valid? ─┬─ yes ─▶ AI writes follow-up ─▶ Gmail ─▶ log
 Lead form ───────┘                                     └─ no/err ─▶ Telegram alert ─▶ log

Build it in n8n (node by node)

  1. Two triggers → one shape. Add a Webhook node for your Cal.com booking and a Webhook node for your lead form. After each, a Edit Fields (Set) node that maps the incoming payload to the same fields: name, email, message, source. Now everything downstream is identical.

  2. Guardrail check. A Code node that sanity-checks the lead: valid email, not empty, not obvious spam. Output a boolean isValid (+ a short reason).

  3. Branch on it. An IF node on isValid → true goes to the AI path, false/error goes to the alert path.

  4. AI writes the follow-up (true path). An AI Agent node with Anthropic (Claude) as the chat model. Prompt it with the lead's name + message and your positioning; ask for a short, personal follow-up email (subject + body). A Code node after it tidies the output into subject / html.

  5. Send + log. A Gmail node (send: message) fires the follow-up instantly. Then a Supabase node (create: row) logs the lead + the reply so you have a record.

  6. Edge cases → you (false path). A Telegram node messages you the flagged lead + the reason, and a Supabase node logs it. You handle those by hand — the automation never sends something sketchy.

Wire it up (5 min)

  1. In n8n, drop the nodes above onto the canvas and connect them left → right as in the diagram.
  2. Point the two Webhooks at your Cal.com "booking created" event and your form's submit action.
  3. Add your Anthropic, Gmail, Supabase and Telegram credentials in n8n (each is a guided "Connect" flow — no code).
  4. Put your own qualify-prompt + follow-up-prompt into the AI Agent node (this is where your voice lives).
  5. Activate the workflow. Send yourself a test lead through the form and watch it run end to end.

Free tiers cover the whole build to try it: n8n (self-host or cloud trial), Supabase, Telegram, and a small Anthropic balance. No paid stack needed to see it work.

Where this comes from

This is one system out of the lead machine I build for clients — capture → qualify → book → nurture, on autopilot. If it was useful, the First Product and Content-to-Cash kits turn this kind of build into an actual offer you can sell: buildwith.conrad bio link.


Free giveaway from @buildwith.conrad — keyword SYSTEM.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment