Extract Local Business Contacts with Google Sheets, SerpAPI & GPT‑4o
Status: Ready for Use ✅
Disclaimer: This workflow relies on community nodes that are not part of n8n’s core package.
Install the following from n8n → Community Nodes before running:
- n8n-nodes-langchain
- n8n-nodes-openai (Structured Output Parser)
- n8n-nodes-apify
📝 Description
This n8n workflow automates discovery of local‑business contact details by search term and location, then enriches the results with publicly listed email addresses using GPT‑4o AI.
🔑 Key Features
🔗 Google Sheets Integration
- Reads search terms and locations from a Google Sheet.
- Processes only rows that are not marked
Complete
, preventing duplicates.
🗺️ Google Maps Search via SerpAPI
- Queries Google Maps through SerpAPI for every search‑term‑and‑location pair.
- Retrieves the following fields: business name, website, street address, and phone number.
🧠 Website Scraping & Email Extraction
- Scrapes the business homepage content with Apify’s Fast Website Content Crawler.
- Sends the scraped HTML to a GPT‑4o AI Agent.
- Extracts any publicly listed email address.
- Returns a clean, structured JSON object for downstream use.
💾 Data Storage & Tracking
- Writes every result to a Results tab in the same Google Sheet.
- Marks the corresponding row in the Searches tab as
Complete
once finished.
🧱 Extensible Design
The workflow uses modular sub‑workflows and AI agents.
You can easily extend it to add:
- Phone‑number verification with Twilio
- Social‑media enrichment with Clearbit
- Exports to HubSpot, Salesforce, Airtable, PostgreSQL, or CSV files
📄 Google Sheet Setup
Create a Searches tab with these exact columns (one header row):
Search | Area | Area Name | Complete
Create a results tab with these columns
title | website | address | phone | Search | Search Name | Area | email (Manual Entry)
⚙️ Prerequisites
- Google Cloud Project with Google Sheets API and Google Drive API enabled
- SerpAPI account (free trial or paid) – obtain an API key
- Apify account (free trial or paid) with the Fast Website Content Crawler actor installed
- OpenAI account with an API key that can access GPT‑4o models
🚀 Setup Instructions
-
Copy the Google Sheet
-
Configure Google Sheets nodes in n8n
- Open the workflow.
- Update the nodes Extract Search Terms and Save Emails to Sheet to point at your copied sheet.
- Authenticate using Google OAuth2 credentials that have access to the sheet.
-
Add SerpAPI credentials
- Sign in at <https://serpapi.com>.
- Copy your API key.
- In the Search Google Maps node, create a new credential and paste the key.
-
Set up Apify
- Sign up at <https://apify.com>.
- Add the Fast Website Content Crawler actor to your account.
- In the Scrape Web Page HTTP node, append
?token=YOUR_API_KEY
to the actor URL.
-
Add your OpenAI API key
✅ Running the Workflow
- Click Execute Workflow in n8n.
- For each unprocessed row in the Searches tab, the automation will:
- Retrieve business information from Google Maps via SerpAPI.
- Scrape the business website using Apify.
- Use GPT‑4o to extract a public email address.
- Write all collected data to the Results tab.
- Mark the original row as
Complete
.
🧩 Example Use Cases
- Build highly targeted lead lists for sales and marketing outreach.
- Compile local business directories for regional websites or apps.
- Automate contact‑information collection for lead‑generation campaigns and reduce manual data entry.