Google Maps Business Email Extractor to Sheets - n8n Workflow

Automate lead generation and contact gathering by scraping business website URLs directly from Google Maps search results, extracting valid emails, and exporting the clean list directly to Google Sheets using a robust n8n workflow.

Workflow Preview

Ready to automate?

Download this n8n workflow template and start using it instantly.

Who is this best for?

Sales professionals and marketers needing targeted lead lists.
Data analysts requiring localized business contact information.
Users looking for advanced web scraping n8n templates that bypass API costs.
n8n automation specialists seeking a complex scraping demonstration.

Overview

This automation provides a powerful, cost-effective alternative to expensive commercial tools or custom API integrations for lead generation. By using this smart n8n workflow, you can input a target location and business type (e.g., 'Calgary dentists'), and the system automatically scrapes the Google Maps search results. It intelligently filters out junk URLs, visits the remaining valid business websites one-by-one, extracts email addresses using specialized regex patterns, and securely exports the final, deduplicated list to Google Sheets. This robust n8n workflow includes built-in waiting periods and error handling to ensure reliability and minimize the risk of IP blocking during large-scale operations. If you are looking for advanced n8n templates that handle complex web interactions, this is an excellent reference.

How it Works

The entire process flows through four main stages, initiated by the manual n8n trigger:


  1. Initial Scrape: The n8n trigger starts the process, and an HTTP Request n8n node fetches the raw HTML content of the target Google Maps search URL (Step 1).

  2. URL Cleaning: A Code n8n node extracts potential website links from the massive HTML blob. These are then processed by a Filter n8n node to remove Google-owned domains, followed by a Remove Duplicates n8n node and a Limit n8n node to control the batch size.

  3. Website Iteration: The Loop Over Items n8n node splits the clean URL list, processing each website sequentially. Wait n8n nodes are strategically placed before and after fetching each site's HTML via another HTTP Request n8n node (Scrape Site) to mitigate rate-limiting issues. This scraping process continues even if individual sites throw errors.

  4. Email Extraction & Export: A second Code n8n node uses regex to extract emails from the site HTML. A Filter n8n node ensures only items containing found emails proceed. A Split Out n8n node converts email arrays into separate items, which are then run through a final Remove Duplicates n8n node. The final clean data is appended to the specified Google Sheet via the Google Sheets n8n node, completing this powerful n8n workflow.

Installation Guide

To use this complex n8n workflow template, follow these steps:


  1. Import: Copy the entire JSON code provided and import it into your n8n instance via the 'Workflows' screen using the 'New' button and selecting 'Import from JSON'.

  2. Google Sheets Credentials: Configure the 'Add to Sheet' Google Sheets n8n node. You must link your Google Sheets account using OAuth2 credentials and specify the target Spreadsheet Document ID and Sheet Name where the scraped emails will be saved.

  3. Customize Search: Modify the URL in the 'Scrape Google Maps' n8n node to target your desired location and business type (e.g., replace 'calgary+dentists' with your query).

  4. Adjust Limits: The 'Limit' n8n node is set to 10 for testing. For full production runs, you may need to increase or remove this limit. Remember to check the Wait n8n node delays to ensure stable operation.

  5. Execution: Click the 'Test workflow' n8n trigger to test a small batch, or activate the n8n workflow to run it fully.

Node Details

When clicking ‘Test workflow’ (Manual Trigger): The starting n8n trigger for manual execution. Notes confirm this is the entry point.
Scrape Google Maps (HTTP Request n8n node): Fetches the initial Google Maps search result HTML for the target query (e.g., 'calgary dentists').
Extract URLs (Code n8n node): Uses JavaScript regex (https?:\/\/[^\/\s"'>]+/g) to pull candidate website URLs from the large HTML body.
Filter Google URLs (Filter n8n node): Essential step that filters out irrelevant domains (google, gstatic, etc.) ensuring only business websites remain.
Loop Over Items (Split In Batches n8n node): Controls the flow, ensuring each remaining website URL is processed individually to manage load and prevent scraping detection.
Scrape Site (HTTP Request n8n node): Downloads the HTML content of the individual business website. Key Configuration: Set to not follow redirects and configured to continue the regular output path even on network errors (onError: continueRegularOutput).
Wait & Wait1 (Wait n8n node): Insert delays (wait periods) between the initial extraction and the individual site scraping to enhance resilience against rate limiting.
Extract Emails (Code n8n node): Uses advanced regex to identify and extract standard email formats from the website's HTML content, ignoring image file extensions.


  • Add to Sheet (Google Sheets n8n node): The final action, which uses OAuth credentials to append the extracted email addresses to the defined spreadsheet, completing this powerful n8n workflow.

Related n8n Workflows

Free

Nodes: 11 Nodes
Updated: December 26 2025
View all
Created by

I help people build $5k+/month online by starting their own AI agency. Without BS.

Featured*