Projects / Lead generation
Live demo

LeadPilot AI

Scores every inbound lead against the ideal client profile, explains the score and writes a personal first email — a human approves the hot ones in Slack.

n8nOpenAIPostgreSQLSlackGmail

Business problem

Inbound leads wait hours or days for a reply while someone reads each form, researches the company and decides who deserves a call. Good leads go cold, and the team wastes time on spam, students and vendor pitches.

Solution

The form gets an instant response while n8n enriches and scores the lead with OpenAI against an ICP kept in the database. Hot leads go to Slack with an editable draft and a one-click approve; warm leads get a personal email via Gmail; spam is filtered out. Follow-ups stop the moment the lead replies.

What it saves

≈ 48 hours and $1,400+ saved per month

for a team receiving 200 inbound leads a month

  • Manual handling: ~15 min per lead to read, research the company and write a first reply → 50 h/month.
  • With LeadPilot: a person only reviews hot leads (~20%), about 3 min each → 2 h/month.
  • 48 hours saved × $30/h ≈ $1,440 per month, before counting deals won by replying in minutes instead of days.
Illustrative estimate based on the assumptions above. Every business is different: the numbers are worked out for your process before anything is built.

Ways to adapt it to your business

  • Lead sources: website forms, Typeform / Tally, Webflow, LinkedIn lead forms, a shared inbox.
  • CRM: HubSpot, Pipedrive, Salesforce, Zoho or Airtable.
  • Outreach: Gmail, Outlook / Microsoft 365, or a sequencing tool such as Instantly or lemlist.
  • Approval in Slack or Microsoft Teams; routing to the right salesperson by region or deal size.
  • Enrichment from the company website, Apollo, Clearbit or LinkedIn data.

Tech stack

n8n
orchestrates the four workflows, retries and error alerts
OpenAI
scores the lead and writes the email, with strict JSON schemas
PostgreSQL
leads, event log, configuration (ideal client profile, thresholds)
Slack
hot-lead review, alerts, sent emails
Gmail
sends the email and detects replies
Live demo

Try the AI lead qualification agent

Fill in the form like a real lead. The workflow scores it against the ideal client profile, explains the score and writes the first email — live, in n8n.

Runs live here

  • Form → validation → AI scoring with reasoning
  • Personal first email written by AI
  • Slack: hot-lead review with approve / edit, posted emails

Built, connected per client

  • Sending via Gmail and follow-ups with reply detection
  • Enrichment: Firecrawl (website), Apollo (company data)
  • HubSpot CRM sync

Inside the workflows

Real screenshots from n8n, with what every node does.

01 · Lead intake & AI scoring

