Templates / Generate and qualify B2B leads from Telegram with Google Maps, Serper, GPT‑4o, and Gmail

Generate and qualify B2B leads from Telegram with Google Maps, Serper, GPT‑4o, and Gmail

Needs changes

by Yevhenii ✓ · 225 views · created 2026-04-19 · Lead Generation, AI Summarization

Needs changes. This template uses 1 thing(s) that n8n 3.0 removes: Function (legacy). 1 breaking item(s) found. Static check, last run 2026-10-19.

What this workflow does

This AI workflow has 27 nodes and runs on Telegram events (message). Along the way it connects Telegram, OpenAI, Google Sheets and Gmail. It also calls places.googleapis.com and google.serper.dev over HTTP.

How it runs

Trigger: On Telegram events (message).

  1. Build Search Query (Function): runs custom JavaScript (legacy Function node)
  2. Post to Maps API (HTTP Request): calls places.googleapis.com (POST)
  3. Check for Next Page (Code): runs custom JavaScript code
  4. Split Out: splits a list into separate items
  5. If: checks a condition and branches into true / false
  6. Deduplicate All Fields (Remove Duplicates): removes duplicate items
  7. Set Search Keys (Edit Fields (Set)): sets 5 fields: company_key, company_name, website…
  8. Post LinkedIn Search to API (HTTP Request): calls google.serper.dev (POST)
  9. Merge: merges the data from its input branches
  10. Post Email Search to API (HTTP Request): calls google.serper.dev (POST)

…plus 16 more steps. See the full node list below.

Services it uses

TelegramOpenAIGoogle SheetsGmail

HTTP calls to: places.googleapis.com, google.serper.dev

Before you upgrade to n8n 3.0

1 thing in this workflow is removed in n8n 3.0. Fix it before you upgrade:

  • Function (legacy) in Build Search Query: replace with Code node, mode 'Run Once for All Items'.

Rather not rewrite it? Many of these flows can be rebuilt in Make (free plan).

Removed in 3.0Replace with
Function (legacy)
Build Search Query
Code node, mode 'Run Once for All Items'

Nodes used (14)

From the author

How it works - Send a target niche and location via Telegram message - Workflow discovers businesses via Google Maps API - AI enriches contacts with email and LinkedIn data via Serper - GPT-4o scores and qualifies each lead - Personalized cold email sent…

Excerpt from Yevhenii's description on n8n.io.

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.