Skip to main content

Scrape & enrich Google Maps leads with Decodo API and Gemini 2.5 Flash

Workflow preview

Workflow preview
100%
Scrape & enrich Google Maps leads with Decodo API and Gemini 2.5 Flash preview
Open on n8n.io

Important notice

This workflow is provided as-is. Please review and test before using in production.

1. Workflow Overview

This workflow scrapes Google Maps via Decodo API, analyzes each business using Google Gemini 2.5 Flash, scores lead quality, and generates ready to send outreach emails. Why Use This Workflow? Time...

Best for

  • Lead Generation automation workflows
  • AI Summarization automation workflows
  • advanced n8n builders looking for reusable templates

Tools used

n8n-nodes-base.code, n8n-nodes-base.splitinbatches, n8n-nodes-base.googlesheets, n8n-nodes-base.if, n8n-nodes-base.errortrigger, @n8n/n8n-nodes-langchain.outputparserstructured, n8n-nodes-base.stickynote, @n8n/n8n-nodes-langchain.lmchatgooglegemini

Source and attribution

This workflow is cataloged by N8N Workflows and links back to its original n8n.io source page by Khairul Muhtadin.

Original n8n.io source

1.1 Workflow description

Title
Scrape & enrich Google Maps leads with Decodo API and Gemini 2.5 Flash
Workflow name
Scrape & enrich Google Maps leads with Decodo API and Gemini 2.5 Flash

This workflow scrapes Google Maps via Decodo API, analyzes each business using Google Gemini 2.5 Flash, scores lead quality, and generates ready to send outreach emails.

Why Use This Workflow?

  • Time Savings: Reduces manual lead research from 20 minutes per lead to 30 seconds processing 100 leads in under an hour

  • Cost Reduction: Eliminates $300-500/month spent on lead databases and enrichment tools like Apollo or ZoomInfo

  • Scalability: Process 500+ leads daily without additional staff or subscription costs

Ideal For

  • Sales Teams & BDRs: Building targeted prospect lists for local businesses (restaurants, retail, service providers) with verified contact data and personalized outreach hooks
  • Digital Marketing Agencies: Identifying high-value clients in specific niches (e.g., "restaurants without websites in Chicago") and automating first-touch campaigns
  • B2B SaaS Companies: Finding businesses matching ideal customer profiles based on ratings, reviews, and digital maturity indicators
  • Local Service Providers: Generating qualified leads for web design, SEO, POS systems, or booking software tailored to underserved markets

How It Works

  1. Trigger: Manually start the workflow or schedule it to run on specific intervals (e.g., daily/weekly)
  2. Data Collection: Scrapes Google Maps search results using Decodo API based on your query (e.g., "coffee shops in Austin"), country, and language settings
  3. Processing: Parses raw HTML responses into structured lead objects with business name, address, phone, website, ratings, reviews, and coordinates
  4. Intelligence Layer: Google Gemini 2.5 Flash analyzes each lead to generate value propositions, identify pain points, create outreach hooks, and assign a 1-10 quality score
  5. Output & Delivery: Filters leads scoring ≥7, generates personalized email templates, and saves all data to Google Sheets with enrichment timestamps
  6. Storage & Logging: Maintains complete lead database with outreach status tracking; error handler sends Telegram notifications for failed executions

Setup Guide

Prerequisites

Requirement Type Purpose
n8n instance Essential Workflow execution platform
Decodo Scraper API Essential Google Maps data extraction (get key at dashboard.decodo.com)
Google Gemini API Essential AI-powered lead analysis and scoring
Google Sheets Essential Lead database and outreach tracking
Telegram Bot (optional) Optional Real-time error notifications

Installation Steps

  1. Import the JSON file to your n8n instance

  2. Configure credentials:

    • Decodo API: Create HTTP Header Auth credential with header name Authorization and value Basic [YOUR_API_KEY] get from Decodo dashboard
    • Google Gemini API: Add your Google AI API key in the "2.5 Flash" node credentials
    • Google Sheets OAuth2: Authenticate with your Google account (both "Save to Google Sheets" and "Save Outreach To Sheets" nodes)
    • Telegram (optional): Add bot token and replace YOUR-CHAT-ID in "Send Error Notification" node
  3. Update environment-specific values:

    • In "Set Search Parameters" node: Update searchQuery (e.g., "Italian restaurants in Miami"), country, targetLanguage, and resultsLimit
    • In both Google Sheets nodes: Select your destination spreadsheet and sheet name
  4. Customize settings:

    • Adjust lead score threshold in "Filter Hot Leads" (default: ≥7)
    • Modify AI prompt in "Lead Enrichment" node to match your value proposition
    • Customize outreach email template in "Prepare Outreach Message" node
  5. Test execution:

    • Start with resultsLimit: 5 to verify all connections work
    • Check Google Sheets for properly formatted data
    • Verify AI enrichment produces actionable insights