Lead WebhookNormalize &ValidatetruefalseIs Valid?Respond 400Upsert LeadRespond 202truefalseIs New Lead?Log ResubmissionLoad ConfigtruefalseHas Company Domain?Scrape WebsiteApollo EnrichBuild AI ContextAI Score LeadParse ScoreSave ScoreHubSpot UpsertContacttruefalseQualified?Mark Nurture /DisqualifiedBuild Email PromptAI Write EmailParse EmailSave DrafttruefalseHot Lead?Slack: Review HotLeadSend EmailMark ContactedSlack: Warm LeadContactedtruefalseDemo Lead?Slack: Demo EmailMark Contacted(Demo)Log Slack (Review)Log Slack (DemoEmail)Log Slack(Contacted)
Drag to move · scroll or pinch to zoom · click a node
  1. Lead Webhook

    Receives the form submission over HTTPS. Works with any form tool that can send a webhook.

  2. Normalize & Validate

    Maps different form field names to one format, checks the email and catches bots with a honeypot field. Detects free email domains and the company website.

  3. Is Valid? · Respond 400

    Invalid submissions get a clear 400 error and never reach the database or the AI.

  4. Upsert Lead

    Saves the lead in PostgreSQL. The same email twice updates the existing lead instead of creating a duplicate.

  5. Respond 202

    Answers the form immediately, so the visitor never waits for enrichment or AI.

  6. Is New Lead? · Log Resubmission

    A returning lead is logged as a resubmission and not processed again.

  7. Load Config

    Reads the ideal client profile, score thresholds and Slack settings from a database table, so they change without editing the workflow.

  8. Has Company Domain? · Scrape Website · Apollo Enrich

    If the lead has a company website, it is scraped and enriched with firmographics. Both calls continue on error, so a slow API never blocks a lead.

  9. Build AI Context · AI Score Lead · Parse Score

    Builds the scoring prompt, calls OpenAI with a strict JSON schema and turns the result into a 0–100 score with a breakdown: company fit, need, intent and authority.

  10. Save Score · HubSpot Upsert Contact

    Stores the score and reasoning, and syncs the contact to the CRM.

  11. Qualified? · Mark Nurture / Disqualified

    Cold leads go to nurture and spam is disqualified, each with the AI’s reason. No email is sent to them.

  12. Build Email Prompt · AI Write Email · Parse Email · Save Draft

    A second prompt writes a short personal first email using the analysis and a personalisation hook. The draft is saved with the lead.

  13. Hot Lead? · Slack: Review Hot Lead

    Hot leads are never emailed automatically: Slack gets the score, the reasoning, the draft and a link to review, edit and send.

  14. Send Email · Mark Contacted · Slack: Warm Lead Contacted

    Warm leads get the email through Gmail straight away; the lead is marked contacted and the team is told in Slack.

  15. Demo Lead? · Slack: Demo Email · Mark Contacted (Demo)

    Website-demo leads take the same path, but the email is posted to a demo Slack channel instead of being sent.

  16. Log Slack (…)

    Every Slack message is stored with the lead, which is how this website can show you what the team received.

02 · Human approval

Review Page WebhookFind Lead (Review)Render Review PageRespond Review PageDecision WebhookFind Lead(Decision)truefalseValid Request?Respond ExpiredLoad ConfigtruefalseSend?Send Approved EmailMark Contacted(Approved)Slack: SentRespond SenttruefalseDemo Lead?(Approved)Build Demo EmailSlack: Demo Email(Approved)Mark Contacted(Demo Approved)Respond Sent (Demo)Mark ManualSlack: ManualRespond ManualLog Slack (DemoApproved)
Drag to move · scroll or pinch to zoom · click a node
  1. Review Page Webhook · Find Lead (Review)

    Opens from the Slack link. The link carries a one-time token, so only the person with the link can act, and a GET never sends anything.

  2. Render Review Page · Respond Review Page

    Shows the lead, the AI analysis and an editable draft: subject and body can be changed before sending.

  3. Decision Webhook · Find Lead (Decision) · Valid Request? · Respond Expired

    Receives the decision and checks the token again; used or wrong links get an “expired” page.

  4. Load Config · Send?

    Takes the edited text and the chosen action: send the email, or handle the lead personally.

  5. Send Approved Email · Mark Contacted (Approved) · Slack: Sent · Respond Sent

    Sends the approved email through Gmail, starts the follow-up sequence and confirms in Slack, noting if a human edited it.

  6. Mark Manual · Slack: Manual · Respond Manual

    If the salesperson takes over, automation stops for this lead and the team is told.

  7. Demo Lead? (Approved) · Build Demo Email · Slack: Demo Email (Approved) · Mark Contacted (Demo Approved) · Log Slack (Demo Approved) · Respond Sent (Demo)

    For website-demo leads the approved email is posted to the demo channel instead of being sent.

Technical implementation

Four n8n workflows: intake & scoring, human approval, follow-ups with reply detection, error handling. PostgreSQL holds leads, an event log and the config (ICP, thresholds), so routing changes without touching the workflow. OpenAI structured outputs with strict JSON schemas.

Business value

Every lead gets a reply in minutes, sales time goes to the right conversations, and every decision comes with a reason the team can check.

What this changes for the business

  • Every lead gets a personal reply within minutes, at any hour — the moment when interest is highest.
  • Salespeople stop researching and writing first emails: they only approve the best leads and talk to them.
  • Nothing slips through: every lead, score, email and decision is logged, with a reason the team can check.
  • The rules — who is a good client, what counts as hot — live in one table and change in minutes as the business grows.