Quick overview
This workflow pulls Google Maps business results from SerpApi based on search queries stored in Airtable, visits each business website to extract contact emails, and adds the enriched business records back into Airtable.
How it works
- Runs manually and searches Airtable for Google Maps scrape queries (search term and GPS coordinates).
- Paginates each query (start offsets) and calls SerpApi’s Google Maps Search API to fetch local business results.
- Cleans and deduplicates the SerpApi results, then keeps only businesses that include a website URL.
- Generates a prioritized list of pages to check per website (homepage plus common /contact and /about variations) and requests each page over HTTP with redirects enabled.
- Extracts email addresses from the returned HTML, filters out placeholders and suspicious/system emails, and stops further page checks once a valid email is found (or records a “Website Down”/no-email outcome).
- Merges the extracted email back into the original Google Maps business data, removes unneeded fields, and upserts the final record into Airtable.
Setup
- Add a SerpApi credential and ensure your SerpApi plan supports Google Maps Search API requests.
- Add an Airtable Personal Access Token credential with access to the bases/tables used for “Google Maps Scrape Queries” (input) and “Google Maps Scraping” (output).
- Update the Airtable base/table IDs and the expected fields for the query table (for example, “Search Query” and “GPS Coordinates”).
- Review the Airtable upsert matching field (position) and adjust it if you need a different unique key to prevent unwanted overwrites.