Google Maps Lead Generation and Contact Extraction - n8n Workflow

A powerful n8n workflow for scraping Google Maps search results, extracting Impressum pages, and using GPT-4 to pull structured lead contacts into Airtable. Use this n8n template to build your sales pipeline.

Workflow Preview

Ready to automate?

Download this n8n workflow template and start using it instantly.

Who is this best for?

Sales and Marketing professionals needing high-quality B2B lead lists.
Agencies looking to scale their prospecting efforts geographically.
Automation specialists seeking advanced examples of combining web scraping with GPT in an n8n workflow.
Users utilizing Airtable as their primary CRM or lead database.

Overview

This complex n8n workflow is designed to industrialize the lead generation process, moving beyond simple data capture. It operates in two phases: a parent workflow that manages city lists from Airtable to ensure continuity, and a sub-workflow that performs the scraping and AI processing. The core challenge solved is turning unstructured web data (legal notice/Impressum pages) into standardized, actionable contact information (Decision Maker, Email, Position).

This robust n8n template is ideal for users who need consistent, geo-targeted leads. It features built-in checks to prevent scraping the same company twice and uses sophisticated HTTP Request n8n node configurations for handling Google Maps pagination and rate limiting. The integration of the OpenAI n8n node for information extraction guarantees high data quality, making this an essential n8n automation solution.

How it Works

This automation operates as a parent-child n8n workflow structure.


  1. Parent Execution: The parent n8n workflow is initiated manually or via a schedule (When clicking ‘Execute workflow’ n8n trigger). It first queries an Airtable base (Airtable2) for a list of target cities.

  2. City Selection: A Filter n8n node (Filter5) ensures only cities not yet marked as 'Checked' (processed) are targeted.

  3. Sub-Workflow Trigger: For each filtered city, the parent workflow uses the Execute Workflow n8n node to call the core scraping sub-workflow, passing the city and search term (e.g., 'Seo Agentur') as parameters.

  4. Database Check: The core n8n workflow starts by fetching all previously scraped company names from the lead database (already scraped and Array all Companies scraped) to avoid duplication.

  5. Google Maps Search: The search Place HTTP Request n8n node executes the Google Maps Text Search API using the combined city and search term. The results are split (Split Out) and detailed data is fetched (Place Details).

  6. Duplicate Check: An If n8n node (Places already scraped) verifies the company is new before proceeding.

  7. Impressum Scraping: The workflow dynamically constructs the likely Impressum URL (e.g., domain.com/impressum) and uses Get Impressum HTML to fetch the raw HTML. The HTML n8n node cleans the content.

  8. AI Extraction: The cleaned HTML is passed to the Relevant Infos from Impressum (LangChain/OpenAI Chat) n8n node. A specialized system prompt instructs the AI to extract the Decision Maker Name, Position, Email, and Phone Number.

  9. Data Formatting & Storage: A filter (Email not Empty) ensures leads have an email address. The Edit Fields1 n8n node separates the combined Name/Position field. Finally, the complete, structured lead data is recorded via the Write in DB Airtable n8n node.

  10. Completion: The parent n8n workflow updates the city status in Airtable to 'Check' (Airtable1) before moving to the next city, ensuring a resilient process.

Installation Guide

To deploy this powerful n8n template, follow these steps:


  1. Import: Copy the entire n8n workflow JSON provided and paste it into your n8n instance via the 'Import from JSON' option.

  2. Google Maps Credentials: This n8n workflow relies on a Google Maps API Key. Set up an HTTP Query Auth credential for the HTTP Request n8n node and name it 'Query Auth account' (or update the credential reference IDs in the search Place and Place Details nodes).

  3. OpenAI Credentials: Configure an OpenAI API credential. The specific n8n node (OpenAI Chat Model) requires this credential to perform the GPT-4 based extraction.

  4. Airtable Setup: This n8n workflow uses the Airtable n8n node extensively. Create an Airtable Token API credential. You must link this credential to the four Airtable n8n nodes used (Airtable1, Airtable2, already scraped, Write in DB).

  5. Airtable Base Structure: Ensure your Airtable base contains the necessary tables (Städte for input and Mapsscraper for output) matching the column names referenced in the n8n template logic (e.g., 'Firmenname', 'Entscheidername', 'Stadt').

  6. Execution: Start the parent n8n workflow (When clicking ‘Execute workflow’) to begin the lead generation process.

Node Details

When Executed by Another Workflow & When clicking ‘Execute workflow’ (n8n trigger): The entry points for the child and parent processes, respectively. The parent trigger begins the loop over cities.
Airtable n8n node: Used for reading the list of cities (Airtable2), marking cities as processed (Airtable1), checking for duplicates (already scraped), and storing the final leads (Write in DB).
HTTP Request n8n node (search Place & Place Details): Essential for interacting with the Google Maps API. Configured to handle API key authentication and pagination for extracting location data and company websites.
Split Out n8n node: Splits the array of search results from Google Maps into individual items, allowing subsequent n8n nodes to process each company separately.
HTTP Request n8n node (Get Impressum HTML): Scrapes the legal notice page (Impressum) of the target website. Crucially configured with onError: continueErrorOutput to prevent the n8n workflow from failing if the Impressum page is unavailable or returns an error.
HTML n8n node: Cleans the raw HTML content scraped from the Impressum page, removing navigational elements, scripts, and styles, isolating the core text content required for the AI extraction step.
Relevant Infos from Impressum (LangChain/OpenAI Chat Model n8n node): The core AI component. Uses a fine-tuned GPT model (gpt-4.1-mini) and a specific system prompt to reliably extract structured data (Email, Decision Maker, Position) from the unstructured legal text.
Filter n8n node (Email not Empty): Enforces data quality by ensuring that the AI extraction step successfully found a valid email address before the lead is written to the Airtable database.

Related n8n Workflows

Free

Nodes: 16 Nodes
Updated: December 26 2025
View all
Created by
Sulieman Said
Sulieman Said

👋 Hi, I’m Sulieman – Founder of aufCopilot.de . I build custom n8n workflows, automations & AI integrations to help businesses save time and scale smarter. I share templates, answer questions and love exploring creative use cases – from lead generation to data workflows and AI-powered automations. 🚀 Always happy to connect, learn and contribute to the community.

Featured*