Downloads
Download the n8n workflow (JSON)
ai-lead-qualification-approval-n8n-gemini.json · n8n workflow · 13 steps · starts with Lead Capture Form · uses Google Gemini, Google Sheets, Gmail · 35 KB
Import into n8n: Create Workflow, then the menu, then Import from File.
How to import it into n8n
- In n8n, create a new workflow.
- Open the ⋯ menu at the top right and choose Import from File, then pick the downloaded .json. (Or open the file, copy everything and paste it on the canvas.)
- Open each node with a warning and connect your own account: the file carries no passwords or keys.
- Run it once with Test workflow, check the result, then switch it to Active.
What this workflow does
Someone fills your lead form. Within a minute Gemini scores them from 0 to 100 against your ideal customer, labels them hot, warm, cold or spam, writes a short reason and drafts a reply. Every lead goes into a Google Sheet that works as a simple CRM. Good leads land in your sales inbox with the draft, and you can send it, edit it or decline it right from the email. Nothing reaches the lead until a person says yes.
Who it is for
Agencies, consultants, freelancers and B2B service or SaaS teams that get leads from a website form and want quicker, more personal first replies without paying for a CRM.
What you need
- n8n (Cloud or self-hosted)
- A Google AI Studio API key for Gemini (the free tier is enough for normal lead volume)
- A Google account for Sheets and Gmail
- Self-hosted only:
WEBHOOK_URLset to your public n8n URL, so the approval buttons in the email open
The workflow, step by step
Step 1 · Capture the lead
- Lead Capture Form (n8n Form): name, work email, company, website, monthly budget and "How can we help?".
- Workflow Configuration (Set): your business description, ideal customer profile, sales inbox, score threshold, booking link and sender name. This is the only node you need to fill in.
Step 2 · Score with Gemini
- Qualify Lead with AI (Basic LLM Chain) with Google Gemini Chat Model and Lead Score Parser: returns score, tier, summary, reasoning, reply subject and a drafted reply.
- Use Fallback Score (Set): if the AI step fails after its retries, the lead is marked
needs_reviewinstead of being lost.
Step 3 · Save to the sheet
- Build Lead Record and Save Lead to Google Sheets: adds the lead, or updates the row if the same email comes in again.
- Is Lead Worth a Reply? (IF): leads below your
hotLeadScoreare only logged.
Step 4 · Approve and reply
- Ask Sales to Approve Reply (Gmail, send and wait): emails the draft to your sales inbox with approve, edit and decline options.
- Reply Approved?, Send Reply to Lead and Update Lead Status: the approved reply goes out with your booking link, and the sheet status changes to Contacted or Manual follow-up.
Setup
- Download the JSON below and import it in n8n (Create workflow > ⋯ > Import from File).
- Create a Google Sheet with these headers in row 1: Submitted At, Name, Email, Company, Website, Budget, Message, Lead Score, Tier, AI Summary, AI Reasoning, Reply Subject, Draft Reply, Status, Last Updated.
- Add credentials for Google Gemini (PaLM) API, Google Sheets OAuth2 and Gmail OAuth2, and pick your spreadsheet in both sheet nodes.
- Fill in Workflow Configuration.
- Test it: submit the form as "Priya Shah, [email protected], Northwind Logistics, $5,000 - $20,000, our sales team copies web leads into HubSpot by hand and we want it automated in 6 weeks". You should get a score around 80, tier hot, a new row with Status New and an approval email. A "test test" lead with an "Under $1,000" budget should only be logged.
- Activate the workflow and share the form's production URL.
How to customise
- The prompt and emails are a starting point. Rewrite them for your business.
- Qualify Lead with AI: the scoring rules, tiers and reply style.
- Lead Capture Form: the questions (keep the sheet columns in sync).
- Ask Sales to Approve Reply: the approval email.
hotLeadScore: the score a lead needs before you are asked to reply.- Prefer another model? Swap the Gemini node for OpenAI, Anthropic or Ollama. Want approvals in Slack or Telegram? Replace the Gmail approval node.
Why Gemini
Lead scoring is short structured output on every form fill. Gemini Flash Lite is fast, cheap and has a free tier, which suits a step that runs on every lead.
Troubleshooting
- Approval buttons don't open: on self-hosted n8n, set
WEBHOOK_URLto your public URL. The workflow must also be active, not just tested. - Every lead says needs_review: the Gemini credential is missing or the key is wrong.
- Duplicate rows: the sheet match uses the Email column. Check the header is spelled exactly
Email.
Want the members-only resources too?
A free account unlocks them all, including the ones shared in DMs.

