Google Maps to Google Sheets, clean leads no repeats
You build a “target list” from Google Maps, paste it into a spreadsheet, and somehow it’s already messy. Duplicates. Half-filled rows. The same business showing up under slightly different names. Annoying.
This is the kind of problem marketing managers notice first. But agency owners trying to scale outreach and operators doing local research feel it too. With Google Maps leads automation, you stop re-checking what you already checked and you get a clean sheet that’s actually usable.
This workflow pulls business leads from Google Maps through RapidAPI, drops them into Google Sheets, and blocks duplicates at two different levels. Below is what it does, what you get, and how to run it without babysitting.
How This Automation Works
The full n8n workflow, from trigger to final output:
n8n Workflow Template: Google Maps to Google Sheets, clean leads no repeats
flowchart LR
subgraph sg0["Start Lead Generation Flow"]
direction LR
n0@{ icon: "mdi:play-circle", form: "rounded", label: "Start Lead Generation", pos: "b", h: 48 }
n1@{ icon: "mdi:swap-vertical", form: "rounded", label: "Configure Search Parameters", pos: "b", h: 48 }
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/httprequest.dark.svg' width='40' height='40' /></div><br/>Google Maps API Request"]
n3["<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/>Parse Business Data"]
n4@{ icon: "mdi:database", form: "rounded", label: "Load Search Criteria", pos: "b", h: 48 }
n5@{ icon: "mdi:swap-vertical", form: "rounded", label: "Process Each Location", pos: "b", h: 48 }
n6@{ icon: "mdi:database", form: "rounded", label: "Save New Leads", pos: "b", h: 48 }
n7@{ icon: "mdi:cog", form: "rounded", label: "Rate Limit Delay", pos: "b", h: 48 }
n8@{ icon: "mdi:database", form: "rounded", label: "Load Existing Leads", pos: "b", h: 48 }
n9["<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/merge.svg' width='40' height='40' /></div><br/>Filter New Searches"]
n6 --> n7
n7 --> n5
n9 --> n5
n8 --> n9
n3 --> n6
n4 --> n9
n5 --> n1
n0 --> n4
n0 --> n8
n2 --> n3
n1 --> n2
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 n4,n6,n8 database
class n2 api
class n3 code
classDef customIcon fill:none,stroke:none
class n2,n3,n9 customIcon
The Problem: Lead lists get dirty fast
Manual lead scraping looks simple until you do it for real campaigns. You search “coffee shops Paris,” open 20 listings, copy names and sites, then realize you also need phone numbers, addresses, and social profiles. Next week you run “cafés Paris” and pull half the same places again, because your sheet has no memory. Then someone on the team cleans duplicates by hand, misses a few, and your outreach tool gets fed junk. It’s slow. It’s tiring. And frankly it makes “market research” feel like copy-paste punishment.
The friction compounds.
- You end up paying twice in time because the same searches get repeated across weeks and team members.
- Duplicates slip into campaigns, which means wasted sends and awkward double-touches.
- Contact fields get captured inconsistently, so sorting and filtering becomes its own mini project.
- When you scale to multiple cities, the process becomes a rotating series of tabs, exports, and “did we already do this?” messages.
The Solution: Google Maps → Sheets, deduped automatically
This n8n workflow turns Google Maps searches into a structured, deduplicated lead database in Google Sheets. You start by listing your search queries (and optional latitude/longitude) in a “keyword_searches” sheet and marking the ones you want to run. When you trigger the workflow, it reads those marked queries, checks your existing “stores_data” sheet, and filters out searches you’ve already processed. Only fresh query+location combinations continue. Then it calls RapidAPI’s Local Business Data service to pull comprehensive business details and transforms the response into clean rows before appending them to Google Sheets. It also assigns a unique business ID so you don’t keep re-adding the same company across overlapping searches.
The workflow starts with a manual kickoff in n8n. From there, it loads your search criteria and existing leads, merges them to find only new searches, then processes each query in batches with a deliberate pause between requests. Finally, the new leads land in “stores_data” ready for outreach, analysis, or enrichment.
What You Get: Automation vs. Results
| What This Workflow Automates | Results You’ll Get |
|---|---|
|
|
Example: What This Looks Like
Say you’re building a list for 5 locations and you run 10 searches (50 query+location combos total). Manually, even a “quick” pass is maybe 10 minutes per combo once you copy names, sites, phones, and clean the formatting, so that’s about 8 hours of busywork. With this workflow, you mark the 50 rows with an “X,” click run, then let n8n handle the pulls with a 10-second throttle between requests. You’ll spend a few minutes reviewing the sheet at the end, not an entire day assembling it.
What You’ll Need
- n8n instance (try n8n Cloud free)
- Self-hosting option if you prefer (Hostinger works well)
- Google Sheets to store searches and lead rows.
- RapidAPI to access the Local Business Data API.
- RapidAPI key (get it from your RapidAPI dashboard).
Skill level: Intermediate. You will connect credentials, edit a Sheet ID, and validate the first run.
Don’t want to set this up yourself? Talk to an automation expert (free 15-minute consultation).
How It Works
Manual kickoff in n8n. You run the workflow when you’re ready to refresh a lead list or add new territories. No always-on triggers unless you choose to add them later.
Sheets become your control panel. n8n reads your “keyword_searches” tab and pulls only rows you’ve marked to run. At the same time, it loads existing rows from “stores_data” so it can recognize what you’ve already collected.
Fresh searches get processed in batches. A merge step filters out query+location combos that were already processed, then Split-in-Batches loops through what’s left. For each batch, the workflow assembles API parameters and makes an HTTP request to RapidAPI.
Clean rows land in “stores_data.” The response is transformed into structured business records (name, address, rating, review count, phone, site, socials, and more) and appended to Google Sheets. A built-in wait (about 10 seconds) reduces rate-limit headaches and keeps runs stable.
You can easily modify which columns you store to match your outreach process. See the full implementation guide below for customization options.
Step-by-Step Implementation Guide
Step 1: Configure the Manual Trigger
Set up the workflow to start on demand so you can control lead capture runs.
- Add and open Manual Lead Kickoff.
- Leave settings as default, since this node runs manually.
- Verify that Manual Lead Kickoff outputs to both Retrieve Search Criteria and Fetch Existing Leads in parallel.
Tip: Parallel execution helps you compare search criteria against existing leads in a single run.
Step 2: Connect Google Sheets
Retrieve search criteria and existing leads from Google Sheets and prepare the destination sheet for new leads.
- Open Retrieve Search Criteria and set Document ID to
[YOUR_ID]. - Set Sheet Name to
keyword_searchesand keep the filter where select equalsX. - Credential Required: Connect your
googleSheetsOAuth2Apicredentials in Retrieve Search Criteria. - Open Fetch Existing Leads and confirm Sheet Name is
stores_datawith Document ID set to[YOUR_ID]. - Credential Required: Connect your
googleSheetsOAuth2Apicredentials in Fetch Existing Leads. - Open Append New Leads and set Operation to
append, Sheet Name tostores_data, and Document ID to[YOUR_ID]. - Credential Required: Connect your
googleSheetsOAuth2Apicredentials in Append New Leads.
⚠️ Common Pitfall: Both Retrieve Search Criteria and Append New Leads are missing credentials in the workflow. The run will fail unless you add Google Sheets credentials.
Step 3: Set Up Query Preparation and Filtering
Prepare search parameters and ensure only new queries are processed.
- Open Filter Fresh Queries and set Mode to
combine. - Set Join Mode to
keepNonMatches, Output Data From toinput1, and Fields To Match toquery, lat. - Open Iterate Locations to control batching (leave default settings unless you want a specific batch size).
- Open Assemble Query Params and confirm the assignments include
={{ $json.query }},={{ $json.lat }},={{ $json.lon }}, and={{ $json.country_iso_code }}plus static valuesEN,13, and100for language, zoom, and limit.
Step 4: Configure API Retrieval and Transformation
Call the external API and normalize the lead data before saving.
- Open Map Data API Call and set URL to
https://local-business-data.p.rapidapi.com/search-in-area. - Set Send Query to
trueand Specify Query tojson. - Paste the JSON body into JSON Query:
{"query":"{{ $json.search }}","lat":"{{ $json.latitude }}","lng":"{{ $json.longitude }}","zoom":"{{ $json.zoom }}","limit":"{{ $json.limit }}","language":"{{ $json.language }}","region":"{{ $json.region }}","extract_emails_and_contacts":"true"}. - Credential Required: Connect your
httpHeaderAuthcredentials in Map Data API Call. - Open Transform Business Records and keep the provided JavaScript to map business fields, emails, and social profiles into structured output.
Step 5: Configure Output Throttling and Looping
Control pacing and ensure the workflow continues to iterate through all locations.
- Open Append New Leads and verify the column mappings use expressions like
={{ $json.name }},={{ $json.email }}, and={{ $json.full_address }}. - Open Throttle Pause and set Amount to
10to pause between batches. - Confirm the flow Append New Leads → Throttle Pause → Iterate Locations is connected to continue processing each batch.
Tip: Increase Amount in Throttle Pause if the API rate limits are strict.
Step 6: Test and Activate Your Workflow
Run a manual test to validate the end-to-end lead capture before enabling ongoing use.
- Click Execute Workflow from Manual Lead Kickoff.
- Confirm Retrieve Search Criteria and Fetch Existing Leads both return data, and Filter Fresh Queries only keeps new combinations of
queryandlat. - Verify Map Data API Call returns results, and Transform Business Records outputs structured fields like
name,email, andplace_id. - Check the
stores_datasheet to confirm new rows appear after Append New Leads. - When satisfied, save the workflow and switch it to Active for production use.
Common Gotchas
- Google Sheets credentials can expire or need specific permissions. If things break, check the n8n Credentials screen and confirm the connected Google account still has access to the target spreadsheet.
- If you’re using Wait nodes or external rendering, processing times vary. Bump up the wait duration if downstream nodes fail on empty responses.
- RapidAPI calls can fail from plan limits or missing headers. Double-check your HTTP Header Auth credential includes both X-RapidAPI-Key and X-RapidAPI-Host, and look at the HTTP Request node’s last response for the error message.
Frequently Asked Questions
About 15–20 minutes if your RapidAPI and Google credentials are ready.
No. You’ll mainly connect accounts and paste in your Google Sheet ID. The only “technical” part is testing one run and confirming the columns look right.
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 RapidAPI costs based on your plan and request volume.
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 it’s one of the best reasons to use this template. Your “keyword_searches” sheet already supports multiple locations with lat/lon and a country ISO code, so you can add more rows to scale. You can also adjust parameters like results limit, zoom (search radius), and language in the request-building part of the workflow (the “Assemble Query Params” step). Many teams also customize the “Transform Business Records” step to keep only the columns they actually use.
Usually it’s missing or incorrect headers. Confirm your HTTP Header Auth credential includes X-RapidAPI-Key and X-RapidAPI-Host (local-business-data.p.rapidapi.com), then re-run the HTTP Request node and check the latest response for the exact error.
A lot, as long as your API plan and Google Sheet can keep up. The workflow pulls up to 100 results per query by default, and it throttles requests with a 10-second wait to stay reliable. On n8n Cloud, your monthly execution limit depends on your plan; if you self-host, you’re mainly limited by server resources and the API quota you’ve purchased.
Often, yes, because this workflow is doing more than a simple “trigger → action.” You’re filtering searches, looping through batches, transforming the API response, and preventing duplicates, which is where Zapier/Make scenarios can get expensive or awkward. n8n also gives you a self-host route, which matters when you’re running lots of list builds. If you only need to push a single API response into a sheet once in a while, Zapier or Make can be quicker to click together. Talk to an automation expert if you want help choosing.
Once this is running, lead research stops being a recurring cleanup project. You get a sheet that stays clean, so outreach and analysis can move faster.
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.