Qualify and score Telegram leads with OpenAI, Google Sheets and Gmail
Ready for 3.0What this workflow does
This AI workflow has 15 nodes and runs on Telegram events (message). Along the way it connects Telegram, OpenAI, Google Sheets and Gmail.
How it runs
Trigger: On Telegram events (message).
- Workflow Configuration (edit me) (Edit Fields (Set)): sets 8 fields: business_name, business_description, services…
- Normalize + Route (Code): runs custom JavaScript code
- Route by State (Switch): routes items into 4 branches
- Build AI Request (Code): runs custom JavaScript code
- Hold (awaiting specialist) (Code): runs custom JavaScript code
- Unsupported (non-text) (Code): runs custom JavaScript code
- Rate Limited (Code): runs custom JavaScript code
- Score Lead with OpenAI (OpenAI): uses OpenAI
- Route Delivery (Switch): routes items into 3 branches
- Parse AI + Update State (Code): runs custom JavaScript code
…plus 4 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.
- Code node: the task timeout drops from 300s to 60s. Test with a realistic data volume.
Nodes used (8)
- Telegram Trigger
n8n-nodes-base.telegramTrigger - Edit Fields (Set)
n8n-nodes-base.set - Code
n8n-nodes-base.code - Switch
n8n-nodes-base.switch - OpenAI
@n8n/n8n-nodes-langchain.openAi - Telegram
n8n-nodes-base.telegram - Google Sheets
n8n-nodes-base.googleSheets - Gmail
n8n-nodes-base.gmail
From the author
Quick overview A Telegram bot that qualifies inbound leads with OpenAI, scores them against your own threshold, logs each one to Google Sheets, and emails your team through Gmail only when a conversation is actually worth a human's time. How it works 1.…