N8N

n8n google maps scraper

Businesses sometimes use virtual assistants (VAs) or developers on freelance sites to get company data from Google Maps for things like lead generation, seo research, competitor tracking, and b2b strategy planning. 

In this article, we’ll use the following to make an automated workflow:

  • Apify → To scrape Google Maps data

  • N8N → To orchestrate automation

  • Perplexity & OpenAI → To research leads using AI

  • Google Sheets → To store the results

By the end of this article, you’ll be able to search businesses by location and keyword, scrape their contact info, enrich the data, and organize it into a spreadsheet automatically.

Before we start, if you are looking for help with a n8n project, we are taking on customers. Head over to our n8n Automation Engineer page.

Tools You Need

Before starting, make sure you have accounts for:

Set Up the Google Maps Scraper in Apify

Apify provides a Google Maps Scraper that lets you extract structured business data.

Steps

  1. Go to Apify → Actors and search for Google Maps Scraper.

  2. Open the scraper → Click Try for free.

  3. Configure your search query:

    • Search string → e.g., “Pizza restaurants”

    • Location → e.g., “New York”

    • Max results → e.g., 10

  4. Enable Business Enrichment (optional) to fetch:

    • Website

    • Phone number

    • Email

    • Social media links

  5. Copy the Actor URL and API key → You’ll need these in Amplify.

Build the Workflow in N8N

Trigger Node

Start the workflow with a form submission where you enter:

  • Search query (e.g., restaurants, plumbers, gyms)

  • Location (e.g., Lagos, New York, London)

  • Number of results

 

Here double click on the on form submission node.

This opens up like a pop up.

Run Apify Actor

  • Add a “Run Apify Actor” node.

  • Click “Connect Account” → Paste your Apify API Key.

  • Select the Google Maps Scraper actor.

  • Set Inputs to pull data from the trigger form dynamically:

searchQuery{{$json.query}}

location{{$json.location}}

maxResults{{$json.results}}

  • Click Execute Node → This will trigger the scraper directly from Amplify.

Double click on the Run an Actor node to open the pop up.

Here, we see the pop up open so we can:

  • Click “Connect Account” → Paste your Apify API Key.

  • Select the Google Maps Scraper actor.

  • Set Inputs to pull data from the trigger form dynamically:

searchQuery{{$json.query}}

location{{$json.location}}

maxResults{{$json.results}}

  • Click Execute Node → This will trigger the scraper directly from Amplify.

Get Dataset Items

  • Add a “Get Dataset Items” node.

  • Select the Dataset ID returned by the Apify scraper.

  • Map the fields you want to retrieve:

Business name

Address

Website

Phone

Rating

Social links

Filter and Clean the Data

  • Add a Filter node after the dataset.

  • Set rules:

    • Keep only businesses with rating ≥ 4.0

    • Remove businesses with fewer than 10 reviews

    • Exclude “Permanently Closed” businesses

Double click on the Filter Node to open this pop up

Loop Through Businesses

Add a Loop Node to handle one business at a time.

Connect OpenAI

  • Add OpenAI Node.

  • Paste your API Key.

Prompt example:

Research this business and give me 1–2 insights I can use in an email.
Business: {{$json.name}}
Website: {{$json.website}}

Use Perplexity AI

  • Send business name & website → Fetch recent insights or social presence.

Double clicking on the AI Agent Node opens up this modal.

Export to Google Sheets

we can export to google sheets, excel, csv, e.t.c

  • Add a Google Sheets → Append Row node.

  • Connect your Google Account.

  • Map fields:

Business Name

Address

Phone

Email

Website

Rating

Social Links

AI Insights

Example Output

Business NameAddressPhoneWebsiteRatingInstagramAI Insights
East Coast PizzaNew Haven, CT123-456eastpizza.com4.8@eastpizzaKnown for thin-crust New York style
Fire & Slice PizzaBoston, MA987-654firepizza.com4.5@firepizzaRecently expanded to 3 locations

Final Thoughts

Thank you for reading this article. Make sure to check out our other n8n content on the website. If you need any help with n8n workflows we are taking on customers so reach out!

Leave a Reply

Your email address will not be published. Required fields are marked *