Score, route, and reply to inbound leads with GPT-4o-mini, Gmail and Sheets
Ready for 3.0What this workflow does
This AI workflow has 24 nodes and runs when an HTTP POST request hits its webhook URL (plus 1 other trigger). Along the way it connects OpenAI Chat Model, Gmail, Telegram and Google Sheets.
How it runs
Trigger: When an HTTP POST request hits its webhook URL (plus 1 other trigger).
- Acknowledge Lead Submission (Respond to Webhook): sends the response back to the webhook caller
- Read Lead Log from Sheets (Google Sheets): uses Google Sheets
- Set Lead Fields (Edit Fields (Set)): sets 12 fields: lead_id, received_at, source…
- Filter: keeps only the items that match a condition
- Filter: keeps only the items that match a condition
- Generate Weekly Digest (Code): runs custom JavaScript code
- Lead Scoring Agent (AI Agent): runs an AI agent, with model: OpenAI GPT-4o-mini Model; output parser: Apply Scoring JSON Schema
- Post Weekly Digest on Telegram (Telegram): uses Telegram
- Compute Lead Score (Code): runs custom JavaScript code
- Prepare for Manual Review (Edit Fields (Set)): sets 5 fields: tier, score, next_step…
…plus 10 more steps. See the full node list below.
Services it uses
Other Google Sheets + Gmail templates (2,102) · Other OpenAI + Google Sheets templates (2,011) · Other OpenAI + Gmail templates (1,623)
Before you upgrade to n8n 3.0
Nothing in this workflow is removed in n8n 3.0, so it should import and run after the upgrade.
Nodes used (13)
- Webhook
n8n-nodes-base.webhook - Respond to Webhook
n8n-nodes-base.respondToWebhook - Edit Fields (Set)
n8n-nodes-base.set - Filter
n8n-nodes-base.filter - AI Agent
@n8n/n8n-nodes-langchain.agent - OpenAI Chat Model
@n8n/n8n-nodes-langchain.lmChatOpenAi - Structured Output Parser
@n8n/n8n-nodes-langchain.outputParserStructured - Code
n8n-nodes-base.code - Switch
n8n-nodes-base.switch - Gmail
n8n-nodes-base.gmail - Telegram
n8n-nodes-base.telegram - Google Sheets
n8n-nodes-base.googleSheets - Schedule Trigger
n8n-nodes-base.scheduleTrigger
From the author
Quick overview This workflow receives inbound leads via a webhook, filters spam, and uses OpenAI GPT-4o-mini to score and draft replies. It routes hot leads to Gmail and Telegram alerts, logs all leads to Google Sheets, and sends a weekly Telegram digest from…