Google Maps Lead Scraping with Apify & Anymailfinder
Backrun helps businesses automate their backend — from lead generation to support, integrations, and operations — so you can focus on growth, not grunt work.

Automated Lead Generation
Are you looking for a reliable source of local business leads? Stop wasting time manually searching for potential customers. This comprehensive workflow leverages the power of Apify and Anymailfinder to automatically scrape Google Maps, enrich leads with email addresses, and organize everything in NocoDB. This automates lead generation, freeing up your time for more strategic activities.
Workflow Overview
This powerful workflow automates the process of finding leads from Google Maps. It’s designed to be a straightforward solution for sales teams, marketing agencies, business developers, and freelancers alike.
- Automated Scraping: Kicks off a Google Maps search based on your query, city, and radius. This significantly reduces the time spent on manual lead research.
- Email Enrichment: For businesses with a website, it automatically finds the corresponding email address. This dramatically increases the value of each lead.
- Data Cleaning: Cleans website URLs to extract the root domain, preventing issues and ensuring data consistency. This avoids common errors and saves you time on manual cleaning.
- Duplicate Prevention: Checks against existing entries in NocoDB using the `placeId` to avoid redundant data entries. This is crucial for maintaining a clean and accurate lead database.
- Structured Storage: Saves enriched lead data into a structured NocoDB database for easy access and management. Structured data simplifies analysis and reporting.
- Batch Processing: Efficiently handles and loops through all scraped results, maximizing productivity. Efficient batch processing accelerates lead generation.
Who is it For?
This workflow is a game-changer for several types of professionals and businesses:
- Sales Teams: Provides a consistent and reliable source of qualified local business leads.
- Marketing Agencies: Simplifies outreach campaigns for local clients, generating valuable prospect lists. Consider integrating with our AI-powered chatbots for automated follow-up!
- Business Developers: A streamlined way to prospect for new partnerships and business opportunities in targeted geographic areas.
- Freelancers: Helps find potential clients in specific areas, boosting your local client base.
How it Works
Here’s a breakdown of how the workflow operates:
- Trigger: The workflow starts when you submit the initial form with a search query (e.g., “restaurants in San Francisco”).
- Scrape Google Maps: It sends the query to Apify, a web scraping framework, to retrieve relevant business listings.
- Process Leads: The workflow loops through each result one by one.
- Clean Data: It extracts the main website domain from the URL provided by Google Maps.
- Check for Duplicates: It queries your NocoDB database to see if the business already exists, using the unique `placeId`.
- Find Emails: If a valid website domain exists, it uses Anymailfinder, an email verification service, to find potential email addresses.
- Store Lead: The final data (business name, address, phone number, email address, etc.) is stored in a structured NocoDB database.
Setup Requirements
Before you can use this workflow, you’ll need the following:
- Apify API Key: https://www.apify.com?fpr=g5q0f. This is required to access the Google Maps API.
- Anymailfinder API Key: https://anymailfinder.com?via=alexandra. This is crucial for email verification.
- NocoDB API Token: To connect to your NocoDB database for storing and managing the scraped leads. You’ll need to create a database and obtain its API token. For more information on NocoDB, visit them at [https://www.nocodb.com/](https://www.nocodb.com/).
Database Structure
Your NocoDB database should have the following table structure:
- title (SingleLineText): Business Name
- website (Url): Business Website URL
- phone (PhoneNumber): Business Phone Number
- email (Email): Business Email Address
- email_validation (SingleLineText): Status of Email Validation (e.g., Valid, Invalid)
- address (LongText): Business Address
- neighborhood (SingleLineText): Neighborhood
- rating (Number): Business Rating
- categories (LongText): Business Categories
- city (SingleLineText): City
- country (SingleLineText): Country
- postal code (SingleLineText): Postal Code
- domain (Url): Business Domain
- placeId (SingleLineText): Google Places ID – *Important for duplicate checking*.
- date (Date): Date of Scraping
Customization Options
Tailor this workflow to your specific needs by utilizing these customization options:
- Change Trigger: Replace the manual Form Trigger with a Schedule Trigger to automate lead generation on a recurring basis.
- Modify Scraper Parameters: In the “Scrape Google Maps” node, you can adjust parameters like the search radius, number of results, and location to refine your results.
- Use a Different Database: Replace the NocoDB nodes with nodes for Google Sheets or other databases if you prefer.
Installation Instructions
- Import the workflow into your n8n instance.
- Create the required table structure in your NocoDB instance as detailed above.
- Configure the credentials for Apify (https://www.apify.com?fpr=g5q0f) and Anymailfinder (https://anymailfinder.com?via=alexandra) in the n8n workflow.
- In the two NocoDB nodes (“Get all the recorded placeIds” and “Create a new record”), configure the API token for your NocoDB instance.
- Activate the workflow.
You can now run the workflow by filling out the form in the n8n interface. This will trigger the Google Maps scraping and automatically populate your NocoDB database with enriched lead information.
Need help with more automated workflows? Explore our Backrun blog for more ideas and insights. Or, learn more about our AI-powered solutions.
Learn more about Backrun or contact us at hello@backrun.us.