Qualify inbound leads with GPT-4.1 mini, Telegram and Google Sheets

Go to Workflow
0 views
Built by NodeFlow Studio NodeFlow Studio
Created on August 06, 2026

Description

Quick Overview
This workflow receives inbound leads via a webhook, optionally fetches and cleans the company website content, uses OpenAI (GPT-4.1 mini) to qualify and score the lead and generate outreach copy, sends a Telegram alert for high-priority leads, and logs every result to Google Sheets.

How it works
Receives a lead submission via a POST webhook with fields like name, email, company, website, phone, and message.
Normalizes the incoming lead fields into a consistent structure for downstream processing.
If a website is provided, downloads the website HTML and trims/cleans it to a limited text payload.
Combines the lead details with the cleaned website content and sends it to OpenAI (GPT-4.1 mini) to produce a structured lead qualification report with score, priority, intent, recommended follow-up, and outreach messages.
Checks whether the AI lead score is 70 or higher and, if so, sends a formatted high-priority alert via Telegram.
Appends the lead details and the AI-generated qualification and outreach fields to a Google Sheets spreadsheet.

Setup
Create an OpenAI credential in n8n and ensure the workflow can access the GPT-4.1 mini model.
Add a Telegram bot credential and set the target chat for where high-priority lead alerts should be delivered.
Connect Google Sheets OAuth2 credentials and update the target spreadsheet/document ID, sheet name, and column headers to match the fields being appended.
Copy the webhook URL from the “Receive Lead” trigger and configure your lead source (form, website, or CRM) to POST the expected fields to it.

Nodes Used (7)

AI Agent
@n8n/n8n-nodes-langchain.agent
Code
n8n-nodes-base.code
Google Sheets
n8n-nodes-base.googleSheets
HTTP Request
n8n-nodes-base.httpRequest
OpenAI Chat Model
@n8n/n8n-nodes-langchain.lmChatOpenAi
Structured Output Parser
@n8n/n8n-nodes-langchain.outputParserStructured
Telegram
n8n-nodes-base.telegram