AutoFlowLab
← Templates

AI Lead Qualifier Workflow for n8n (Score and Route)

Free n8n workflow that scores inbound leads with GPT-4o mini, pushes hot leads to Slack and HubSpot, and logs the rest to Google Sheets. Import in minutes.

April 18, 2026 · n8n template

Free template · n8n

AI Lead Qualifier Workflow for n8n (Score and Route)

ai-lead-qualifier-n8n.json

Download JSON

Every form lead looks the same in your inbox, but a VP of Operations at a 200-person company and a student doing research are not the same lead. This n8n workflow puts an AI qualification step between your form and your CRM, so sales only sees leads worth their time.

What this workflow does

  • Webhook receives the form submission (name, email, company, title, company size, message)
  • OpenAI node scores the lead 1-10 and returns strict JSON: score, summary, reason
  • Code node merges the AI verdict back with the original lead fields
  • IF node checks score >= 7
  • High score: posts a formatted alert to a Slack channel and creates a HubSpot contact
  • Low score: appends the lead to a Google Sheets log so nothing is lost

The scoring prompt is included and already tuned: it rewards buying intent, decision-maker titles, and company size, and it pushes students, job seekers, and spam to the bottom. The model is forced to justify every score in one sentence, which makes spot-checking easy.

Prerequisites

  • A running n8n instance (cloud or self-hosted, v1.40+ recommended)
  • An OpenAI API key with access to gpt-4o-mini
  • Slack credentials (bot token with chat:write and access to your sales channel)
  • HubSpot credentials (private app token with contact write scope)
  • Google Sheets OAuth credentials and a spreadsheet with a “Low Priority Leads” tab

How to import

  1. Download the JSON file from the box at the top of this page.
  2. In n8n, go to Workflows → Import from File and select the file.
  3. Open each node marked with a credential placeholder (YOUR_OPENAI_CREDENTIAL, YOUR_SLACK_CREDENTIAL, YOUR_HUBSPOT_CREDENTIAL, YOUR_GOOGLE_SHEETS_CREDENTIAL) and attach your own credentials.
  4. Activate the workflow and copy the production webhook URL into your form tool (Typeform, Tally, Webflow, or a plain HTML form POST).

Send one test submission before going live — the webhook expects the fields under body (name, email, company, title, company_size, message), so adjust the OpenAI prompt expressions if your form uses different field names.

What to customize

  • The scoring rubric in the OpenAI system prompt — edit the 1-10 criteria to match your ICP (industry, deal size, regions)
  • The threshold in the IF node — 7 is a sensible default; raise it to 8 if sales complains about volume
  • Slack channel (#sales-hot-leads) and the message template
  • HubSpot mapping — add lifecycle stage or lead source properties if you use them
  • Spreadsheet ID and tab name in the Google Sheets node

If you want the full walkthrough of how this pattern works end to end, see the tutorial on automating lead capture into your CRM with AI.

Cost per run

Each lead costs one gpt-4o-mini call, roughly 400-700 tokens in and under 100 tokens out. As of mid-2026 that works out to a fraction of a cent per lead — even 3,000 leads a month should stay under a couple of dollars in OpenAI usage. n8n itself doesn’t charge per step, so the AI call is effectively the entire variable cost.

Try it yourself

n8n

n8n runs this entire qualification flow on a single workflow — no per-task fees, full control over the AI prompt, and self-hosting if you need leads to stay on your infrastructure.

Start with n8n