WorkflowGoogle CloudOpen

Google Maps API n8n lead generation to Google Sheets

This n8n workflow finds local business leads with the Google Maps API and stores them in Google Sheets. It suits agencies and sales teams that prospect by business type and area and want new leads added to a sheet every hour without manual searching.

What it does

It reads the subcategories and zip codes you set in the sheet, calls the Google Maps API, removes duplicates and filters the results, then adds rows and marks each search as done. A retry check stops the run with an error after too many failed attempts.

How to use it

In the Google Sheets document set the subcategories to search, paste the document URL into the workflow and set the zip code sheet name.

Requirements and limits

Requires a Google Cloud account with the Google Maps API enabled.

More in Google Cloud and the n8n workflow library.

Full text

Front matter
name: Generate Leads with Google Maps - AlexK1919
description: Triggered on a schedule. Connects Code, Condition, Filter, Google Sheets, HTTP request, Limit, Loop, Remove Duplicates. # AlexK1919 ![Alex Kim]({{ $env.WEBHOOK_URL }} #### I’m Alex Kim, an AI-Native Workflow Automation Architect Building Solutions to Optimize your Personal and Professional Life. ### About Me {{ $env.WEBHOOK_URL }} ### Products Used [Google Maps API via Google Cloud Account]({{ $env.WEBHOOK_URL }} # Settings In the Google Sheets document, set the subcategories you'd like to search for Set the URL of your Google Sheets document Set the Zip Code sheet name # Triggers # Google Maps API # Da
category: Automation
kind: Workflow
software: Code|Condition|Filter|Google Sheets|HTTP request|Limit|Loop|Remove Duplicates|Schedule|Split Out|Stop And Error|Wait

Generate Leads with Google Maps - AlexK1919

Triggered on a schedule. Connects Code, Condition, Filter, Google Sheets, HTTP request, Limit, Loop, Remove Duplicates. # AlexK1919 ![Alex Kim]({{ $env.WEBHOOK_URL }}

I’m Alex Kim, an AI-Native Workflow Automation Architect Building Solutions to Optimize your Personal and Professional Life.

About Me

{{ $env.WEBHOOK_URL }}

Products Used

[Google Maps API via Google Cloud Account]({{ $env.WEBHOOK_URL }} # Settings In the Google Sheets document, set the subcategories you'd like to search for

Set the URL of your Google Sheets document

Set the Zip Code sheet name # Triggers # Google Maps API # Da

Steps

  • When clicking "Execute Workflow" (manualTrigger)
  • Run workflow every hours (scheduleTrigger)
  • Execute Workflow Trigger (executeWorkflowTrigger)
  • Check Max Retries1 (if)
  • Stop and Error1 (stopAndError)
  • GMaps API (httpRequest)
  • Update Status to Success (googleSheets)
  • Add rows in Google Sheets (googleSheets)
  • Set Row Number (set)
  • Set Zip (set)
  • Set Place ID (set)
  • Exponential Backoff (code)
  • Remove Duplicates (removeDuplicates)
  • Wait (wait)
  • Check Max Retries (if)
  • Stop and Error (stopAndError)
  • Exponential Backoff1 (code)
  • Wait1 (wait)
  • Settings (set)
  • GS - Get Subcategory (googleSheets)
  • Subcategory (set)
  • GS - Get Zip Codes (googleSheets)
  • Place Array (code)
  • Loop Zips (splitInBatches)
  • Loop Subcats (splitInBatches)
  • GS - Get Status (googleSheets)
  • Check Max Retries2 (if)
  • Stop and Error2 (stopAndError)
  • Exponential Backoff2 (code)
  • Wait2 (wait)
  • Limit (limit)
  • Sticky Note20 (stickyNote)
  • Sticky Note8 (stickyNote)
  • Sticky Note15 (stickyNote)
  • Sticky Note (stickyNote)
  • Zips (set)
  • Sticky Note1 (stickyNote)
  • Filter Zips (filter)
  • Filter Subcategories (filter)
  • If Empty (if)

Import

Download the JSON from the GitHub source and import it in n8n (Workflows, Import from file).

Source and license

Source: https://github.com/Zie619/n8n-workflows/blob/main/Stopanderror/1823_Stopanderror_Wait_Create_Webhook.md

Author: Zie619, n8n workflow collection. License: MIT.

Shown here with formatting for the web. Keep the author and license notice when you reuse it.

Related entries

There are more like this in the members library

The n8n workflow library holds 1,814 entries. Members can search all of them by meaning and read every one in full.