Templates / Score inquiry emails into Google Sheets leads with OpenAI and Telegram alerts

Score inquiry emails into Google Sheets leads with OpenAI and Telegram alerts

Ready for 3.0

by Luna | Flow Lab · 1 views · created 2026-09-28 · Lead Generation, AI Summarization

Ready for 3.0. This template uses no nodes that n8n 3.0 removes. No removed nodes, versions or helpers found. Static check, last run 2026-10-19.

Worth a look

Nodes used (8)

GmailInformation ExtractorOpenAI Chat ModelGoogle SheetsTelegram

What it does

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 inbox every 5 minutes for new messages matching the configured search query. 2. Filters out newsletters, auto-replies, bounces, and ignored senders, and trims/cleans the email body before any AI processing. 3. Uses OpenAI (via an information extraction prompt) to determine whether the email is a real inquiry and extract structured lead fields like service, budget, deadline, and a short summary. 4. Validates and normalizes the AI output (sanitizes spreadsheet-formula text, parses budget to a number, normalizes phone, and scores priority as hot or normal). 5. Appends or updates a matching row in Google Sheets (sheet “Leads”) using the sender’s email as the unique key. 6. If the lead is marked hot, formats an HTML-safe message and sends a Telegram alert including a link back to the Gmail message. Setup 1. Connect Gmail, OpenAI, Google Sheets, and Telegram credentials (including a Telegram bot) in n8n. 2. Create a Google Sheets document with a sheet named “Leads” and columns: key, receivedat, name, email, company, phone, service, budget, currency, deadline, summary, subject, priority, gmaillink. 3. Replace YOURSPREADSHEETID with your Google Sheets document ID and set your Telegram chat ID, hot budget threshold, default currency, and ignored sender keywords in the workflow settings step.

View the original on n8n.io → Check your own copy

Get the weekly “what broke” email

New templates, newly broken ones, and n8n release changes. One short email a week.

Form not loading? Subscribe here.