Apify to Google Sheets, clean Google Maps leads
Pulling leads from Google Maps sounds simple until you’re stuck juggling tabs, exporting messy files, and cleaning duplicates by hand. After a few runs, the “quick task” turns into a weekly time sink.
This Apify Sheets leads setup hits marketing managers building outreach lists first. But sales reps doing local prospecting and agency owners delivering lead lists to clients feel the same drag. The outcome is straightforward: clean rows in Google Sheets, ready to sort, filter, and contact.
You’ll see how this workflow pulls Google Maps listings via Apify, waits for the scrape to finish, then appends structured results into a sheet without the copy-paste chaos.
How This Automation Works
The full n8n workflow, from trigger to final output:
n8n Workflow Template: Apify to Google Sheets, clean Google Maps leads
flowchart LR
subgraph sg0["Manual Launch Flow"]
direction LR
n0@{ icon: "mdi:play-circle", form: "rounded", label: "Manual Launch Trigger", pos: "b", h: 48 }
n1@{ icon: "mdi:cog", form: "rounded", label: "Pause for Results", pos: "b", h: 48 }
n2@{ icon: "mdi:swap-vertical", form: "rounded", label: "Expand Records for Sheets", pos: "b", h: 48 }
n3@{ icon: "mdi:database", form: "rounded", label: "Append Lead Data to Sheet", pos: "b", h: 48 }
n4["<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/>Retrieve Apify Dataset"]
n5["<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/>Initiate Apify Run"]
n4 --> n2
n1 --> n4
n5 --> n1
n2 --> n3
n0 --> n5
end
subgraph sg1["Flow 2"]
direction LR
n6["<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/>Utility: Small Batch Apify Run"]
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 database
class n4,n5,n6 api
classDef customIcon fill:none,stroke:none
class n4,n5,n6 customIcon
The Problem: Google Maps lead lists get messy fast
Google Maps is packed with prospects, but collecting them reliably is a grind. You run a search, open listings one-by-one, copy names and phone numbers, then realize half the “leads” are missing key details or formatted differently. Even when you use a scraping tool, you still end up cleaning columns, deleting duplicates, and re-importing data because the first export didn’t match your sheet. It’s mentally exhausting, and honestly it makes outreach feel harder than it should be.
It adds up fast. Here’s where it breaks down in real life.
- You spend about 2 hours assembling a list, and another hour cleaning it into something usable.
- Different exports use different field names, so your Google Sheet columns stop lining up after the second run.
- Duplicates sneak in when you scrape similar queries across neighborhoods or nearby cities.
- Even small formatting issues (like phone numbers, addresses, or empty emails) slow down filtering and outreach.
The Solution: Apify → n8n → clean rows in Google Sheets
This workflow turns Google Maps scraping into a repeatable lead pipeline. You start it manually (or on a schedule if you want), and n8n triggers an Apify run using the Google Places scraper actor. Then it pauses briefly so the scraping job can actually finish, pulls the dataset from Apify, expands each listing into individual records, and appends them to your Google Sheet as neat rows. No exporting files. No reformatting columns. And because the sheet is your “single source,” it becomes easy to filter by neighborhood, sort by rating, or split lists for outreach.
The workflow begins with a simple trigger and an HTTP request that starts the Apify run. After a built-in wait, another request retrieves the dataset, and a split/expand step prepares fields like business name, address, state, neighborhood, phone, and emails. Finally, Google Sheets receives each record as a new row.
What You Get: Automation vs. Results
| What This Workflow Automates | Results You’ll Get |
|---|---|
|
|
Example: What This Looks Like
Say you need 200 “dentist” leads in Toronto. Manually, even a quick process is about 1 minute per lead to open, copy, and clean, so you’re staring at roughly 3 hours plus cleanup. With this workflow, you spend about 10 minutes setting the search parameters, then wait around a minute for Apify to start and another minute for results to be ready. The rest lands in Google Sheets automatically, ready to filter and assign.
What You’ll Need
- n8n instance (try n8n Cloud free)
- Self-hosting option if you prefer (Hostinger works well)
- Apify to scrape Google Maps business listings
- Google Sheets to store and filter clean lead rows
- Apify API token (get it from Apify Settings → Integrations → API tokens)
Skill level: Beginner. You’ll paste an API token, adjust a few fields (location, category), and connect Google Sheets.
Don’t want to set this up yourself? Talk to an automation expert (free 15-minute consultation).
How It Works
You trigger the run. In the provided template it starts with a manual click, which is perfect for ad-hoc lead pulls. If you want, you can later swap in a scheduled trigger for daily or weekly runs.
Apify starts scraping Google Maps. n8n sends an HTTP request to Apify to kick off the Google Places scraper actor with your search parameters (locationQuery and searchStringsArray). That’s how you control “Toronto dentists” versus “Austin roofers.”
The workflow waits, then fetches the dataset. Apify scraping isn’t instant, so the Wait step gives the job time to finish. After that, n8n retrieves the dataset URL and pulls the results back in.
Records expand into rows and land in Google Sheets. Each listing is split into individual items, mapped to your sheet columns (title, address, state, neighborhood, phone, emails), then appended as new rows so your sheet stays consistent.
You can easily modify the search parameters to target a new city or business category based on your needs. See the full implementation guide below for customization options.
Step-by-Step Implementation Guide
Step 1: Configure the Manual Trigger
Start the workflow with a manual execution so you can test and refine the Apify request before automating.
- Add the Manual Launch Trigger node as the workflow trigger.
- Keep default settings in Manual Launch Trigger (no parameters required).
- Connect Manual Launch Trigger to Initiate Apify Run.
Step 2: Connect Apify and Configure the Run Sequence
This workflow runs an Apify actor, waits, then retrieves the dataset for processing.
- In Initiate Apify Run, set URL to
enter apify (get run)and keep Method asPOST. - In Initiate Apify Run, set Specify Body to
jsonand JSON Body to the provided payload (e.g.,"locationQuery": "Toronto"and"searchStringsArray": ["barber"]). - In Pause for Results, set Unit to
minutesand Amount to1. - In Retrieve Apify Dataset, set URL to
enter (get dataset url). - Ensure the execution flow follows: Initiate Apify Run → Pause for Results → Retrieve Apify Dataset.
- Optionally configure Utility: Small Batch Apify Run with URL
copy get run URL from Apifyif you want a separate small-batch run node for testing.
Step 3: Set Up the Data Processing Node
Split dataset records into individual items and include the fields needed for your spreadsheet.
- In Expand Records for Sheets, set Field To Split Out to
title. - Set Include to
selectedOtherFields. - Set Fields To Include to
address, state, neighborhood, phone, emails. - Connect Retrieve Apify Dataset to Expand Records for Sheets.
Step 4: Configure the Google Sheets Output
Append or update lead records into your Google Sheet.
- Add the Append Lead Data to Sheet node and connect it to Expand Records for Sheets.
- Credential Required: Connect your googleSheetsOAuth2Api credentials.
- Set Operation to
appendOrUpdate. - Set Document ID to
[YOUR_ID]and Sheet Name toSheet1(gid=0). - Define the column mappings with the following expressions:
- phone →
{{ $json.phone.replace('+', '') }} - state →
{{ $json.state }} - title →
{{ $json.title }} - emails →
{{ $json.emails }} - address →
{{ $json.address }} - neighborhood →
{{ $json.neighborhood }}
Step 5: Test and Activate Your Workflow
Run a manual test to confirm Apify data is retrieved, expanded, and written to your sheet correctly.
- Click Execute Workflow and run from Manual Launch Trigger.
- Verify that Initiate Apify Run returns a successful response and Pause for Results waits for
1minute. - Check that Retrieve Apify Dataset returns records and Expand Records for Sheets splits them into individual items.
- Confirm new rows appear in your Google Sheet via Append Lead Data to Sheet.
- When satisfied, toggle the workflow to Active to use it in production.
Common Gotchas
- Google Sheets credentials can expire or need specific permissions. If things break, check the connected Google account in n8n’s Credentials and confirm it can edit the target spreadsheet.
- If you’re using Wait nodes or external scraping, processing times vary. Bump up the wait duration if downstream nodes fail on empty responses.
- Apify runs can return slightly different fields depending on your actor settings. If your “Append Lead Data to Sheet” mapping suddenly shifts, check the Apify dataset output first and update your selected fields.
Frequently Asked Questions
About 30 minutes if your Apify token and Google login are ready.
No. You will paste an API token, connect Google Sheets, and edit a couple of search fields.
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 Apify usage, which depends on how many leads you scrape and how often you run it.
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 the main point of the template. Update the Apify request body fields for locationQuery (your city/area) and searchStringsArray (your niche like “restaurants” or “contractors”). If you want different columns in Google Sheets, adjust the field selection in the “Expand Records for Sheets” step so the rows match your sheet headers. You can also change how many leads you pull by editing the lead count in the Apify actor input.
Usually it’s an invalid or expired API token. Regenerate your Apify API token in Settings → Integrations → API tokens, then update the token in the HTTP Request node URL. Also double-check you’re using the correct actor endpoint (the Google Places scraper) and that your request method matches the template. If it still fails, look at the Apify run response for an error message and confirm your account has access to the actor you’re calling.
A lot, but the practical limit is your n8n plan and how big your Apify dataset is. On n8n Cloud, higher tiers handle more executions per month, and large datasets may take longer to process. If you self-host, there’s no execution cap, but your server resources still matter when you expand and append hundreds or thousands of rows. For big pulls, splitting into smaller batches and running per city or per niche tends to stay more reliable.
Often, yes, because Apify runs and dataset handling can require waits, branching, and more control than simple two-step zaps. n8n also gives you a self-hosted option, which is helpful if you’re running lots of lead pulls. Zapier and Make can still work if you only need a lightweight “run scrape → store rows” flow and you don’t care about customizing as much. The tradeoff is flexibility versus simplicity. Talk to an automation expert if you want help choosing what will hold up as volume grows.
Set it up once, then reuse it for every niche and city you target. The workflow handles the repetitive parts so your time goes into outreach and closing.
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.