Google Maps to Google Sheets, clean leads ready
Copying businesses out of Google Maps is annoying on a good day. On a busy day, it turns into tabs everywhere, half-finished lists, and “I’ll clean it up later” leads that never get cleaned.
If you do outreach, agency owners feel this weekly. A marketing manager building local lists runs into the same mess. Even a solo consultant prospecting niche services gets stuck. This maps lead scraping automation takes a Google Maps search and turns it into a clean Sheet you can actually use.
You’ll see exactly what the workflow does, what you need to run it, and how to think about customizing it so your outreach list stays reliable.
How This Automation Works
Here’s the complete workflow you’ll be setting up:
n8n Workflow Template: Google Maps to Google Sheets, clean leads ready
flowchart LR
subgraph sg0["When clicking ‘Test workflow’ Flow"]
direction LR
n0@{ icon: "mdi:play-circle", form: "rounded", label: "When clicking ‘Test workflow’", pos: "b", h: 48 }
n1["<div style='background:#f5f5f5;padding:10px;border-radius:8px;display:inline-block;border:1px solid #e0e0e0'><img src='https://flowpast.com/wp-content/uploads/n8n-workflow-icons/httprequest.dark.svg' width='40' height='40' /></div><br/>Scrape Google Maps"]
n2["<div style='background:#f5f5f5;padding:10px;border-radius:8px;display:inline-block;border:1px solid #e0e0e0'><img src='https://flowpast.com/wp-content/uploads/n8n-workflow-icons/code.svg' width='40' height='40' /></div><br/>Extract URLs"]
n3@{ icon: "mdi:swap-horizontal", form: "rounded", label: "Filter Google URLs", pos: "b", h: 48 }
n4@{ icon: "mdi:cog", form: "rounded", label: "Remove Duplicates", pos: "b", h: 48 }
n5@{ icon: "mdi:cog", form: "rounded", label: "Limit", pos: "b", h: 48 }
n6@{ icon: "mdi:swap-vertical", form: "rounded", label: "Loop Over Items", pos: "b", h: 48 }
n7@{ icon: "mdi:cog", form: "rounded", label: "Wait1", pos: "b", h: 48 }
n8["<div style='background:#f5f5f5;padding:10px;border-radius:8px;display:inline-block;border:1px solid #e0e0e0'><img src='https://flowpast.com/wp-content/uploads/n8n-workflow-icons/httprequest.dark.svg' width='40' height='40' /></div><br/>Scrape Site"]
n9@{ icon: "mdi:cog", form: "rounded", label: "Wait", pos: "b", h: 48 }
n10["<div style='background:#f5f5f5;padding:10px;border-radius:8px;display:inline-block;border:1px solid #e0e0e0'><img src='https://flowpast.com/wp-content/uploads/n8n-workflow-icons/code.svg' width='40' height='40' /></div><br/>Extract Emails"]
n11@{ icon: "mdi:swap-horizontal", form: "rounded", label: "Filter Out Empties", pos: "b", h: 48 }
n12@{ icon: "mdi:swap-vertical", form: "rounded", label: "Split Out", pos: "b", h: 48 }
n13@{ icon: "mdi:cog", form: "rounded", label: "Remove Duplicates (2)", pos: "b", h: 48 }
n14@{ icon: "mdi:database", form: "rounded", label: "Add to Sheet", pos: "b", h: 48 }
n9 --> n10
n5 --> n6
n7 --> n11
n12 --> n13
n8 --> n9
n2 --> n3
n10 --> n6
n6 --> n7
n6 --> n8
n4 --> n5
n3 --> n4
n11 --> n12
n1 --> n2
n13 --> n14
n0 --> n1
end
%% Styling
classDef trigger fill:#e8f5e9,stroke:#388e3c,stroke-width:2px
classDef ai fill:#e3f2fd,stroke:#1976d2,stroke-width:2px
classDef aiModel fill:#e8eaf6,stroke:#3f51b5,stroke-width:2px
classDef decision fill:#fff8e1,stroke:#f9a825,stroke-width:2px
classDef database fill:#fce4ec,stroke:#c2185b,stroke-width:2px
classDef api fill:#fff3e0,stroke:#e65100,stroke-width:2px
classDef code fill:#f3e5f5,stroke:#7b1fa2,stroke-width:2px
classDef disabled stroke-dasharray: 5 5,opacity: 0.5
class n0 trigger
class n3,n11 decision
class n14 database
class n1,n8 api
class n2,n10 code
classDef customIcon fill:none,stroke:none
class n1,n2,n8,n10 customIcon
Why This Matters: Google Maps Leads Get Messy Fast
Lead lists from Google Maps usually start with good intentions. Then reality shows up. You grab a few businesses, paste them into a spreadsheet, and immediately hit the usual problems: missing websites, no contact emails, duplicates, and “links” that are really Google redirect URLs. After about 30 minutes, you’re not prospecting anymore. You’re cleaning. Worse, the list looks done, but it’s quietly unreliable, which means outreach bounces, wasted follow-ups, and that nagging feeling you should double-check everything.
The friction compounds.
- Manually opening listings and copying details turns one search into an hour of repetitive work.
- Google/tracking links sneak in, so you end up scraping the wrong pages or saving unusable URLs.
- Duplicates show up constantly once you run multiple searches across nearby cities or similar keywords.
- Even when you collect websites, finding emails becomes a second project with even more tabs.
What You’ll Build: Google Maps Search → Clean Sheet Leads
This workflow starts with a Google Maps search URL (for example, “carpenters in Tarragona”) and automatically pulls the listings from the results page. It extracts the business website links, removes junk URLs that point back to Google or tracking redirects, then deduplicates the remaining sites so you’re not processing the same domain again and again. Next, it visits each website, grabs the HTML, and scans it for valid email addresses. When it finds emails, it splits them into clean, individual items, filters out empty results, removes duplicate emails, and finally appends the cleaned leads to Google Sheets. The end result is a spreadsheet-ready outreach list, built from a search you already know how to do.
The workflow begins when you run it manually inside n8n. From there, it fetches Google Maps HTML, turns that into a list of unique websites, then loops through each site to extract emails. At the end, Google Sheets receives a tidy set of results you can sort, enrich, and contact.
What You’re Building
| What Gets Automated | What You’ll Achieve |
|---|---|
|
|
Expected Results
Say you build a list for one niche in one city and you want 100 leads. Manually, if you spend about 2 minutes per listing to open it, grab the site, and hunt for an email, you’re looking at roughly 3 hours. With this workflow, you paste in the Google Maps search URL, hit test, and let it run. You might spend 10 minutes reviewing the final Sheet, while the scraping and parsing happens in the background.
Before You Start
- n8n instance (try n8n Cloud free)
- Self-hosting option if you prefer (Hostinger works well)
- Google Sheets for storing your cleaned lead list.
- Google Maps search URL to define the niche and location.
- Google Sheets OAuth2 credentials (get it from Google Cloud Console)
Skill level: Beginner. You’ll connect accounts, paste a URL, and tweak a limit or two.
Want someone to build this for you? Talk to an automation expert (free 15-minute consultation).
Step by Step
You start the run manually. In n8n, you click “Test Workflow” (or execute the workflow) when you’re ready to generate a fresh batch of leads for a specific search.
Google Maps gets fetched and parsed. The workflow pulls the HTML from your Google Maps search URL, then a code step extracts the outgoing website links from the page.
Links get cleaned and deduplicated. It filters out Google URLs and tracking redirects, removes duplicates, and applies a record limit (the default is 100) so you control how big each run gets.
Each website is visited to find emails. n8n loops through the websites in batches, fetches each site’s HTML, waits briefly so you don’t overload anything, then parses for valid email addresses and drops empty results.
Results land in Google Sheets. Emails are split into individual rows, duplicates are removed again (now at the email level), and the final list is appended to your spreadsheet for outreach.
You can easily modify the record limit to process fewer sites per run, or change the search URL to target a new niche. See the full implementation guide below for customization options.
Step-by-Step Implementation Guide
Step 1: Configure the Manual Trigger
Start the workflow manually so you can validate each stage of the email collection pipeline.
- Add Manual Launch Trigger as the entry point of the workflow.
- Connect Manual Launch Trigger to Map Search Fetch to ensure the workflow starts with the search request.
Step 2: Connect Google Sheets
Prepare the output destination for captured email addresses.
- Open Append to Spreadsheet and select Operation as
append. - Set Spreadsheet to
[YOUR_ID]and Sheet toHoja 1(valuegid=0). - Credential Required: Connect your
googleSheetsOAuth2Apicredentials.
Step 3: Set Up Website Discovery and Filtering
Fetch map search data, extract website URLs, and filter out non-relevant domains.
- In Map Search Fetch, set URL to
https://www.google.[CONFIGURE_YOUR_API_KEY]/@41.1402229,1.0832014,56063m/data=!3m1!1e3?entry=ttu&g_ep=EgoyMDI1MTAwMS4wIKXMDSoASAFQAw%3D%3D. - In Website Link Extractor, paste the JavaScript code that extracts URLs:
const input = $input.first().json.data const regex = /https?:\/\/[^\/\s">]+/g const websites = input?.match?.(regex) || [] return websites.map(website => ({ json: { website } })). - Configure Exclude Google Links with “does not contain” string filters using
{{ $json.website }}againstschema,google,gg,gstatic,sentry.wixpress.com,sentry.io, andsentry-next.wixpress.com. - Keep Unique Website Filter to remove duplicates before processing.
- Set Record Limit Control Max Items to
100to control request volume.
[CONFIGURE_YOUR_API_KEY] in Map Search Fetch with a valid API endpoint or your requests will fail.Step 4: Set Up Email Extraction Loop
Iterate through each website, download the HTML, and parse for emails in a controlled loop.
- Connect Record Limit Control to Iterate Records to batch through website URLs.
- Iterate Records outputs to both Pause Before Filter and Site HTML Fetch in parallel to manage the loop timing and fetch requests.
- In Site HTML Fetch, set URL to
{{ $json.website }}so each website is fetched dynamically. - In Brief Delay, set Amount to
1to add a short delay between fetch and parse. - In Email Address Parser, paste the email regex code:
const input = $input.first().json.data const regex = /[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\\.(?!jpeg|jpg|png|gif|webp|svg)[a-zA-Z]{2,}/g const emails = input?.match?.(regex) || [] return { json: { emails } }. - In Keep Nonempty Emails, add an “exists” array condition with Left Value set to
{{ $json.emails }}. - In Expand Email Items, set Field to Split Out to
emails, then pass the results through Unique Email Filter.
Step 5: Configure Output to Spreadsheet
Send the cleaned, unique emails into your Google Sheet.
- Connect Unique Email Filter to Append to Spreadsheet.
- Confirm the column schema in Append to Spreadsheet matches your sheet (e.g.,
Título,Texto,HECHO,TIKTOK,SHORTS,Fecha). - Credential Required: Connect your
googleSheetsOAuth2Apicredentials if not already set.
Step 6: Test and Activate Your Workflow
Validate end-to-end execution before running it regularly.
- Click Execute Workflow from Manual Launch Trigger to run a full test.
- Confirm that Map Search Fetch returns data and Website Link Extractor outputs website items.
- Verify that Unique Email Filter outputs individual email records and Append to Spreadsheet appends new rows.
- Once verified, click Activate to enable the workflow for production use.
Troubleshooting Tips
- Google Sheets credentials can expire or need specific permissions. If things break, check the Google Sheets node credential selection and your Google Cloud OAuth consent/permissions 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.
- HTTP Request scraping can fail if the target site blocks bots or serves different HTML. If email extraction suddenly drops to zero, inspect the fetched HTML output in n8n and consider adding headers or slowing the batch size.
Quick Answers
About 20 minutes if your Google Sheets connection is ready.
No. You’ll import the workflow, connect credentials, and paste your Google Maps search URL.
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 HTTP usage and your time reviewing results, since this workflow doesn’t require paid AI APIs.
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.
Yes, and you should. Most people swap the Google Maps search URL in the “Map Search Fetch” HTTP Request node, adjust the “Record Limit Control” node to run smaller batches, and change what gets written in “Append to Spreadsheet” (extra columns like niche, city, or source). If you want more aggressive scraping, tweak the wait nodes, but be careful because some sites will block fast repeated requests.
Usually it’s expired or mismatched OAuth credentials. Reconnect Google Sheets in n8n, confirm you selected the right Google account, and make sure the target spreadsheet is shared with that account. If it still fails, check the node settings for the correct Sheet/tab name because renamed tabs are a silent workflow killer.
The workflow is set to about 100 unique websites per run by default, and you can raise or lower that limit.
Often, yes. Zapier and Make are great for moving data between apps, but scraping, parsing HTML, deduplicating, and looping through batches is where they get clunky fast (and pricey once you add steps). n8n handles branching, code steps, and batch processing in one place, and self-hosting removes execution anxiety when you scale. On the other hand, if you only need to append a few rows from a form, Zapier is simpler. Talk to an automation expert if you’re on the fence.
Once this is running, your “lead gen day” stops being a copy-paste marathon. You’ll get a cleaner list, faster, and you can put that time into actual outreach.
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.