Back to Templates

ZIP Code-Based Business Lead Generation with Google Maps and Sheets

Last update

Last update 17 hours ago

Categories

Share


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