Skip to main content

Generate scored B2B leads from Google Maps websites to Google Sheets

Workflow preview

Workflow preview
100%
Generate scored B2B leads from Google Maps websites to Google Sheets preview
Open on n8n.io

1. Workflow Overview

This n8n workflow is a sophisticated B2B Lead Generation Scraper. It automates the entire journey from discovering businesses on Google Maps to extracting, scoring, and saving high quality contact ...

Best for

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

Tools used

n8n-nodes-base.splitinbatches, n8n-nodes-base.httprequest, n8n-nodes-base.manualtrigger, n8n-nodes-base.set, n8n-nodes-base.if, n8n-nodes-base.code, n8n-nodes-base.merge, n8n-nodes-base.splitout

Source and attribution

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

Original n8n.io source

1.1 Workflow description

Title
Generate scored B2B leads from Google Maps websites to Google Sheets
Workflow name
Generate scored B2B leads from Google Maps websites to Google Sheets

This n8n workflow is a sophisticated B2B Lead Generation Scraper. It automates the entire journey from discovering businesses on Google Maps to extracting, scoring, and saving high-quality contact emails.

Here is a breakdown of the workflow stages:

Stage 1: Google Maps Search & Pagination The workflow starts with a list of search queries (e.g., "Dentist New York").

Looping: It processes each query one by one.

Smart Pagination: Google Maps usually limits results per page. This workflow detects the nextPageToken and automatically re-calls the API until all available businesses for that query are collected.

Filtering: It immediately filters out closed businesses, keeping only those marked as "OPERATIONAL".

Stage 2: Deep Web Scraping For every business found with a website, the workflow performs a two-step crawl:

Homepage Fetch: It visits the main URL to find immediate contact info.

Contact Page Discovery: A code node scans the homepage for links containing keywords like "Contact", "About", "Team", or "Impressum". It then visits these specific sub-pages to find hidden emails.

Stage 3: Email Quality Control & Scoring This is the most advanced part of the logic. Instead of just grabbing any email, it uses a Scoring System to rank them:

The Filter: It removes technical or junk emails (e.g., sentry@, noreply@, or image files disguised as emails).

The Scorecard:

+30 Points: Domain match (e.g., [email protected] matches www.company.com).

+20 Points: Personal touch (detects dots or names like john.doe@).

-40 Points: Generic prefixes (penalizes info@, admin@, sales@).

-25 Points: Free providers (penalizes @gmail.com, @yahoo.com).

Selection: It sorts all found emails by score and keeps only the top-ranked email for each business.

Stage 4: Final Output Deduplication: It ensures no duplicate businesses are added to your list, even if they appeared in multiple search queries.

Data Storage: The final, cleaned data—including Business Name, Address, Phone, Website, and the Best Email—is appended to a Google Sheet.

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 - Loop over queries

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

Block 2 - Search Google Maps with query

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

Block 3 - Run workflow

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

Block 4 - Extract Places Data

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

Block 5 - Check if Website Exists

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

Block 6 - Check for Next Page Token

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

Block 7 - Has Next Page?

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

Block 8 - Merge Emails with Business Data

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

Block 9 - Merge All Businesses

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

Block 10 - Split Out Places

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

Block 11 - Filter Operational Businesses

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

Block 12 - Fetch Website HTML

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

Block 13 - Extract Emails from HTML

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

Block 14 - Filter Valid Emails

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

Block 15 - Append to Google Sheets

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

Block 16 - Extract Contact Links

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

Block 17 - Filter Contact Links

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

Block 18 - Fetch Contact Page HTML

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

Block 19 - Remove Duplicate Businesses

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

Block 20 - Combine Homepage and Contact HTML

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

Block 21 - Remove Duplicate Emails

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

Block 22 - Score and Rank Emails

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

Block 23 - Sort by Email Quality

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

Block 24 - Keep Best Email Only

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

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

3. Summary Table

Workflow Generate scored B2B leads from Google Maps websites to Google Sheets
Complexity advanced
Nodes 30
Categories Lead Generation
Author Jannik Hiller
Published 18 Dec 2025

4. Reproducing the Workflow from Scratch

  1. 1. Download the workflow JSON

    Use the JSON export at /data/workflows/11924/11924.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 scored B2B leads from Google Maps websites to Google Sheets do?

This n8n workflow is a sophisticated B2B Lead Generation Scraper. It automates the entire journey from discovering businesses on Google Maps to extracting, scoring, and saving high quality contact ...

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.