πΊοΈ Google Maps AI Agent
π₯ Developed by xCodeWraith
A conversational AI agent that extracts, enriches, and organizes business leads from Google Maps using natural language.
Simply chat with the AI: "Find 100 dental clinics in Los Angeles" and watch it automatically scrape, enrich, and organize the data into Google Sheets.
π Table of Contents
π― Overview
Google Maps AI Agent is an intelligent conversational system that transforms Google Maps into a powerful B2B lead generation tool. Instead of manually searching and copying business data, simply chat with an AI agent that understands your requirements and automates the entire process.
What Makes This System Special?
- π€ Natural Language Interface - Chat naturally as if speaking to a human assistant
- π§ AI-Powered Understanding - GPT-4o intelligently interprets your requests
- π Automatic Enrichment - Automatically finds emails and company backgrounds
- π Smart Organization - Structures data perfectly in Google Sheets
- β‘ Real-Time Processing - Watch leads populate as you chat
Who Is This For?
| Target Audience |
Use Case |
| πΌ Sales Teams |
Targeted lead lists by location and niche |
| π Cold Callers |
Get phone numbers and business info instantly |
| π§ Email Marketers |
Contact info with email enrichment |
| π’ B2B Agencies |
Local business research for clients |
| π Entrepreneurs |
Find potential clients or partners |
β¨ Key Features
π£οΈ Conversational Interface
- Natural language input: "Find 50 restaurants in NYC"
- No complex forms or parameters
- AI understands context and intent
- Multi-turn conversations
π Intelligent Google Maps Scraping
- Search via Serper.dev Google Maps API
- Automatically handles pagination
- Extracts comprehensive business data
- Geo-targeting with coordinates
π§ Automated Email Enrichment
- Perplexity AI finds company emails
- Automatic web scraping from websites
- Background research for every business
- Real-time updates to Google Sheets
π Two-Stage Workflow
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β STAGE 1: DATA COLLECTION β
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ€
β Chat Trigger β AI Agent β Serper API β Sub-Workflow β
β β β
β Google Sheets Save β
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β STAGE 2: ENRICHMENT β
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ€
β Sheets Trigger β Perplexity AI β Email & Background β
β β β
β Sheets Update β
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
π How It Works
User Experience
You: "Extract info for 100 dental clinics in Los Angeles"
AI Agent: "I'll search for dental clinics in Los Angeles. Starting now..."
[Google Maps search]
[Finds 100+ results across multiple pages]
[Automatically saves to Google Sheets]
AI Agent: "β
Found and saved 97 dental clinics to your sheet!"
[Background process starts automatically]
[Enriches each lead with email and background]
[Updates the sheet with enriched data]
π οΈ Tech Stack
| Category |
Technology |
Purpose |
| Automation |
n8n |
Workflow orchestration |
| AI Agent |
OpenAI GPT-4o |
Natural language understanding & task execution |
| AI Memory |
Buffer Window |
Conversation context retention |
| Map Search |
Serper.dev |
Google Maps API for business data |
| Enrichment |
Perplexity AI (Sonar) |
Email discovery & company research |
| Storage |
Google Sheets |
Lead database |
π¦ Requirements
Required Accounts & API Keys
| Service |
Required? |
Purpose |
Cost |
| n8n |
β
Yes |
Run workflows |
Free (self-hosted) or $20/mo |
| OpenAI |
β
Yes |
GPT-4o AI agent |
~$0.01-0.03 per request |
| Serper.dev |
β
Yes |
Google Maps search |
$50/mo for 5,000 searches |
| Perplexity AI |
β
Yes |
Email enrichment |
$20/mo or pay-per-use |
| Google Account |
β
Yes |
Google Sheets storage |
Free |
π Installation
β οΈ IMPORTANT: This system consists of 2 separate workflows. Both must be imported separately and linked together!
π¦ Workflow Files
| File |
Type |
Description |
Google map ai agent.json |
Main Workflow |
Chat interface and AI agent |
Gooogle map lead ai agent.json |
Sub-Workflow |
Data saving and UUID generation |
Step 1: FIRST Import the Sub-Workflow
π΄ ORDER MATTERS! The sub-workflow MUST be imported first!
- Open n8n
- Click "Workflows" β "Import from File"
- Select
Gooogle map lead ai agent.json
- Click "Import"
- β
Once imported, note down the workflow ID:
- Visible in URL:
https://your-n8n.com/workflow/WORKFLOW_ID
Step 2: Import the Main Workflow
- Click "Workflows" β "Import from File"
- Select
Google map ai agent.json
- Click "Import"
Step 3: Link the Two Workflows
π The main workflow must be linked to call the sub-workflow!
- Open the main workflow
- Find the "Call n8n Workflow Tool" node
- Click on the node
- In the "Workflow" field:
- Select "π₯ xCodeWraith - Google Maps Lead Sub-Workflow" from the dropdown
Step 4: Create Google Sheet
- Go to https://sheets.google.com/
- Create a new spreadsheet named: "Leads Google map ai agent"
- Create headers in row 1:
UUID | Name | Address | Number | Website | Rating | Opening Hours | Email | Background
Step 5: Update Google Sheets Nodes
Update Google Sheets nodes in both workflows:
In Main Workflow:
Google Sheets Trigger node β Select your Spreadsheet ID
Google Sheets (update) node β Select your Spreadsheet ID
In Sub-Workflow:
Append row in sheet node β Select your Spreadsheet ID
Step 6: Activate Workflows
- Open the Main workflow β Toggle "Active" (green)
- The Sub-workflow can remain inactive (it is called automatically by the main one)
- Click the "When chat message received" node in the Main workflow
- Copy the "Production URL"
- Open this URL in a browser to access the chat interface!
βοΈ Configuration
1. OpenAI API Key
Node: "OpenAI Chat Model"
- Get API key from https://platform.openai.com/api-keys
- In n8n: Settings β Credentials
- Add "OpenAi account" credential
- Paste your API key
2. Serper.dev API Key
Node: "Map Search Tool"
- Sign up at https://serper.dev/
- Get API key from dashboard
- Find the Headers section in the node
- Update
X-API-KEY value with your key
3. Perplexity API Key
Node: "Message a model1"
- Get API key from https://www.perplexity.ai/settings/api
- In n8n: Settings β Credentials
- Add "Perplexity account" credential
4. Google Sheets OAuth
- In n8n: Settings β Credentials
- Add "Google Sheets OAuth2 API"
- Follow the OAuth flow
π Usage Examples
Example 1: Simple Search
You: "Find 50 coffee shops in Seattle"
AI: β
Found and saved 47 coffee shops!
Example 2: Specific Niche
You: "Extract info for 100 dental clinics in Los Angeles"
AI: Searching for dental clinics in Los Angeles...
100 results = 5 pages to scan
β
97 dental clinics saved!
π Data Fields
| Field |
Description |
Source |
| UUID |
Unique identifier |
Auto-generated |
| Name |
Business name |
Google Maps |
| Address |
Full address |
Google Maps |
| Number |
Phone number |
Google Maps |
| Website |
Company website |
Google Maps |
| Rating |
Google rating |
Google Maps |
| Opening Hours |
Operating hours |
Google Maps |
| Email |
Contact email |
Perplexity AI |
| Background |
Company description |
Perplexity AI |
π Troubleshooting
| Issue |
Solution |
| Chat interface not loading |
Verify Main workflow is Active |
| No results from map search |
Check Serper.dev API key |
| Data not saving to Sheets |
Verify Google Sheets credentials |
| Sub-workflow not running |
Check workflow connection link |
π Performance Metrics
| Metric |
Value |
| Search Speed |
20 results per page in 2 seconds |
| Scraping |
~100 leads in 1 minute |
| Enrichment |
~60 leads in 5-10 minutes |
| Accuracy |
90%+ data accuracy |
| Daily Capacity |
5,000-10,000 leads |
π License
This project is licensed under the MIT License.
β
Commercial use allowed
β
Modification allowed
β
Distribution allowed
β
Private use allowed
β οΈ No warranty or liability
π₯ Made with β€οΈ by xCodeWraith
β Star this repo if it helps you generate leads!
Ready to generate thousands of leads? Start chatting with your AI agent now! πΊοΈ