AI-Powered Website Lead Scoring and Auto-Response System - n8n Workflow

Use this robust n8n workflow to instantly qualify website leads using GPT-4o-mini. Save scored data to Google Sheets, send team notifications via Telegram, and deliver personalized auto-replies using the Gmail n8n node.

Workflow Preview

Ready to automate?

Download this n8n workflow template and start using it instantly.

Who is this best for?


  • Sales and marketing teams seeking to automate lead qualification.

  • Agencies handling high volumes of inbound client inquiries.

  • B2B businesses needing to prioritize follow-up based on lead quality.

  • Developers looking for powerful n8n templates integrating AI and core services.

Overview

Manual lead qualification is a major bottleneck for fast-growing businesses. This advanced n8n workflow solves this by creating a hands-free, intelligent pipeline from form submission to team action. When a prospect submits a form, the custom n8n trigger instantly catches the data. The core value lies in the AI Lead Scoring Agent, which utilizes GPT-4o-mini to analyze the request details against predefined criteria, returning a clear priority score (like 🔴 for VIP leads). This ensures sales teams focus their efforts efficiently. By utilizing this n8n template, you gain speed, consistency, and scalability in your lead management process, combining essential services like Gmail, Telegram, and Google Sheets into one seamless n8n automation.

How it Works

This comprehensive n8n workflow executes a series of actions immediately upon receiving a lead submission:


  1. Website Form Submission (n8n trigger): The process begins when the Webhook n8n node receives a POST request from your website form. This node acts as the primary n8n trigger for the entire automation.

  2. Extract Form Fields & Priority Score: Two separate Set n8n node instances extract all relevant contact and request details, as well as the specific field containing the scoring input, prepping the data for the next steps.

  3. AI Lead Scoring Agent: The extracted priority data is fed into the LangChain Agent n8n node, which connects to GPT-4o-mini. The agent executes a carefully structured prompt to analyze the input and return a single emoji (⚪️ to 🔴) representing the lead score.

  4. Combine Form Data with Score: A Merge n8n node combines the original, clean form fields with the newly generated AI score output, creating a single, complete lead item.

  5. Save to Lead Database: The complete lead profile (including the AI score) is appended to a designated Google Sheets database using the Google Sheets n8n node.

  6. Notify Sales Team: Simultaneously, the Telegram n8n node sends an instant, detailed notification to the sales channel, ensuring immediate visibility and follow-up based on the AI score.

  7. Prepare & Send Auto-Reply: Helper nodes prepare the personalized data, and the Gmail n8n node sends a professional, immediate auto-reply email to the prospect, confirming receipt and setting expectations.

Installation Guide

To deploy and utilize this n8n workflow successfully, follow these steps:


  1. Import the n8n template: Copy the provided JSON and paste it into your n8n instance using the 'Import Workflow' function.

  2. Configure Credentials: You must provide credentials for the following services:

OpenAI: For the AI Lead Scoring Agent n8n node.
Google Sheets: To connect to your lead database.
Gmail: For sending the auto-reply email.
Telegram: For sending notifications.

  1. Set up the Webhook n8n trigger: Activate the Website Form Submission webhook and copy the generated testing or production URL.

  2. Update Website Form: Configure your website's contact form to send POST data to the n8n webhook URL.

  3. Customize Placeholders: In the Save to Lead Database (Google Sheets n8n node), replace YOURGOOGLESHEETID with your actual Sheet ID. In the Notify Sales Team (Telegram n8n node), replace YOURTELEGRAMCHATID.

  4. Verify Field Mapping: Review the Extract Form Fields n8n node. If your form uses different field indices, adjust the JSON Path expressions ($json.body.data.fields[X].value) to correctly capture all lead data.

  5. Customize AI Logic: Fine-tune the scoring criteria within the prompt of the AI Lead Scoring Agent n8n node to match your business priorities.

  6. Activate: Save and activate your new n8n workflow.

Node Details

Website Form Submission (Webhook n8n trigger):
Function: Serves as the starting point (n8n trigger), listening for POST data from an external website form.
Key Configuration: Configured to listen on the path website-form-submissions.
Extract Form Fields & Extract Priority Score (Set n8n node):
Function: Cleans and normalizes the complex incoming webhook JSON payload into accessible variables (e.g., First Name, Email). The second instance specifically isolates the score input.
Key Configuration: Uses expression mapping to extract values based on JSON path (e.g., {{ $json.body.data.fields[0].value }}). Needs adjustment if form structure changes.
AI Lead Scoring Agent (LangChain Agent n8n node):
Function: The central intelligence of this n8n workflow. It uses GPT-4o-mini to classify and score the lead request based on detailed instructions.
Key Configuration: Utilizes gpt-4o-mini for cost efficiency. The prompt dictates a strict output format (emoji only) and dynamically references the lead criteria from the original n8n trigger data.
Combine Form Data with Score (Merge n8n node):
Function: Takes the clean form data from one branch and merges the AI-generated lead score from the parallel branch, preparing a complete data item.
Key Configuration: Mode set to combine, method combineAll.
Save to Lead Database (Google Sheets n8n node):
Function: Appends the full lead record, including the AI score, to a designated Google Sheet.
Key Configuration: Operation is append. Uses expressions like ={{ $json['Email'] }} to map incoming data to sheet columns.
Notify Sales Team (Telegram n8n node):
Function: Sends a structured notification containing all lead details and the clear AI priority emoji to the sales team's Telegram chat.
Key Configuration: Message body is custom-built using expressions to display data fields and the {{ $json.output }} score.
Send Auto-Reply Email (Gmail n8n node):
Function: Delivers a personalized confirmation email to the prospect.
* Key Configuration: sendTo uses ={{ $json['Email'] }}. The subject and body are templated with the prospect's name and request type.

Related n8n Workflows

Free

Nodes: 10 Nodes
Updated: December 26 2025
View all
Created by
Mattis
Mattis

Consultant et expert en automatisation. Co-fondateur de l'agence PerformAi. Pas qu'un simple créateur, j'écoute et comprends l'importance pour simplifier votre activité au quotidien. On en discute ?

Featured*