portfolio/17051-generate-and-score-google-maps-leads-with-gemini-apify-and-google-sheets
verified template|187 views
Lead GenerationAI Chatbot9 nodes

Generate and score Google Maps leads with Gemini, Apify, and Google Sheets

Quick overview Youtube Video:https://youtu.be/NGruDecKxAg?si=ot9pj6IN4IoLstow

Integrated Nodes & Architecture (9)
[—]Workflow Documentation & Overview

Quick overview

Youtube Video:https://youtu.be/NGruDecKxAg?si=ot9pj6IN4IoLstow

This workflow takes a chat-based search request, scrapes matching businesses from Google Maps using Apify, scores and ranks them with Google Gemini, deduplicates against an existing Google Sheet by placeId, saves new leads to the sheet, and returns a formatted results message to the chat.

How it works

  1. Receives a message from an n8n chat trigger containing the user’s Google Maps lead search request.
  2. Sends the request to Google Gemini to extract structured search parameters (business type, location, max results, and output mode).
  3. Calls an Apify Google Maps scraping actor with the extracted parameters and selects a clean set of lead fields from the results.
  4. Removes duplicate businesses based on Google Maps placeId and batches the remaining leads into a single list.
  5. Sends the lead list to Google Gemini to add a 0–100 score and short reason to each lead and returns them sorted by score.
  6. Checks the scored leads against existing rows in Google Sheets and filters out any placeId values that are already saved.
  7. Appends or updates the new leads in Google Sheets and returns a formatted ranked lead list back to the chat.

Setup

  1. Set up Google Gemini (Google PaLM) credentials for the two HTTP requests that parse intent and score/rank leads.
  2. Add an Apify API token as an HTTP Header Auth credential and confirm the Apify actor endpoint used to scrape Google Maps.
  3. Connect a Google Sheets service account, and update the spreadsheet ID, sheet/tab, and column headers (including placeId) used to read and upsert leads.
  4. Enable the chat trigger and copy/configure the chat webhook/channel details for wherever you send user messages from.

production deployment

Need this workflow deployed or tailored for your business?

I customize n8n pipelines, build proprietary API nodes, and connect production databases with sub-100ms reliability.

creator

V

iamvaar

Top 50 Verified Creator

AI Automation Engineer building production-grade n8n systems, custom nodes, and LLM pipelines.

n8n.io/creators/iamvaar

specs

Template ID:#17051
Total Nodes:9
Community Views:187
Difficulty:intermediate
License:Free / Open

Want this workflow running in your stack?

Book a free 30-minute session. I'll inspect your current infrastructure, review required API credentials, and map out the deployment.