AI lead qualification in n8n: score every lead (free template)
By the TestedFlows team · Published October 16, 2026
This page contains affiliate links. If you sign up through them we may earn a commission, at no extra cost to you. How we make money.
Sales teams lose hours reading form submissions that were never going to buy. This workflow reads every new lead, asks an AI model to score it from 1 to 10 against your ideal customer, logs everything to a Google Sheet, and posts the strong ones straight to your sales channel in Slack.
What you’ll build: a hosted lead form → AI scoring → Google Sheets log → Slack alert for leads scoring 7 or higher. Time: about 20 minutes. You need: n8n (Cloud or self-hosted), an OpenAI API key, a Google account and a Slack workspace.
Download the free workflow templateHow the workflow works

- Lead form collects the lead’s details on a form page that n8n hosts for you.
- Score lead with AI sends the answers to an AI model, which returns a score, a tier (hot, warm or cold) and a one-line reason.
- Prepare lead row combines the form answers and the AI’s verdict into one clean record.
- Log lead in Google Sheets adds that record as a new row, so every lead is kept.
- Score 7 or higher? checks the score, and Alert sales in Slack posts the hot leads with the reason.
Each lead runs the workflow once, so on n8n Cloud each lead uses one execution, however many steps the workflow has.
Step 1: Import the template
- Download the template file above.
- In n8n, create a new workflow, open the ⋯ menu at the top right and choose Import from File. Select the downloaded file.
- The nodes appear on the canvas. Red warning triangles mean a node still needs your account connected, which you will do in the next steps.
Step 2: Set up the lead form
Open the Lead form node. It uses n8n’s built-in form, so you do not need Typeform or a website plugin. The template asks for name, work email, company, company size, monthly budget and what the lead wants to automate. This is the form your leads will see:

Change the title, description and fields to match your business. If you rename a field, update the matching expressions in the Score lead with AI and Prepare lead row nodes, which refer to fields by their label (for example $json['Monthly budget']).
The node shows two links: a Test URL for trying the form while you build, and a Production URL that works once the workflow is published. Put the production link on your website or in your email signature, or embed it on a page.
Already have a form on your website? Replace the Form Trigger with a Webhook node, or with your form tool’s own n8n trigger, and adjust the field names in the next two nodes.
Step 3: Connect the AI model and tune the scoring
The Score lead with AI node is n8n’s Information Extractor. It reads the lead’s answers and returns structured fields:

- Click the OpenAI model node under it and create a credential with your OpenAI API key. The template uses
gpt-5-mini, which is fast and cheap for this kind of task; any chat model n8n supports will work, including Anthropic, Gemini or a local Ollama model. - Open Score lead with AI and edit the description of the score attribute. This is where you describe your ideal customer. The template says: “Ideal: 11+ employees, budget over $500 a month, a clear process to automate.” Replace it with your own criteria, as specifically as you can.
- Under Options, the system prompt tells the model to be strict and use only the information given. Keep that instruction; without it, models tend to score everyone generously.
Tip: write the criteria the way you would brief a new salesperson. “Agencies and SaaS companies with 11 to 200 staff, budget over $500 a month, wants to automate lead handling or reporting” scores far more consistently than “good leads”.
Step 4: Connect Google Sheets
- Create a Google Sheet with these column headers in the first row:
submitted_at,name,email,company,size,budget,request,score,tier,reason. - Open Log lead in Google Sheets, connect your Google account, and choose the spreadsheet and the sheet tab.
The node is set to map columns automatically, so each field from Prepare lead row lands in the column with the same name. If you add a field later, add a column with the same name.
Step 5: Connect Slack
Open Alert sales in Slack, connect your Slack workspace, and set the channel (the template uses #sales). The message includes the score, name, company, budget, the AI’s reason and the email address, so a salesperson can act without opening the sheet.
To change the threshold, open Score 7 or higher? and edit the number. Leads below it follow the false branch and are only logged.
Step 6: Test and publish
- Click Execute workflow, then open the form’s Test URL and submit a strong lead: a 50-person company, a budget of $2,000 to $10,000, and a specific request.
- Check that each node turns green, the score is high, a row appears in your sheet and a message arrives in Slack.
- Submit a weak lead, such as a one-person company with a budget under $500 and a vague request. It should score low and skip Slack.
- When both behave as expected, click Publish so the production form URL goes live.
Test runs started from the editor do not count towards your n8n Cloud execution limit; only production runs do. See n8n pricing explained for details.
Common problems and fixes
The score is always high. Your criteria are too vague. Make the score description specific, and keep the “be strict” instruction in the system prompt.
“Cannot read properties of undefined” in Prepare lead row. A form field was renamed. Update the field names inside the expressions to match the new labels exactly.
Google Sheets adds a row with empty cells. The column headers in your sheet do not match the field names. Copy the headers from step 4 exactly, in lower case.
Slack says channel not found. Invite the n8n Slack app to the channel first, or pick the channel from the list instead of typing its name.
The AI step fails with a 429 error. Your OpenAI account has hit a rate or billing limit. Check your usage and billing in the OpenAI dashboard.
Ideas to extend it
- Auto-reply: add a Gmail or Outlook node on the hot branch to send a personal reply with your calendar link.
- CRM sync: replace or follow the Google Sheets step with HubSpot, Pipedrive or Airtable.
- Enrichment: before scoring, look up the company’s website or LinkedIn data with an HTTP Request node, so the AI has more to judge.
- Weekly digest: a scheduled workflow can read the sheet every Monday and post a summary of last week’s leads.
More free workflows are in the template library. New to n8n? Start with self-hosting n8n or try n8n Cloud.
Try n8n Cloud freeFrequently asked questions
How much does the AI scoring cost per lead?
Each lead is one short request to the model. With a small model such as gpt-5-mini, that is a tiny fraction of a cent per lead; check your provider’s current per-token prices for exact figures.
Can I use this without Slack?
Yes. Delete the Slack node, or replace it with an email, Microsoft Teams or Telegram node.
Is the lead data sent to OpenAI?
Yes. The form answers are sent to the AI provider you choose. If that is a concern, use a model you host yourself, such as Ollama on your own server, and check your provider’s data policy.
Does this work on n8n Cloud and self-hosted?
Yes. The template uses only built-in nodes that are available on both.
Get the free workflow template pack
Tested n8n workflows you can import in one click, plus a short email when new templates and comparisons go live.