Google Maps Lead Generation to Google Sheets via Apify - n8n Workflow

Use this powerful n8n workflow to automate lead generation. Scrape Google Maps business data using an Apify n8n node and append results directly to Google Sheets.

Workflow Preview

Ready to automate?

Download this n8n workflow template and start using it instantly.

Who is this best for?

This is one of the most useful n8n templates for:

Sales and Marketing Teams: Automating local lead lists based on geographical and business type searches.
Solo Entrepreneurs: Quickly building targeted prospect lists without manual data entry.


  • Data Engineers: Users looking for reliable web scraping n8n workflow examples that integrate external APIs (like Apify) and database actions (Google Sheets).

Overview

Manually collecting business data from Google Maps is time-consuming and error-prone. This specialized n8n workflow solves this by completely automating the process. By integrating the power of an Apify Google Maps Scraper actor with n8n, you can initiate a search for local businesses (e.g., 'restaurants in North Holland') and have the results automatically formatted and delivered directly into a designated Google Sheet.

This robust n8n workflow not only extracts details like name, address, and website but also includes custom JavaScript logic within the Google Sheets n8n node to clean and reformat phone numbers (e.g., converting '+31' prefixes to '0') before storage. This ensures high data quality for immediate outreach efforts.

How it Works

This automation uses a five-step sequence, starting with an n8n trigger and culminating in a structured data entry into Google Sheets:


  1. Start: The process begins with a Manual Trigger (Start workflow). While this specific n8n trigger is manual, you could easily swap it for a Schedule node to run searches daily or weekly.

  2. Run Scraper: The Apify 'Run task' n8n node initiates the configured Google Maps Scraper actor task. This node is configured to wait a short period to ensure the scraping process completes.

  3. Get Run Details: The 'Get last run' Apify n8n node retrieves the metadata of the recent scraping job, crucially obtaining the ID of the resulting dataset.

  4. Fetch Data: The 'Get dataset items' Apify n8n node uses the dynamically retrieved defaultDatasetId to download all the structured lead data generated by the scraper.

  5. Append to Sheet: Finally, the Google Sheets 'Append row in sheet' n8n node maps the extracted fields (Title, Street, City, Website, Phone, Postcode) to specific columns in your designated spreadsheet, applying custom transformation logic to clean the phone numbers before saving.

Installation Guide

To deploy this n8n workflow, follow these setup steps:


  1. Import the n8n Workflow: Copy the provided JSON data and import it directly into your n8n instance.

  2. Apify Credentials: You will need to configure your Apify credentials. The Apify n8n nodes require an API key to communicate with the platform.

  3. Google Sheets Credentials: Create a new Google Sheets credential connection and link your Google account to allow n8n access to read and write data.

  4. Apify Task Configuration: Before running, configure the 'Run task' n8n node by replacing ={{YOURAPIFYTASKID}} with the ID of your pre-configured Google Maps Scraper task on Apify.

  5. Google Sheets Setup: Update the 'Append row in sheet' n8n node. Replace the placeholders ={{YOURSPREADSHEETID}} and ={{YOURTAB_NAME}} with the actual ID of your target spreadsheet and the tab name where the leads will be inserted.

  6. Activate and Run: Save the n8n workflow, set it to active, and test the manual n8n trigger.

Node Details

Start workflow (n8n trigger)
Function: Serves as the initiation point for this n8n workflow. It is manually executed.
Key Configuration: None (Manual trigger).

Run task (Apify n8n node)
Function: Executes the specific Google Maps Scraper Actor Task previously set up in Apify.
Key Configuration: Requires ={{YOURAPIFYTASKID}} to be set. Includes a built-in wait time (waitForFinish: 10) to handle actor execution.

Get last run (Apify n8n node)
Function: Retrieves the run details using {{YOUR
ACTORID}}. This is crucial for passing the defaultDatasetId to the next step, linking the run execution to the generated data.

Get dataset items (Apify n8n node)
Function: Fetches the actual scraped data records from the dataset generated by the Apify run.
Key Configuration: Uses an expression ={{ $json.defaultDatasetId }} to dynamically pull the correct dataset based on the previous Apify n8n node's output.

Append row in sheet (Google Sheets n8n node)
Function: Takes the array of scraped items and appends them row by row to the configured Google Sheet.
Key Configuration: Requires ={{YOUR
SPREADSHEETID}} and ={{YOURTAB_NAME}}. Includes complex JavaScript mapping for the 'Phone' column to standardize local phone number formats (e.g., converting '+31' to '0').

Related n8n Workflows

Free

Nodes: 5 Nodes
Updated: December 26 2025
View all
Created by

Vind hier al onze templates om tijd te besparen dankzij onze slimme automatiseringen. Meer informatie nodig? mail gerust naar [email protected]

Featured*