Skip to main content

Zip code-based business lead generation with Google Maps and Sheets

Workflow preview

Workflow preview
100%
Zip code-based business lead generation with Google Maps and Sheets preview
Open on n8n.io

Important notice

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

1. Workflow Overview

Who Is This For? This workflow is perfect for anyone who wants to automate lead generation using n8n without paying for expensive scraping tools. It uses simple Google Maps API requests and Google ...

Best for

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

Tools used

n8n-nodes-base.googlesheets, n8n-nodes-base.code, n8n-nodes-base.removeduplicates, n8n-nodes-base.wait, n8n-nodes-base.splitinbatches, n8n-nodes-base.scheduletrigger, n8n-nodes-base.if, n8n-nodes-base.set

Source and attribution

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

Original n8n.io source

1.1 Workflow description

Title
Zip code-based business lead generation with Google Maps and Sheets
Workflow name
Zip code-based business lead generation with Google Maps and Sheets

Who Is This For?

This workflow is perfect for anyone who wants to automate lead generation using n8n without paying for expensive scraping tools. It uses simple Google Maps API requests and Google Sheets to pull business data by ZIP code and category, then extracts emails at no extra cost.

What This Workflow Does

  • Automated Lead Generation: Runs on a schedule to process ZIP codes and business categories automatically.
  • Data Extraction: Queries Google Maps for businesses based on each ZIP code + subcategory combo.
  • Data Processing:
    • Skips entries with a STATUS = "N/A"
    • Removes duplicate results using place.id
    • Extracts and formats relevant business details
  • Error Handling:
    • Uses exponential backoff when hitting rate limits
    • Stops after 10 retry attempts
  • Data Storage:
    • Saves results directly to Google Sheets
    • Tracks which ZIP/subcategory pairs have been completed

Requirements

  • Google Maps API (business lookup)
  • Google Sheets OAuth2 (data storage)
  • Telegram Bot API (notifications)
  • Rapiwa API (WhatsApp alerts)

How to Use — Step-by-Step Setup

1. Set Up Credentials in n8n

  • Add your Google Maps API credentials (named "Google MAP")
  • Add Google Sheets OAuth2 credentials (named "Google Sheets")
  • Add Rapiwa API credentials (named "Rapiwa account 2")

2. Prepare Your Google Sheet

Create one Sheet document with these tabs:

  • zip — ZIP codes to process
  • maps categories — Business categories/subcategories
  • result — Where extracted business data will be stored Then update:
  • The document ID inside the workflow nodes
  • The sheet IDs (gid values) so they match your actual tabs

3. Customize the Workflow

  • Change the Limit node to control how many ZIP codes run per batch (default: 10)
  • Adjust retry limits in the relevant nodes (default: 10 attempts)
  • Modify the Schedule node to set your preferred run frequency (default: hourly) > This gives you a simple, scalable, nearly free system for generating targeted leads automatically.

Useful Links

Support & Help

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 - Update Status to Success

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

Block 2 - Add rows in Google Sheets

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

Block 3 - Exponential Backoff

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

Block 4 - Remove Duplicates

Type / Role
n8n-nodes-base.removeDuplicates - removeDuplicates
Config choices
Version 1.1

Block 5 - Wait

Type / Role
n8n-nodes-base.wait - wait
Config choices
Version 1.1

Block 6 - Exponential Backoff1

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

Block 7 - Wait1

Type / Role
n8n-nodes-base.wait - wait
Config choices
Version 1.1

Block 8 - Loop Subcats

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

Block 9 - Schedule

Type / Role
n8n-nodes-base.scheduleTrigger - scheduleTrigger
Config choices
Version 1.1

Block 10 - Check maximum retries.

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

Block 11 - get subcategory

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

Block 12 - Filter subcategori

Type / Role
n8n-nodes-base.filter - filter
Config choices
Version 2.2

Block 13 - Get Subcategory form sheet

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

Block 14 - Loop

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

Block 15 - Get All Zip Code

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

Block 16 - Limit

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

Block 17 - Send a text message

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

Block 18 - Do nothing

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

Block 19 - Rapiwa

Type / Role
n8n-nodes-rapiwa.rapiwa - rapiwa
Config choices
Version 1

Block 20 - Send a message

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

Block 21 - Set Place

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

Block 22 - Place

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

Block 23 - If

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

Block 24 - Google Map API

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

Showing the first 24 of 33 workflow blocks. Download the JSON for the full node graph.

3. Summary Table

Workflow Zip code-based business lead generation with Google Maps and Sheets
Complexity advanced
Nodes 33
Categories Lead Generation
Author SpaGreen Creative
Published 09 Dec 2025

4. Reproducing the Workflow from Scratch

  1. 1. Download the workflow JSON

    Use the JSON export at /data/workflows/11622/11622.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 Zip code-based business lead generation with Google Maps and Sheets do?

Who Is This For? This workflow is perfect for anyone who wants to automate lead generation using n8n without paying for expensive scraping tools. It uses simple Google Maps API requests and Google ...

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 use case.