This workflow automates the discovery, extraction, enrichment, and storage of business information from Google Maps search queries using AI tools, scrapers, and Google Sheets.
It is ideal for:
Trigger
The automation starts via schedule (every hour).
Read Queries from Google Sheet
Loads unprocessed keywords from a Google Sheet tab named keywords
.
Loop Through Keywords
Each keyword is used to search Google Maps for relevant businesses.
Extract URLs
JavaScript parses HTML to find all external website URLs from the search results.
Clean URLs
Filters out irrelevant domains (e.g., Google-owned, example.com, etc.), and removes duplicates.
Loop Through URLs
For each URL:
Checks if it already exists in the Google Sheet (to prevent duplication).
Calls the APIFY Actor to extract full business data.
Optionally uses AI Agent (Gemini) to provide detailed insight on the business, including:
Converts the AI result (text) to a structured JSON object.
Save to Google Sheet
Adds all extracted and AI-enriched business information to a separate tab (Sheet1
).
Mark Queries as Processed
Updates the original row in keywords
to avoid reprocessing.
The following information is saved per business:
If you’d like a custom AI-powered automation like this for your business or agency, feel free to contact me: