Quick overview
This workflow runs on demand to scrape Google Maps business leads with Apify, optionally fetches each business website to extract an email address, and appends the enriched lead data to a Google Sheets spreadsheet.
How it works
- Starts manually and loads the Apify API key, Google Maps search query, max results, and target Google Sheets spreadsheet ID.
- Launches the Apify Google Places scraper run for the provided search query and stores the returned run ID and dataset ID.
- Polls Apify until the actor run status is SUCCEEDED, waiting and retrying until results are ready.
- Downloads the scraped business items from the Apify dataset and processes them one business at a time.
- If a business has a website, requests the site HTML and extracts the first valid email address found; otherwise it keeps the email blank.
- Appends each enriched lead (name, email, phone, rating, address, review count, and website) as a new row in Google Sheets.
Setup
- Add your Apify API token and replace the placeholder value in the configuration step.
- Connect Google Sheets credentials in n8n and set the target spreadsheet ID (and sheet name if not Sheet1).
- Update the Google Maps search query and max results in the configuration step to match your lead list criteria.