Google Maps Lead Enrichment and Website Scraper - n8n Workflow

Automate lead generation by scraping website contact details from Google Sheets URLs and enriching the data. This robust n8n workflow uses nested loops for deep email extraction.

Workflow Preview

Ready to automate?

Download this n8n workflow template and start using it instantly.

Who is this best for?

Sales and Marketing Teams: Individuals needing to rapidly enrich raw lead lists (e.g., from Google Maps) with verified contact information. Data Analysts: Users who need a reliable, repeatable n8n workflow for large-scale data cleansing and augmentation.* n8n Users: Developers looking for advanced n8n templates demonstrating nested looping and resilient web scraping techniques.

Overview

Manually visiting hundreds or thousands of business websites to find contact emails is an inefficient use of time. This powerful n8n workflow template automates this crucial lead enrichment process. It retrieves a list of URLs from a Google Sheet (typically output from a Google Maps scraping tool), systematically scrapes each website for an email address, and handles common errors like broken links or missing contact pages.

This resilient n8n automation leverages multiple HTTP Request n8n nodes and custom logic to first search the main domain. If no email is found, it automatically identifies potential internal contact pages (like '/contact' or '/about') and initiates a secondary, deeper scrape using nested loops. This ensures maximum data capture efficiency. By using this n8n workflow, users can turn raw lead data into actionable sales intelligence directly within their Google Sheets.

How it Works

This n8n workflow is designed to run as a scheduled or manual batch process, starting with the Manual n8n trigger.


  1. Data Retrieval: The process begins when the n8n trigger is activated, fetching a list of records (URLs) from a specified Google Sheet using the Google Sheets n8n node.

  2. Primary Iteration: The data is fed into a 'Loop Over Items' Split In Batches n8n node, initiating the main processing loop for each lead.

  3. Initial Scrape: An HTTP Request n8n node attempts to fetch the content of the primary website URL. Error handling is configured to continue the n8n workflow even if the initial request fails.

  4. Initial Email Extraction (Code): A Code n8n node executes custom logic to parse the main website content, attempting to quickly locate an email address.

  5. Conditional Update: An If n8n node ('Email Found') checks the result. If the email is found, the Google Sheets n8n node ('Email Updated') updates the corresponding row in the sheet, and the n8n workflow moves to the next batch item.

  6. Deep Scrape Initiation: If the email is not found, a second Code n8n node ('Extract Pages') attempts to locate potential internal links (e.g., contact, about) that might contain the email.

  7. Secondary Iteration: The identified internal pages are split and processed using a nested 'Loop Over Items1' Split In Batches n8n node.

  8. Internal Fetch and Extract: A dedicated HTTP Request n8n node ('Fetch internal page') retrieves the sub-page content, and another Code n8n node ('Extract Email') performs the extraction.

  9. Internal Conditional Update: If the email is found in the sub-page ('Email Found Internal'), the Google Sheets n8n node ('Email Updated Internal') updates the sheet, and the primary loop continues. If the entire process fails to find an email (internal loop finishes without success or the initial HTTP request fails), the Google Sheets n8n node ('Email Not Found') updates the record accordingly before proceeding to the next item in the main batch.

Installation Guide

To deploy this comprehensive n8n workflow template, follow these steps:


  1. Import: Copy the provided JSON data and import it directly into your n8n instance.

  2. Google Sheets Setup: You will need to configure credentials for the Google Sheets n8n node. Create a new Google Sheets credential, ensuring it has read and write access to the spreadsheet containing your lead data.

  3. Spreadsheet Configuration: Specify the Spreadsheet ID and Sheet Name in the 'Get row(s) in sheet' Google Sheets n8n node. Ensure your data columns match the expectations of the Code n8n node (i.e., the column containing the URL should be accessible in the expressions).

  4. Code Node Customization (If Necessary): The Code n8n node logic is crucial for successful parsing. Review these nodes if your website structure or email formatting differs significantly from standard practices.

  5. Execution: After linking credentials and confirming spreadsheet details, execute the n8n workflow using the Manual n8n trigger to begin processing your leads.

Node Details

This n8n workflow template utilizes several powerful n8n nodes:

Manual Trigger n8n trigger: Serves as the starting point for batch processing. This is a common setup for n8n templates that handle large data imports.
Google Sheets n8n node (Get row(s) in sheet, Email Updated, etc.): Used extensively for both retrieving the initial list of lead data and for writing back the results (found email, or status 'Not Found'). Key configurations include the 'Operation' (Get or Update) and mapping the column names.
Split In Batches n8n node (Loop Over Items & Loop Over Items1): Essential for managing large datasets by breaking them into manageable chunks and facilitating the primary and secondary looping structures of the n8n workflow.
HTTP Request n8n node (Primary and Internal Fetch): The core scraping component. This n8n node fetches the HTML content of the target URL. The primary request is configured with robust error handling (onError: continueErrorOutput) to prevent the entire n8n workflow from crashing on a single bad URL.
Code n8n node (Extract Email, Extract Pages): Custom JavaScript is used here for advanced data manipulation, specifically applying regex or parsing techniques to reliably extract email addresses and identify internal page links from the raw HTML content.
If n8n node: Used throughout the n8n workflow to conditionally route the data based on whether an email was successfully found, determining whether to update the sheet immediately or proceed to the deeper scraping loop.

Related n8n Workflows

Paid

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

I partner with businesses to streamline processes and accelerate growth through intelligent AI automation and Web/mobile Development. Leveraging deep expertise in GPT-4, LangChain, and n8n, I develop AI-powered agents and sophisticated LLM pipelines.

Featured*