Score and route inbound leads with Gemini, website enrichment, Slack and Sheets
Quick overview This workflow receives inbound lead submissions via webhook, validates and enriches them with basic website scraping, scores fit and intent using Google Gemini, logs every lead to Google Sheets, and alerts a Slack channel when a lead scores as hot.
How it works Receives a POST request on a webhook endpoint for inbound lead details and immediately returns a 200 response with a generated lead ID. Normalizes the payload into consistent fields (name, email, company, website, job title, message), flags free or disposable emails, and marks obvious spam/test submissions as junk. If the lead looks valid, calls a public email scoring API to get an email verdict/score and marks the lead as junk if the verdict is invalid or disposable. For non-junk leads, fetches the company homepage and extracts a short plain-text summary from the HTML for enrichment. Sends the lead details and extracted website text to Google Gemini and parses structured JSON containing an ICP score, tier (hot/warm/cold), key reasons, next action, and confidence. Combines the Gemini output with the lead record, appends the result to a Google Sheets tab named "Leads", and posts a formatted Slack alert when the tier is hot.
Setup Add Google Gemini API credentials (Google AI Studio/Vertex Gemini connection) for the Gemini chat model used to score leads. Add Google Sheets OAuth2 credentials and replace the placeholder spreadsheet ID in the Config step, ensuring the spreadsheet has a sheet/tab named "Leads". Add Slack OAuth2 credentials with permission to post messages, and replace the placeholder Slack channel ID in the Config step. Update the ICP description and the hot/warm threshold values in the Config step to match your qualification criteria. Copy the webhook URL from the webhook trigger and configure it in your form or lead source to send JSON via HTTP POST.
Additional info Need it installed? I set this up in your n8n on Fiverr, starting around $20: https://www.fiverr.com/mouwah/set-up-a-tested-n8n-invoice-approval-or-lead-routing-workflow-in-your-n8n Pro version (email typo rescue, speed-to-lead tracking, more routing tiers): https://mohabaha0.gumroad.com/l/lead-routing-pro
Related Templates
AI Weather Forecasts with MCP Integration
Real-time Weather Forecasts with MCP Tools This n8n workflow demonstrates how to integrate real-time weather intelligen...
Google Sheets UI for n8n Workflow
Google Sheets UI for Workflow Control This n8n template provides a practical and efficient way to manage your n8n workf...
Demo Workflow - How to use workflowStaticData()
This workflow demonstrates how to use the workflowStaticData() function to set any type of variable that will persist wi...
๐ Please log in to import templates to n8n and favorite templates
Workflow Visualization
Loading...
Preparing workflow renderer
Comments (0)
Login to post comments