Extract marketing agency emails from Google Maps with GPT-4o-mini and Google Sheets
Ready for 3.0What this workflow does
This AI workflow has 15 nodes and runs manually, when you click “Execute workflow”. Along the way it connects OpenAI Chat Model and Google Sheets.
How it runs
Trigger: Manually, when you click “Execute workflow”.
- Set search parameters (Edit Fields (Set)): sets 6 fields: businessType, city, maxSearchQueries…
- Generate neighborhood search queries (Basic LLM Chain): sends a prompt to an LLM, with model: OpenAI Chat Model; output parser: Parse query list
- Split queries into items (Split Out): splits a list into separate items
- Limit: keeps the first few items
- Search Google Maps (HTTP Request): calls an HTTP API
- Extract business websites (Code): runs custom JavaScript code
- Limit: keeps the first few items
- Fetch business website (HTTP Request): calls an HTTP API
- Extract email addresses (Code): runs custom JavaScript code
- Keep sites with emails (Filter): keeps only the items that match a condition
…plus 2 more steps. See the full node list below.
Services it uses
Other OpenAI + Google Sheets templates (2,011)
Before you upgrade to n8n 3.0
Nothing in this workflow is removed in n8n 3.0, so it should import and run after the upgrade.
- Code node: the task timeout drops from 300s to 60s. Test with a realistic data volume.
Nodes used (11)
- Manual Trigger
n8n-nodes-base.manualTrigger - Edit Fields (Set)
n8n-nodes-base.set - Basic LLM Chain
@n8n/n8n-nodes-langchain.chainLlm - OpenAI Chat Model
@n8n/n8n-nodes-langchain.lmChatOpenAi - Structured Output Parser
@n8n/n8n-nodes-langchain.outputParserStructured - Split Out
n8n-nodes-base.splitOut - Limit
n8n-nodes-base.limit - HTTP Request
n8n-nodes-base.httpRequest - Code
n8n-nodes-base.code - Filter
n8n-nodes-base.filter - Google Sheets
n8n-nodes-base.googleSheets
From the author
Quick overview This workflow programmatically generates exhaustive Google Maps search queries for a business type and city using OpenAI, scrapes Google Maps search results to collect business websites, visits each site, extracts unique emails, and appends…