Technical Details

Core Nodes

Node Purpose Key Configuration
Decodo Maps Scraper Fetches Google Maps listings via API Set target: google_maps, adjust page_to based on resultsLimit
Parse & Normalize Data Extracts business data from HTML Custom JavaScript handles multiple response formats
Lead Enrichment (AI Chain) Analyzes leads with Gemini 2.5 Flash Structured output parser ensures JSON compliance
Filter Hot Leads Isolates high-quality prospects Combines lead score ≥7 + contact info validation
Save to Google Sheets Stores all enriched leads Uses appendOrUpdate with id as matching column
Save Outreach To Sheets Updates hot leads with messages Marks leads as "HOT" category for prioritization

Customization Options

Basic Adjustments

  • Search Parameters: Modify searchQuery, country, targetLanguage in "Set Search Parameters" to target different markets (supports all Google Maps locales)
  • Lead Scoring Threshold: Change filter condition from ≥7 to ≥6 for broader lead pool or ≥8 for ultra-qualified prospects
  • Batch Size: Adjust "Split Into Batches" to process 10-50 items per cycle (lower = more reliable, higher = faster execution)

Advanced Enhancements

  • Email Automation: Connect "Prepare Outreach Message" to Gmail/SendGrid nodes for automatic campaign sends (medium complexity)
  • CRM Integration: Add HubSpot/Salesforce nodes after enrichment to sync leads directly (requires CRM API credentials)
  • Multi-Channel Outreach: Branch hot leads to LinkedIn automation tools or SMS providers (high complexity, needs additional services)
  • Custom Scoring Models: Modify AI prompt to prioritize industry-specific signals (e.g., verified badges for healthcare, delivery options for restaurants)

Troubleshooting

Common Issues

Problem Cause Solution
"No valid leads extracted" error Decodo response format changed or empty results Check Decodo API response in "Parse & Normalize Data" execution logs; verify search query returns results in Google Maps manually
AI enrichment produces invalid JSON Gemini output doesn't match schema Review "Result Parser" schema; add retry logic or simplify AI prompt to reduce complexity
Google Sheets "matching column not found" Spreadsheet missing "id" column header Ensure Sheet1 has headers: id, businessName, category, address, phone, website, rating, reviewCount, valueProposition, painPoints, outreachHook, leadScore, engagementStrategy, googleMapsUrl, scrapedAt, enrichedAt, outreachMessage, status
Timeout on large batches Processing 100+ leads exceeds execution limits Reduce resultsLimit to 25-50; run workflow multiple times with different queries

Use Case Examples

Scenario 1: Digital Marketing Agency Prospecting

Challenge: Agency needs 200 qualified restaurant leads monthly for web design services, spending 40 hours on manual research

Solution: Configure workflow with query "restaurants in [city]" filtered by ratings ≥4.0 and missing professional websites (AI scoring detects this)

Result: Generated 312 leads in 8 hours across 3 cities; 89 scored ≥8 (hot prospects); closed 14 clients in first month at $2,500 average contract value

Scenario 2: SaaS Company Market Entry

Challenge: Booking software startup targeting salons/spas in new geographic market with zero existing contacts

Solution: Ran workflow with "beauty salons in Denver" + "day spas in Denver"; AI identified pain points like "manual appointment booking" and "no online presence"

Result: 156 leads enriched in 2 days; personalized outreach hooks increased demo booking rate from 2% (cold template) to 11%; secured 8 pilot customers in 3 weeks

Scenario 3: Local Service Provider Lead Generation

Challenge: POS system reseller needs to identify retail stores still using cash registers, wasting days driving to scout locations

Solution: Configured workflow for "retail stores in [neighborhood]" with AI analyzing reviews for mentions of "cash only" or payment friction

Result: Identified 47 high-probability prospects in 90 minutes; field sales team prioritized top 15 leads (score ≥9), closed 6 deals worth $32K total revenue


Credits & Links

Created by: Khaisa Studio

Category: Sales & CRM | Tags: lead-generation, google-maps, ai-enrichment, sales-automation, prospecting

Need custom workflows? Contact us

