AI-Powered Lead Scoring, Routing, and Slack Notification System - n8n Workflow

Use this robust n8n workflow to automatically qualify new leads via sentiment analysis using Google Gemini. Route Hot, Neutral, and Cold leads to Google Sheets and ensure instant team notification via Slack.

Workflow Preview

Ready to automate?

Download this n8n workflow template and start using it instantly.

Who is this best for?


  • Sales and Marketing teams needing instant, automated lead qualification.

  • Users looking for advanced AI-driven branching logic in their n8n templates.

  • Businesses that capture leads via forms (e.g., Typeform) and manage them in Google Sheets.

  • Developers seeking a practical example of integrating the Google Gemini n8n node into a production-ready system.

Overview

Lead qualification is a critical but time-consuming process. This advanced n8n workflow transforms raw lead data received from a webhook (like a Typeform submission) into actionable, scored insights using artificial intelligence. Instead of manually reviewing every submission, this n8n template uses the Google Gemini LLM to analyze the sentiment of the lead's message, automatically classifying them as 'Hot,' 'Neutral,' or 'Cold.'

This immediate scoring allows the n8n node architecture to automatically route the lead data to the correct section within Google Sheets, ensuring your sales team focuses only on the high-value 'Hot' leads first. Finally, the n8n workflow sends an immediate Slack notification, providing real-time visibility and dramatically reducing response time. This is a powerful, ready-to-use n8n template for modern sales operations.

How it Works

The entire process is initiated by an external event that hits a specified n8n trigger.


  1. Intake Trigger: The n8n workflow starts with the Receive New Lead (Typeform) n8n trigger node, configured as a POST webhook (/lead-webhook), ready to receive data from a form submission.

  2. Data Preparation: The Prepare Lead Data n8n node cleans and standardizes the incoming payload (name, email, message) to ensure consistency for the downstream AI process.

  3. AI Classification: The key automation step uses the Classify Sentiment n8n node (powered by the connected Google Gemini Chat Model n8n node). This node analyzes the lead's message content and outputs a sentiment score (Hot, Neutral, or Cold).

  4. Conditional Routing & Storage: Based on the sentiment output, the workflow branches immediately. The data is routed to one of three Google Sheets n8n node instances: Store Hot Lead, Store Neutral Lead, or Store Cold Lead. Each node appends the data to the appropriate sheet or tab.

  5. Recombination: After the data is stored, the Combine Lead Data (Merge) n8n node waits for all three potential branches to complete, merging the execution items back into a single flow.

  6. Team Notification: The final step uses the Send a message Slack n8n node to post a summary notification to a designated channel, completing the automation of this complex n8n workflow.

Installation Guide

To deploy this powerful n8n workflow template, follow these steps:


  1. Import the n8n Workflow: Copy the provided JSON data and paste it into your n8n instance via the 'New Workflow' > 'Import from JSON' option.

  2. Set up Credentials:

Google Gemini (PaLM) API: Provide your API credentials for the Google Gemini Chat Model n8n node.
Google Sheets: Authenticate your Google Sheets n8n node connections (all three storage nodes use the same credential). You must configure the documentId and sheetName in all three Google Sheets n8n node instances to point to your specific lead tracking spreadsheet.
* Slack: Configure OAuth2 credentials for the Send a message n8n node and specify the correct channelId.

  1. Configure the n8n Trigger: Activate the Receive New Lead (Typeform) n8n trigger node. Copy the generated Webhook URL and configure your external form (e.g., Typeform, JotForm) to send POST requests to this endpoint upon submission.

  2. Activate: Ensure all settings are correct, and activate the n8n workflow.

Node Details

Receive New Lead (Typeform) (Webhook n8n Trigger):
Function: Starts the n8n workflow when a lead form is submitted via a POST request.
Key Configuration: Path is set to /lead-webhook.
Prepare Lead Data (Set n8n Node):
Function: Standardizes the lead data fields (name, email, message) before AI processing.
Key Configuration: Maps incoming dynamic fields to standardized internal keys.
Classify Sentiment (Langchain Sentiment Analysis n8n Node):
Function: Analyzes the lead message text to determine sentiment (Hot, Neutral, Cold) using the linked LLM.
Key Configuration: Input Text references ={{$json["message"] || $json["mensagem"] || $json["resposta"]}} for internationalization or fallback fields. Output dictates the branching logic.
Google Gemini Chat Model (Langchain LLM n8n Node):
Function: Serves as the large language model backend for the sentiment classification n8n node.
Key Configuration: Requires Google Gemini API Credentials.
Store Hot/Neutral/Cold Lead (Google Sheets n8n Node):
Function: Persists the lead data into Google Sheets, organized by the AI-determined sentiment score.
Key Configuration: Operation is set to appendOrUpdate. Requires explicit configuration of the Document ID and Sheet Name for proper data handling in this n8n workflow.
Combine Lead Data (Merge n8n Node):
Function: Recombines the separate execution paths (Hot, Neutral, Cold) into a single flow item for unified notification.
Key Configuration: Set to accept 3 inputs.
Send a message (Slack n8n Node):
Function: Notifies the relevant team channel about the new, scored lead.
* Key Configuration: Requires Channel ID and OAuth2 authentication.

Related n8n Workflows

Free

Nodes: 8 Nodes
Updated: December 26 2025
View all
Created by

I help people build $5k+/month online by starting their own AI agency. Without BS.

Featured*