Score inquiry emails into Google Sheets leads with OpenAI and Telegram alerts
Ready for 3.0What this workflow does
This AI workflow has 13 nodes and runs on Gmail events. Along the way it connects Gmail, OpenAI Chat Model, Google Sheets and Telegram.
How it runs
Trigger: On Gmail events.
- Set lead settings (Edit Fields (Set)): sets 5 fields: telegramChatId, hotBudgetMin, defaultCurrency…
- Skip newsletters and auto-replies (Code): runs custom JavaScript code
- Is it a real inquiry? (If): checks a condition and branches into true / false
- Extract lead details with AI (Information Extractor): extracts structured fields from text with AI, with model: OpenAI Chat Model
- Check AI answer and score lead (Code): runs custom JavaScript code
- Is it a lead? (If): checks a condition and branches into true / false
- Keep only the lead row (Edit Fields (Set)): sets or maps fields
- Add or update lead row (Google Sheets): append or update
- Is it a hot lead? (If): checks a condition and branches into true / false
- Format hot lead alert (Code): runs custom JavaScript code
…plus 1 more step. See the full node list below.
Services it uses
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.
- Still check Gmail Trigger below v1.4 runs as v1.4 (drafts skipped, max emails per poll) (Check inbox for new inquiries).
Nodes used (8)
- Gmail Trigger
n8n-nodes-base.gmailTrigger - Edit Fields (Set)
n8n-nodes-base.set - Code
n8n-nodes-base.code - If
n8n-nodes-base.if - Information Extractor
@n8n/n8n-nodes-langchain.informationExtractor - OpenAI Chat Model
@n8n/n8n-nodes-langchain.lmChatOpenAi - Google Sheets
n8n-nodes-base.googleSheets - Telegram
n8n-nodes-base.telegram
From the author
Quick Overview This workflow polls Gmail for new inquiry emails, uses OpenAI to extract lead details, saves or updates one lead per sender in Google Sheets, and sends Telegram alerts for hot leads based on budget or urgency. How it works 1. Polls a Gmail…