Connect with the creator:

PortfolioWorkflowsLinkedInMediumThreads

1.2 Logical Blocks

This catalog entry is organized from the workflow JSON. The node-level section below shows the executable blocks available for review before importing the template.

2. Block-by-Block Analysis

Block 1 - Parse & Normalize Data

Type / Role
n8n-nodes-base.code - code
Config choices
Version 2

Block 2 - Split Into Batches

Type / Role
n8n-nodes-base.splitInBatches - splitInBatches
Config choices
Version 3

Block 3 - Save to Google Sheets

Type / Role
n8n-nodes-base.googleSheets - googleSheets
Config choices
Version 4.5

Block 4 - Filter Hot Leads

Type / Role
n8n-nodes-base.if - if
Config choices
Version 2

Block 5 - Error Handler

Type / Role
n8n-nodes-base.errorTrigger - errorTrigger
Config choices
Version 1

Block 6 - Result Parser

Type / Role
@n8n/n8n-nodes-langchain.outputParserStructured - outputParserStructured
Config choices
Version 1.3

Block 7 - Sticky Note2

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 8 - 2.5 Flash

Type / Role
@n8n/n8n-nodes-langchain.lmChatGoogleGemini - lmChatGoogleGemini
Config choices
Version 1

Block 9 - Sticky Note3

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 10 - Lead Enrichment

Type / Role
@n8n/n8n-nodes-langchain.chainLlm - chainLlm
Config choices
Version 1.7

Block 11 - Sticky Note4

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 12 - Sticky Note5

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 13 - Sticky Note9

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 14 - Decodo Maps Scraper

Type / Role
n8n-nodes-base.httpRequest - httpRequest
Config choices
Version 4.2

Block 15 - Merge Enrichment Data

Type / Role
n8n-nodes-base.set - set
Config choices
Version 3.4

Block 16 - Prepare Outreach Message

Type / Role
n8n-nodes-base.set - set
Config choices
Version 3.4

Block 17 - Save Outreach To Sheets

Type / Role
n8n-nodes-base.googleSheets - googleSheets
Config choices
Version 4.5

Block 18 - Format Error Message

Type / Role
n8n-nodes-base.code - code
Config choices
Version 2

Block 19 - Send Error Notification

Type / Role
n8n-nodes-base.telegram - telegram
Config choices
Version 1

Block 20 - Sticky Note10

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 21 - Manual Trigger

Type / Role
n8n-nodes-base.manualTrigger - manualTrigger
Config choices
Version 1

Block 22 - Sticky Note

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 23 - Set Search Parameters

Type / Role
n8n-nodes-base.set - set
Config choices
Version 3.4

3. Summary Table

Workflow Scrape & enrich Google Maps leads with Decodo API and Gemini 2.5 Flash
Complexity advanced
Nodes 23
Categories Lead Generation, AI Summarization
Author Khairul Muhtadin
Published 12 Nov 2025

4. Reproducing the Workflow from Scratch

  1. 1. Download the workflow JSON

    Use the JSON export at /data/workflows/10760/10760.json as the source template for this automation.

  2. 2. Import the template into n8n

    Open n8n, import the downloaded JSON, and review each node before activating the workflow.

  3. 3. Configure credentials and variables

    Replace placeholder credentials, API keys, webhook URLs, account IDs, and environment-specific values with your own settings.

  4. 4. Test with sample data

    Run the workflow manually or in a staging workspace, inspect node output, and confirm downstream systems receive the expected data.

  5. 5. Activate and monitor

    Enable the workflow only after testing, then monitor executions, errors, and rate limits during the first production runs.

5. General Notes & Resources

Review imported nodes carefully before activation. This catalog entry is intended to help you inspect the workflow structure, understand required services, and find related templates faster.

Node names, credentials, schedules, webhook paths, and external service limits may need adjustment for your workspace.

Frequently asked questions

What does Scrape & enrich Google Maps leads with Decodo API and Gemini 2.5 Flash do?

This workflow scrapes Google Maps via Decodo API, analyzes each business using Google Gemini 2.5 Flash, scores lead quality, and generates ready to send outreach emails. Why Use This Workflow? Time...

What do I need before importing this workflow?

Review the workflow JSON, configure any required credentials in n8n, and test the automation in a safe workspace before using it in production.

Can I customize this workflow?

Yes. Use the block-by-block analysis and the downloadable JSON to inspect each node, then adjust credentials, prompts, schedules, filters, or destinations for your Lead Generation, AI Summarization use case.