Skip to main content

Generate business leads with OpenStreetMap data and save to Google Sheets

Workflow preview

Workflow preview
100%
Generate business leads with OpenStreetMap data and save to Google 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 template for? This n8n lead generation workflow template is designed for business owners, marketers, sales professionals, and entrepreneurs who need to generate targeted business leads ...

Best for

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

Tools used

n8n-nodes-base.stickynote, n8n-nodes-base.wait, n8n-nodes-base.noop, n8n-nodes-base.executeworkflowtrigger, n8n-nodes-base.splitinbatches, n8n-nodes-base.executeworkflow, n8n-nodes-base.filter, n8n-nodes-base.merge

Source and attribution

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

Original n8n.io source

1.1 Workflow description

Title
Generate business leads with OpenStreetMap data and save to Google Sheets
Workflow name
Generate business leads with OpenStreetMap data and save to Google Sheets

Who is this template for?

This n8n lead generation workflow template is designed for business owners, marketers, sales professionals, and entrepreneurs who need to generate targeted business leads without paying for expensive APIs or third-party services. The template leverages the free Overpass API (powered by OpenStreetMap data) to gather comprehensive business information for any industry in almost any region worldwide.

Perfect for:

  • Small businesses looking to expand their customer base
  • Real estate agents seeking potential clients
  • Marketing agencies needing targeted lead lists
  • Entrepreneurs researching potential markets
  • Sales teams building prospect databases

You can watch the video tutorial here: https://youtu.be/6WVfAIXdwsE

How it works

This n8n lead generation template provides a powerful solution using n8n core nodes and the free OpenStreetMap Overpass API, allowing you to generate thousands of business leads with comprehensive contact information:

Data Collection Process

1. Define Your Queries

  • Create a list of search queries combining keywords (like "real estate", "dentist", etc.) with target locations
  • Use both inner areas (specific cities) and outer areas (broader regions) to precisely target your search

2. Iterative Query Execution

  • The workflow processes each query in sequence, preventing API timeout issues
  • Each query triggers a sub-workflow that handles the data extraction process

3. Data Extraction via OpenStreetMap's Overpass API

  • Searches for businesses matching your keywords in name, description, and relevant OpenStreetMap tags
  • Collects comprehensive business data including names, addresses, and contact details from the OpenStreetMap database
  • Searches using both regular expressions and exact tag matching for optimal n8n lead generation results

4. Website Scraping for Additional Information

  • For businesses with websites but missing email addresses, the workflow visits their homepage
  • Extracts email addresses using regular expressions for more complete contact information
  • Filters out irrelevant emails using configurable patterns

5. Data Cleaning and Organization

  • Removes duplicate contact information and standardizes data format
  • Filters results based on your specific requirements for contact details
  • Saves all extracted data to Google Sheets for easy access and management

Setup

1. Configure Your Queries:

  • Open the "Run Workflow" node and input your list of queries
  • Format queries with outer area, inner area, and keyword (e.g., "California,Los Angeles,real estate")

2. Optimize Tag Targeting:

  • After initial runs, identify the specific tags used by your target industry
  • Update the HTTP Request node with these specific tags to improve result quality
  • Common tags include "office", "shop", and "amenity" with industry-specific values

3. Configure Data Filters:

  • Customize the filter node to keep only results meeting your specific requirements
  • Adjust the email filtering regex to remove irrelevant email addresses

4. Set up Google Sheets Integration:

  • Configure the Google Sheets node to save results to your preferred spreadsheet
  • Authorize the connection to your Google account

5. Run the Workflow:

  • Start the workflow and watch as your Google Sheet fills with comprehensive business leads
  • The template automatically handles pagination and rate limiting to prevent API timeouts

The resulting leads include comprehensive contact information such as:

  • Business names
  • Complete addresses (street, city, postal code)
  • Phone numbers
  • Email addresses (both from API and website scraping)
  • Website URLs
  • Social media accounts
  • Opening hours
  • And more!

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 - Sticky Note6

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

Block 2 - Wait

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

Block 3 - No Operation, do nothing

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

Block 4 - When Executed by Another Workflow

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

Block 5 - Loop Over Items1

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

Block 6 - Sticky Note

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

Block 7 - Sticky Note2

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

Block 8 - Execute Workflow

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

Block 9 - Loop Over Items

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

Block 10 - Filter Away Items With No Contact Info

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

Block 11 - Append Items (No Website and/not Email)

Type / Role
n8n-nodes-base.merge - merge
Config choices
Version 3.1

Block 12 - Merge Items with HTML

Type / Role
n8n-nodes-base.merge - merge
Config choices
Version 3.1

Block 13 - Get Website HTML

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

Block 14 - Append Items

Type / Role
n8n-nodes-base.merge - merge
Config choices
Version 3.1

Block 15 - Clean Emails

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

Block 16 - Scrape HomePage

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

Block 17 - Has Email?

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

Block 18 - Has No Website?

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

Block 19 - Organize Data

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

Block 20 - Set Output Fields

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

Block 21 - Extract List

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

Block 22 - Google Sheets

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

Block 23 - Split Out

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

Block 24 - HTTP Request

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

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

3. Summary Table

Workflow Generate business leads with OpenStreetMap data and save to Google Sheets
Complexity advanced
Nodes 27
Categories Lead Generation
Author Akram Kadri
Published 01 May 2025

4. Reproducing the Workflow from Scratch

  1. 1. Download the workflow JSON

    Use the JSON export at /data/workflows/3827/3827.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 Generate business leads with OpenStreetMap data and save to Google Sheets do?

Who is this template for? This n8n lead generation workflow template is designed for business owners, marketers, sales professionals, and entrepreneurs who need to generate targeted business leads ...

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.