Score and route B2B leads with Google Gemini, Google Sheets, Slack, and Gmail
Ready for 3.0Ready for 3.0. This template uses no nodes that n8n 3.0 removes. No removed nodes, versions or helpers found. Static check, last run 2026-10-19.
Nodes used (11)
- Google Sheets
n8n-nodes-base.googleSheets - HTTP Request
n8n-nodes-base.httpRequest - Edit Fields (Set)
n8n-nodes-base.set - Merge
n8n-nodes-base.merge - Switch
n8n-nodes-base.switch - Gmail
n8n-nodes-base.gmail - Slack
n8n-nodes-base.slack - Webhook
n8n-nodes-base.webhook - If
n8n-nodes-base.if - Google Gemini
@n8n/n8n-nodes-langchain.googleGemini - Code
n8n-nodes-base.code
What it does
Quick overview This workflow accepts new leads via a webhook, validates and deduplicates them in Google Sheets, enriches contact and company details via HTTP APIs, scores the lead with Google Gemini, then saves the result back to Google Sheets and notifies the team via Slack and Gmail based on the lead tier. How it works 1. Receives a lead submission via a POST webhook endpoint. 2. Extracts the form fields, normalizes key values (like email and website), and validates that required fields are present. 3. Looks up the lead by email in Google Sheets and only continues if no existing record is found. 4. Fetches contact and company enrichment data from external HTTP endpoints and maps the responses into structured enrichment fields. 5. Merges the original lead data with enrichment details, builds a scoring prompt, and sends it to Google Gemini to return a JSON score, tier, summary, reasons, confidence, and recommended action. 6. Parses the Gemini JSON response, merges it back into the lead profile, and routes the lead into Hot, Warm, or Cold. 7. Appends the tiered lead record to Google Sheets with the appropriate status and sends matching Slack and Gmail notifications. Setup 1. Configure the webhook URL (path: lead-intake) in your lead capture form or source system. 2. Add Google Sheets credentials and update the spreadsheet/document IDs and sheet tab for the duplicate check and the Hot/Warm/Cold “append row” actions. 3. Add a Google Gemini (PaLM) API credential and confirm the model selection and scoring prompt meet your qualification rules. 4. Add Slack and Gmail credentials, then set the target Slack channel and recipient email addresses used for Hot/Warm/Cold notifications. 5. Replace the placeholder enrichment URLs (dummyjson.com and jsonplaceholder.typicode.com) with your real enrichment providers, and adjust the field mappings to match their response format. Additional info How To Customize Nodes You can customize this workflow in several practical ways without changing the overall design: - Replace Fetch Contact Test Data with a real contact enrichment API and update Map Contact Enrichment to match that provider’s response. - Replace Enrich Company Data with a real company intelligence source and update Map Company Enrichment as needed. - Edit Build AI Scoring Payload to change the lead qualification criteria or tier thresholds. - Update the prompt in Score Lead With AI. if your business wants different scoring logic, industry preferences, or decision-maker weighting. - Modify the Score Router conditions if you want to use different tier labels. - Replace the Google Sheets storage nodes with CRM nodes if your team wants to store leads in another system. - Edit the Slack and Gmail message content in each tier branch so the follow-up matches your sales or marketing style. - Adjust the duplicate check logic in Find Existing Lead if you want to match by phone, domain, or another unique field instead of email only. Add-ons This workflow can be extended with additional features such as: - A CRM sync step after each Google Sheets append action. - Lead owner assignment based on territory, source, or score. - A retry path for failed enrichment or notification nodes. - Separate nurturing sequences for Warm and Cold leads using email automation tools. - A reporting dashboard based on the Google Sheets output. - An audit log or error log for failed validations, duplicate leads, or API issues. - A human approval step before Hot leads are sent to the sales team. Use Case Examples This workflow can support several business scenarios, including: - Scoring demo request leads before handing them to a sales team. - Qualifying website contact form submissions for B2B services. - Prioritizing inbound product inquiries based on company fit and buying intent. - Sending lower-value or lower-confidence leads into nurture instead of direct sales follow-up. - Creating a lightweight lead qualification system for teams that use Google Sheets instead o