Automate Lead Generation with n8n & Google Maps Scraper [2026 Workflow]

Build an automated lead generation system using n8n and Google Maps scraping. Extract business names, phones, emails — free workflow template included.
agent
toolWorkflow
httpRequest
+8
Workflow Identifier: 1321
NODES in Use: chatTrigger, agent, lmChatOpenAi, memoryBufferWindow, toolWorkflow, toolSerpApi, stickyNote, executeWorkflowTrigger, httpRequest, googleSheets, aggregate
Automate lead gen with n8n and Google Maps

Press CTRL+F5 if the workflow didn't load.

Learn how to Build this Workflow with AI:

What this workflow does

This workflow collects business leads by searching Google Maps and company websites automatically.

It fixes slow, error-prone manual work by organizing lead data and saving it to Google Sheets.

The main purpose is to save time and avoid mistakes in lead gathering.

The result is faster, more accurate lead lists ready for sales outreach.


Key tools and services

  • n8n automation platform: Runs the workflow and connects nodes.
  • OpenAI: Uses GPT-4o AI for understanding requests and data processing.
  • Google Sheets API: Stores and updates lead data records.
  • Apify API: Scrapes Google Maps and website content.
  • SerpAPI: Performs fallback Google searches when scraping is incomplete.

Inputs, Processing, and Outputs

Inputs

  • User message containing search terms, city, state, and country code.
  • Google Maps business listings via Apify API.
  • Website URLs to extract detailed content.

Processing steps

  • The Webhook node receives user messages and starts the workflow.
  • AI Agent – Lead Collection interprets input with ethical and format rules.
  • GPT-4o – Generate & Process Requests plans requests and data flow.
  • Memory – Track Recent Context maintains conversation history to keep answers consistent.
  • Scrape Google Maps (via Apify) gathers business data filtered by user criteria.
  • Save Extracted Data to Google Sheets appends results to a spreadsheet.
  • Aggregate Business Listings consolidates data for easier review.
  • Tool – Crawl Business Website launches subworkflow to get website details.
  • Scrape Website Content (via Apify) extracts content from websites for lead enrichment.
  • Save Website Data to Google Sheets stores enriched info in another sheet.
  • Aggregate Website Content combines website details for AI use.
  • Fallback – Enrich with Google Search uses SerpAPI when other data is missing.

Output

  • A clean spreadsheet with detailed, checked business leads for outreach.
  • Improved lead quality by avoiding duplicates and adding website info.
  • More efficient workflow enabling faster sales contact.

Beginner step-by-step: How to build this in n8n

Download and Import

  1. Download the workflow file using the Download button on this page.
  2. Go into the n8n editor where you want the workflow to run.
  3. Use “Import from File” option to upload the workflow JSON.

Configure Credentials

  1. Open each node requiring keys: OpenAI, Apify, Google Sheets, SerpAPI.
  2. Add valid API Keys exactly as given by each service.
  3. Update Google Sheets Document IDs and sheet names where data should be saved.
  4. Check any email addresses, URLs, or folder names and adjust to your setup.

Test and Activate

  1. Send a test message like “Find carpenters in San Francisco, US” to the workflow webhook.
  2. Watch the workflow run and check spreadsheet for results.
  3. Fix any API or ID errors if data does not appear correctly.
  4. Once tested, activate the workflow using the toggle switch for live use.

Extra Notes

  1. For better performance, consider self-host n8n.
  2. Make sure API limits for OpenAI and Apify are enough for expected usage.

Customization ideas

  • Increase or decrease the max number of places scraped by editing maxCrawledPlacesPerSearch in the Google Maps scrape node JSON.
  • Change the target Google Sheets Document ID and sheet names in related nodes to store data in preferred files.
  • Edit the AI Agent system prompt to focus on specific business types or add filters.
  • Add new search parameters like skipClosedPlaces or business categories by expanding the JSON body sent to the Apify API.

Handling errors and failures

No data from Google Maps Scraper API

Check that the country code is lowercased, like “us” not “US”.

Verify the city name is correct and spelled right.

Authorization or API key errors

Make sure API keys for Apify, OpenAI, Google Sheets, and SerpAPI are valid and not expired.

Re-enter keys in node credential sections.

JSON formatting problems

Use the n8n JSON editor to avoid syntax mistakes.

Test JSON in online validators before saving to prevent errors.


Summary of results

✓ Save 8+ hours weekly by automating lead data collection.

✓ Prevent errors and duplicates in lead information.

→ Get organized spreadsheets with complete business details.

→ Enable faster outreach with enriched data from websites and search.

Automate lead gen with n8n and Google Maps

Visit through Desktop to Interact with the Workflow.

Frequently Asked Questions

It sends a POST request to the Apify Google Maps Scraper API with search terms, city, and country code to gather business listings.
Verify the Google Sheets Document ID and sheet names are correctly set, and check that proper OAuth credentials are used.
Yes, but HTTP request nodes must be modified to match the alternative scraping APIs and their JSON payload formats.
The AI Agent node uses validation rules to detect duplicates and removes repeated entries before saving.

Promoted by BULDRR AI

Related Workflows

Automate Twist Channel Creation and Messaging with n8n

This workflow automates creating and updating a channel in Twist and sending a personalized message to specific users. It eliminates manual setup errors and saves time managing Twist communications.

Automate Ideogram Image Generation with Google Sheets & Gmail

This workflow automates graphic design image generation via Ideogram AI, storing image data in Google Sheets and Google Drive, with email alerts via Gmail. It saves designers hours by automating image creation, remixing, review, and record-keeping.

Automate IT Support with Slack and OpenAI in n8n

Streamline IT support by automating Slack message handling using n8n and OpenAI. This workflow handles Slack DMs, filters bots, queries a Confluence knowledge base, and delivers AI-generated responses, improving support efficiency and response time.

Automate Crypto Analysis with CoinMarketCap & n8n AI Agent

Discover how this unique n8n workflow leverages CoinMarketCap’s multi-agent AI to deliver precise, real-time cryptocurrency insights directly via Telegram. Manage crypto data analysis efficiently with automated multi-source API integration.

Automate Gumroad to Beehiiv Subscriber Sync with n8n

Learn how to automatically add new Gumroad sales customers as Beehiiv newsletter subscribers using n8n automation. This workflow saves time by syncing sales data to Google Sheets CRM and notifying your Telegram channel instantly.

Generate On-Brand Blog Articles Using n8n and OpenAI

This workflow automates the creation of on-brand blog articles by analyzing existing company content using n8n and OpenAI. It extracts article structures and brand voice to produce consistent draft articles, saving significant content creation time.
1:1 Free Strategy Session
Your competitors are already automating. Are you still paying for it manually?

Do you want to adopt AI Automation?

Every hour your team does repetitive work, you're burning real money.
While you wait, faster businesses are cutting costs and moving quicker.
AI and automations aren't the future anymore — they're the present.

Book a live 1-on-1 session where we show you exactly which of your daily tasks can be automated — and what it’s costing you not to.