🔓 Unlock all 10,000+ workflows & prompts free Join Newsletter →
✅ Full access unlocked — explore all 10,000 AI workflow and prompt templates Browse Templates →
Home n8n Workflow
January 22, 2026

Google Maps to Google Sheets, clean leads you can trust

Lisa Granqvist Partner Workflow Automation Expert

You find a promising niche on Google Maps, copy a few businesses into a sheet, and then reality hits. Half the “websites” are Google redirects, emails are missing, and you’ve already pasted the same company twice. Again.

This is where Maps leads automation pays for itself. Marketing managers trying to fill the pipeline feel it first, but agency owners and solo consultants doing research for clients get stuck in the same loop. You want a lead list you can actually trust, not a spreadsheet of maybes.

This n8n workflow pulls prospects from Google Maps, cleans and dedupes URLs, enriches business profiles via Apify, and logs everything into Google Sheets. You’ll see how it works, what you need, and what you can customize for your market.

How This Automation Works

The full n8n workflow, from trigger to final output:

n8n Workflow Template: Google Maps to Google Sheets, clean leads you can trust

The Problem: Google Maps leads get messy fast

Google Maps is a goldmine for local lead gen, but collecting that data manually is a slow grind. You run a search, open profiles, copy names, websites, phone numbers, maybe the address, and then you try to “standardize it later.” Later never comes. Meanwhile, redirects sneak into your sheet, different locations of the same brand show up as separate leads, and contact fields are missing right when you need them. The worst part is the mental load: you’re doing detective work when you should be doing outreach.

It adds up fast. Here’s where it breaks down once you try to scale beyond a handful of searches.

  • You waste about 2 hours building a list that still needs cleaning.
  • Duplicate domains slip in, so outreach looks sloppy and you burn goodwill.
  • Missing emails and inconsistent fields force you into another research pass.
  • You can’t reliably re-run the process because you don’t track what’s already processed.

The Solution: Search Google Maps, clean the data, and store it automatically

This workflow turns Google Maps searches into a repeatable lead pipeline that runs on a schedule (every hour). It starts by reading keyword queries from a dedicated Google Sheets tab, then searches Google Maps for each query via an HTTP request. From those results, it extracts external website URLs, filters out junk domains (like Google-owned pages or placeholder sites), and removes duplicates before doing anything expensive. Next, it checks your Google Sheet to see if that domain already exists, which prevents repeats from earlier runs. For each new domain, it calls an Apify scraper to pull a full business profile, and it can optionally run an AI Agent (Gemini via OpenRouter) to generate structured business insights you can actually use. Finally, everything is appended into a “Sheet1” tab, and the original keyword row gets marked as processed so the workflow doesn’t keep spinning its wheels.

The workflow begins on a schedule and grabs unprocessed search terms from Google Sheets. It then collects and cleans website URLs from Google Maps results, scrapes and enriches each business, and writes a deduped row back to your output sheet. Simple input, clean output.

What You Get: Automation vs. Results

Example: What This Looks Like

Say you’re building a list for “roofing companies in Austin” and “emergency plumbers in Phoenix,” and you want about 40 solid prospects per query. Manually, you might spend about 3 minutes per business to copy details and double-check the website, which is roughly 2 hours for 40 leads. With this workflow, you drop the keywords into the sheet once, and the hourly run does the searching, cleaning, and logging while you do other work. Your “time spent” becomes a quick review and maybe a few edits, not an afternoon of copy-paste.

What You’ll Need

  • n8n instance (try n8n Cloud free)
  • Self-hosting option if you prefer (Hostinger works well)
  • Google Sheets to store keywords and results.
  • Apify for scraping complete business profiles.
  • OpenRouter API key (get it from your OpenRouter dashboard)

Skill level: Intermediate. You’ll connect accounts, paste API keys, and adjust a couple of sheet/tab names.

Don’t want to set this up yourself? Talk to an automation expert (free 15-minute consultation).

How It Works

A scheduled run pulls your next keywords. Every hour, n8n reads rows from your Google Sheets “keywords” tab and selects the ones you haven’t processed yet.

Google Maps search results get turned into a usable URL list. The workflow runs the Maps query via HTTP request, then parses the response to extract external website links. After that, it filters out obvious noise (Google-owned domains, placeholders) and removes duplicates.

Each domain is checked before it becomes a “lead.” n8n looks up the domain in your output sheet first. If it’s already there, it skips it. If it’s new, the workflow calls an Apify actor to scrape business details and can send that data to an AI Agent to generate structured insights (like services, market position, and suggested angles).

Clean rows land in Google Sheets, and keywords get marked done. The scraped and AI-enriched fields are appended to “Sheet1,” then the workflow updates the keyword row so it won’t run again next hour.

