Use this powerful n8n workflow to scrape business leads from Google Maps, extract website URLs, find associated email addresses using custom JavaScript code, and export the results directly to Google Sheets for outreach.
Download this n8n workflow template and start using it instantly.
Generating localized business leads often involves manual research or costly paid services. This advanced n8n workflow solves this problem by providing a robust, self-hosted system for targeted scraping.
This n8n template bypasses common API limitations by directly scraping Google Maps HTML for business listings. It then intelligently visits each extracted website and uses regex (via the Code n8n node) to efficiently locate and extract email addresses. Crucially, the workflow incorporates built-in delays and error handling to maximize success rates and prevent rate limiting.
The final output is a clean, deduplicated list of emails automatically added to a Google Sheets spreadsheet, ready for immediate use in outreach campaigns. This demonstrates a highly effective, cost-efficient approach achievable entirely within n8n.
This comprehensive n8n workflow executes a four-phase data pipeline:
To deploy this powerful lead generation n8n workflow, follow these steps:
https://www.google.com/maps/search/calgary+dentists to reflect your desired location and business type (e.g., 'london architects'). When clicking ‘Test workflow’ (Manual Trigger n8n trigger):
Function: Starts the n8n workflow immediately upon command. Essential for developing and testing this specialized n8n template.
Scrape Google Maps (HTTP Request n8n node):
Function: Initiates the web scraping process by downloading the raw HTML from the target Google Maps search results.
Key Configuration: URL is set to the specific search query (e.g., Calgary dentists).
Extract URLs (Code n8n node):
Function: Uses custom JavaScript and a robust regex pattern to parse the raw Google Maps HTML and extract potential business website URLs.
Key Configuration: JavaScript code defines a regex to capture http(s):// links.
Loop Over Items (Split In Batches n8n node):
Function: Controls the flow by ensuring each unique website URL is processed sequentially, which is vital for preventing simultaneous heavy traffic and ensuring reliability of the n8n workflow.
Scrape Site (HTTP Request n8n node):
Function: Visits and downloads the HTML content of each individual business website.
Key Configuration: Dynamic URL reference ={{ $json.website }}. Set to 'Continue Regular Output' on error, allowing the n8n workflow to skip sites that time out.
Extract Emails (Code n8n node):
Function: Executes specialized JavaScript regex on the scraped website HTML to identify and list email addresses, specifically excluding image extensions.
Split Out (n8n node):
Function: Flattens the data structure, taking the array of emails found on one website and converting each email into a separate item for easier deduplication and export.
Remove Duplicates (n8n node):
Function: Used twice—once to clean URLs and finally to ensure the list of extracted emails is completely unique before export.
Add to Sheet (Google Sheets n8n node):
* Function: Appends the finalized, clean list of email addresses to a specific Google Sheet document, completing the data export phase of the n8n workflow.
Use this powerful n8n workflow to automate daily lead enrichment. Sync data from Leadfeeder, enrich details using Apollo.io, and log results in Google Sheets using customized n8n templates.

Automate personalized B2B outreach using a powerful n8n workflow. Analyze leads, scrape websites via Firecrawl, generate tailored emails with OpenAI, and integrate human-in-the-loop review using gotoHuman. This advanced n8n template ensures high-quality communications.

Launch AWS EC2 instances automatically using requests stored in Google Sheets. This powerful n8n workflow uses the SSH n8n node to execute Terraform plans, log results, and send confirmation emails via Gmail.

Use this advanced n8n workflow to capture, enrich, and automatically qualify leads using GPT-4o (OpenAI). Execute precise follow-up actions, including automated demo scheduling, multi-step nurture sequences, or polite declines, streamlining your sales operations.

Use this powerful n8n workflow to automate lead qualification via OpenAI/GPT-4, assign ownership, create tasks in ClickUp, and update Google Sheets automatically. Explore advanced n8n templates.

Hi 👋 I'm Nick. I make money with automation & teach others how they can too. If you have any questions about my templates or about my n8n builds, feel free to ask and I'll happily respond in the comments. Thanks for reading!







































