Scrape business leads from Google Maps using OpenAI and Google Sheets
Needs changesWhat this workflow does
This AI workflow has 14 nodes and runs when a chat message arrives (plus 1 other trigger). Along the way it connects OpenAI Chat Model, SerpApi (Google Search) and Google Sheets. It also calls api.apify.com over HTTP.
How it runs
Trigger: When a chat message arrives (plus 1 other trigger).
- AI Agent: runs an AI agent, with model: GPT-4o - Generate & Process Requests; 3 tools (Tool - Crawl Business Website, Fallback - Enrich with Google Search, Tool - Scrape Google Maps Business Data); memory: Memory - Track Recent Context
- Scrape Google Maps (via Apify) (HTTP Request): calls api.apify.com (POST)
- Save Extracted Data to Google Sheets (Google Sheets): append
- Aggregate: combines items into one
- Scrape Website Content (via Apify) (HTTP Request): calls api.apify.com (POST)
- Save Website Data to Google Sheets (Google Sheets): append
- Aggregate: combines items into one
Services it uses
HTTP calls to: api.apify.com
Before you upgrade to n8n 3.0
2 things in this workflow are removed in n8n 3.0. Fix them before you upgrade:
- AI Agent v1 (old agent modes) in AI Agent - Lead Collection (v1.8): replace with Latest AI Agent node (Tools Agent). For SQL Agent, use a Postgres or MySQL tool with a recent AI Agent.
- SerpApi (Google Search) in Fallback - Enrich with Google Search: no direct replacement: call the SerpApi REST API with an HTTP Request tool, or use a verified community node.
| Removed in 3.0 | Replace with |
|---|---|
| AI Agent v1 (old agent modes) AI Agent - Lead Collection (v1.8) | Latest AI Agent node (Tools Agent). For SQL Agent, use a Postgres or MySQL tool with a recent AI Agent. |
| SerpApi (Google Search) Fallback - Enrich with Google Search | No direct replacement: call the SerpApi REST API with an HTTP Request tool, or use a verified community node |
Nodes used (10)
- Chat Trigger
@n8n/n8n-nodes-langchain.chatTrigger - AI Agent
@n8n/n8n-nodes-langchain.agent - OpenAI Chat Model
@n8n/n8n-nodes-langchain.lmChatOpenAi - Simple Memory
@n8n/n8n-nodes-langchain.memoryBufferWindow - Call n8n Workflow Tool
@n8n/n8n-nodes-langchain.toolWorkflow - SerpApi (Google Search)
@n8n/n8n-nodes-langchain.toolSerpApi - Execute Workflow Trigger
n8n-nodes-base.executeWorkflowTrigger - HTTP Request
n8n-nodes-base.httpRequest - Google Sheets
n8n-nodes-base.googleSheets - Aggregate
n8n-nodes-base.aggregate
From the author
Google Maps Data Extraction Workflow for Lead Generation This workflow is ideal for sales teams, marketers, entrepreneurs, and researchers looking to efficiently gather detailed business information from Google Maps for: - Lead generation - Market analysis -…