You can easily modify the keyword list and filtering rules to match your niche and geography based on your needs. See the full implementation guide below for customization options.

Step-by-Step Implementation Guide

Step 1: Configure the Schedule Trigger

This workflow starts on a schedule to pull unprocessed queries and then hands off map scraping to a sub-workflow trigger.

  1. Open Scheduled Automation Trigger and set the schedule rule to run on your desired interval (currently set to hourly).
  2. Verify Scraper Workflow Trigger exists as an entry point for the sub-workflow; it should be connected to Query Maps Search.
  3. Confirm the flow order: Scheduled Automation TriggerRetrieve Sheet RowsIterate Query Batches.

⚠️ Common Pitfall: If the sub-workflow is not connected to Scraper Workflow Trigger, the execute workflow step will run but no scraping will occur.

Step 2: Connect Google Sheets

Google Sheets powers query intake, de-duplication checks, and output storage.

  1. In Retrieve Sheet Rows, select your spreadsheet and sheet: Document set to the Google Sheet ID and Sheet Name set to keywords. Credential Required: Connect your googleSheetsOAuth2Api credentials.
  2. In Lookup Existing Records, select the output sheet (e.g., Sheet1) for de-duplication checks. Credential Required: Connect your googleSheetsOAuth2Api credentials.
  3. In Modify Sheet Row, confirm Operation is set to update and map query to {{$json.query}} with processed set to TRUE. Credential Required: Connect your googleSheetsOAuth2Api credentials.
  4. In Append Data to Sheet, confirm Operation is append and the destination sheet is set to Sheet1. Credential Required: Connect your googleSheetsOAuth2Api credentials.

⚠️ Common Pitfall: Ensure the sheet columns in Append Data to Sheet match your headers exactly (e.g., “Business Name”, “Website URL”), otherwise auto-mapping will fail.

Step 3: Configure Maps Search and URL Filtering

This section turns queries into candidate business domains and removes irrelevant URLs.

  1. In Query Maps Search, set URL to =https://www.google.com/maps/search/{{ $json.query }}.
  2. In Extract Links from Results, keep the JavaScript as provided to extract domains from HTML results.
  3. In Exclude Unrelated Links, confirm the filter uses leftValue ={{ $json.url }} and excludes the provided regex list via notRegex.
  4. In Eliminate Repeated Links, leave defaults to remove duplicates before batching.
  5. In Iterate URL Batches, keep the batch loop for per-domain processing and ensure it routes to both Combine Data Streams and Lookup Existing Records on the second output.

Step 4: Set Up Domain Checks and Branch Logic

This logic prevents re-processing domains already stored in your sheet.

  1. In Aggregate URL Fields, ensure it aggregates the website_url field (as configured).
  2. In Check Domain Presence, keep the provided JavaScript, which compares Iterate URL Batches domains with stored URLs.
  3. In Combine Data Streams, set Mode to combineBySql and Query to SELECT * FROM input1 LEFT JOIN input2 ON 1=1.
  4. In Branch Logic Check, verify the condition checks ={{ $json.dontExist }} is true before calling the scraper.
  5. In Run Sub-Workflow Required, set the Workflow ID to the target scraper workflow and keep Mode as each.

Tip: The execution order is Aggregate URL FieldsCheck Domain PresenceCombine Data StreamsBranch Logic Check, so any changes to fields should happen before aggregation.

Step 5: Set Up AI Enrichment and Prompt Assembly

The Apify scraper extracts content, which is turned into a prompt for the AI agent and parsed into structured JSON.

  1. In Invoke Apify Scraper, set URL to =https://api.apify.com/v2/acts/mohamedgb00714~firescraper-ai-prompt-website-content-markdown-scraper/run-sync-get-dataset-items?token=[CONFIGURE_YOUR_TOKEN] and keep JSON Body as provided (note it uses {{$json.url}}).
  2. In Combine Prompt Data, set Aggregate to aggregateAllItemData.
  3. In Assemble Prompt Text, keep the script that joins promptResult values into a single prompt.
  4. In Business Insight Agent, set Text to ={{ $json.prompt }} and keep the system message provided.
  5. OpenRouter Chat Engine is connected as the language model for Business Insight Agent — ensure credentials are added to OpenRouter Chat Engine. Credential Required: Connect your openRouterApi credentials.
  6. In Parse JSON Output, keep the code that strips code fences and parses valid JSON.

⚠️ Common Pitfall: Replace [CONFIGURE_YOUR_TOKEN] in Invoke Apify Scraper with your Apify token; leaving the placeholder will cause 401 errors.

Step 6: Configure Output Updates and Rate Limiting

