Templates / Generate and enrich local business leads with Decodo, OpenAI and Gmail

Generate and enrich local business leads with Decodo, OpenAI and Gmail

Needs changes

by Fahmi Fahreza ✓ · 112 views · created 2026-03-16 · Lead Generation, AI Summarization

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

What this workflow does

This workflow has 27 nodes and runs on a schedule (cron 0 10 * * *). Along the way it connects Google Sheets, Gmail and Decodo (community).

How it runs

Trigger: On a schedule (cron 0 10 * * *).

  1. Search Config (Edit Fields (Set)): sets 9 fields: niche, city, geo…
  2. Decodo: uses Decodo
  3. Parse Leads from Markdown (Code): runs custom JavaScript code
  4. Is Valid Lead? (If): checks a condition and branches into true / false
  5. Save Lead to Google Sheets (Google Sheets): append or update
  6. Split In Batches (Loop Over Items (Split in Batches)): loops over the items in batches
  7. Get Enriched Leads (Google Sheets): uses Google Sheets
  8. Has Website? (If): checks a condition and branches into true / false
  9. Filter by Score Threshold (Code): runs custom JavaScript code
  10. Decodo: uses Decodo

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

Services it uses

Google SheetsGmailDecodo (community)

Before you upgrade to n8n 3.0

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

  • OpenAI (legacy) in AI: Score & Enrich Lead, AI: Write Cold Email: replace with OpenAI node (AI section).

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

Removed in 3.0Replace with
OpenAI (legacy)
AI: Score & Enrich Lead, AI: Write Cold Email
OpenAI node (AI section)

Nodes used (9)

From the author

Quick overview This workflow finds local business leads on Google Maps, enriches them with website and AI analysis, and sends personalized cold emails to qualified prospects automatically. How it works 1. The workflow starts on a schedule and loads the…

Excerpt from Fahmi Fahreza'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.