After enrichment, the workflow appends data, updates the query row, and pauses before the next batch.

  1. Verify Append Data to Sheet receives parsed JSON from Parse JSON Output and maps fields automatically.
  2. Ensure Run Sub-Workflow RequiredModify Sheet Row marks each query as processed with processed = TRUE.
  3. In Pause Between Runs, set Unit to minutes and Amount to 20 to throttle Google Maps requests.
  4. Confirm the batch loop closes with Pause Between RunsIterate Query Batches for the next query.

Step 7: Test and Activate Your Workflow

Run a controlled test before turning the schedule on.

  1. Click Execute Workflow on Scheduled Automation Trigger to run a manual test using a small set of unprocessed queries.
  2. Verify that Query Maps Search returns HTML data, Extract Links from Results produces URLs, and Branch Logic Check routes new domains to Invoke Apify Scraper.
  3. Confirm that Parse JSON Output produces valid JSON and Append Data to Sheet adds rows to your output sheet.
  4. Validate that Modify Sheet Row sets processed to TRUE and the loop waits in Pause Between Runs.
  5. Once the test is successful, toggle the workflow to Active to enable scheduled production runs.
🔒

Unlock Full Step-by-Step Guide

Get the complete implementation guide + downloadable template

Common Gotchas

  • Google Sheets credentials can expire or need specific permissions. If things break, check the n8n credential connection status and the target spreadsheet sharing settings first.
  • If you’re using Wait nodes or external rendering, processing times vary. Bump up the wait duration if downstream nodes fail on empty responses.
  • OpenRouter (Gemini) prompts are generic by default. Add your targeting rules and brand voice early or you’ll be editing outputs forever.

Frequently Asked Questions

How long does it take to set up this Maps leads automation?

About an hour if your Sheets and API keys are ready.

Do I need coding skills to automate Maps leads automation?

No. You’ll mostly connect accounts and paste API keys. The only “technical” part is making sure your sheet tabs match the workflow.

Is n8n free to use for this Maps leads automation workflow?

Yes. n8n has a free self-hosted option and a free trial on n8n Cloud. Cloud plans start at $20/month for higher volume. You’ll also need to factor in OpenRouter and Apify usage costs, which depend on how many businesses you enrich.

Where can I host n8n to run this automation?

Two options: n8n Cloud (managed, easiest setup) or self-hosting on a VPS. For self-hosting, Hostinger VPS is affordable and handles n8n well. Self-hosting gives you unlimited executions but requires basic server management.

Can I customize this Maps leads automation workflow for different cities and industries?

Yes, and it’s one of the best reasons to use this workflow. Update the queries in the Google Sheets “keywords” tab to swap locations, categories, and intent (for example, “dentist + Invisalign” versus “emergency dentist”). You can also tweak the URL filtering logic so it blocks specific directories or known aggregator domains in your niche. If you use the AI Agent step, adjust the prompt assembly so it outputs exactly what your sales team needs, like “best outreach angle” or “likely ad spend level.”

Why is my Google Sheets connection failing in this workflow?

Usually it’s an expired credential or the spreadsheet permissions changed. Reconnect the Google Sheets credential in n8n, then confirm the Google account still has access to the exact file and tabs the workflow references. Also check that the tab names haven’t been renamed (for example, “Sheet1” or “keywords”), because that can look like a connection issue even when auth is fine.

How many leads can this Maps leads automation handle?

On a typical n8n setup, hundreds of leads per day is realistic, and self-hosting scales further if your server can handle it.

Is this Maps leads automation better than using Zapier or Make?

Often, yes, because this workflow needs looping, deduping, and multi-step enrichment that gets awkward (and pricey) in simpler automation tools. n8n handles branching logic and batch processing cleanly, so you can check “already exists?” before you scrape or enrich anything. The HTTP and code steps also give you more control over filtering Google Maps results, which matters if you care about clean domains. Zapier or Make can still be fine if you only want to push a small number of pre-cleaned records into a sheet. If you’re unsure, Talk to an automation expert and get a quick recommendation.

Once this is running, your spreadsheet stops being a messy draft and starts being a lead engine. Set it up once, then spend your time on outreach and offers instead of cleaning rows.

Need Help Setting This Up?

Our automation experts can build and customize this workflow for your specific needs. Free 15-minute consultation—no commitment required.

Lisa Granqvist

Workflow Automation Expert

Expert in workflow automation and no-code tools.

×

Use template

Get instant access to this n8n workflow Json file

💬
Get a free quote today!
Get a free quote today!

Tell us what you need and we'll get back to you within one working day.

Get a free quote today!
Get a free quote today!

Tell us what you need and we'll get back to you within one working day.

Launch login modal Launch register modal