🔓 Unlock all 10,000+ workflows & prompts free Join Newsletter →
✅ Full access unlocked — explore all 10,000 AI workflow and prompt templates Browse Templates →
Home n8n Workflow
January 22, 2026

Google Maps to NocoDB, clean leads with Apify

Lisa Granqvist Partner Workflow Automation Expert

Copying Google Maps leads into a spreadsheet sounds simple until you do it for an hour and realize half the rows are junk, duplicates, or missing the one thing you need: a real way to contact them.

This Maps lead cleaning automation hits sales teams first. But marketing agencies building local lists and operators doing their own outreach feel it too. The goal is straightforward: a deduplicated NocoDB table you can actually send campaigns from.

You’ll see how this workflow scrapes Google Maps with Apify, cleans and filters websites, enriches emails via Anymailfinder, and stores only net-new leads using placeId as the “no duplicates” key.

How This Automation Works

The full n8n workflow, from trigger to final output:

n8n Workflow Template: Google Maps to NocoDB, clean leads with Apify

The Problem: Google Maps leads are messy (and repetitive)

Google Maps is great for finding local businesses. It’s not great as a lead database. You export or copy results, then realize “website” links are sometimes Facebook pages, sometimes tracking URLs, and sometimes missing altogether. Then duplicates creep in because the same business shows up across searches, categories, or nearby neighborhoods. And email enrichment? That becomes a separate chore, with a separate tool, and a separate set of errors you only notice after you’ve already sent outreach.

The friction compounds. Here’s where it usually breaks down in real life.

  • You spend about 2 hours a week reformatting websites into usable domains for enrichment tools.
  • The same place gets imported multiple times, so your “lead count” looks bigger than it is.
  • Social links sneak in as “websites,” which means email finding fails or returns irrelevant results.
  • Outreach lists go stale fast because there’s no reliable process to rerun searches without creating duplicates.

The Solution: Scrape, clean, dedupe, enrich, then store in NocoDB

This workflow turns Google Maps searching into a repeatable system you can run whenever you need fresh leads. It starts with a simple form in n8n where you enter a business type (like “plumber”), a city, a country code, and how many results you want. n8n sends that request to Apify to scrape matching Google Maps listings, then processes results in batches so you’re not trying to handle everything at once. As each lead comes through, the workflow cleans the website field to extract a real root domain, skips obvious non-business sites, and checks your NocoDB table for an existing placeId before saving anything. If a lead has a valid domain, it calls Anymailfinder to fetch professional emails and saves the enriched record to NocoDB.

The workflow starts with a form submission and an Apify scrape. It then cleans website data, prevents duplicates using placeId, and enriches emails only when there’s a usable domain. Finally, it inserts a structured row in NocoDB so your outreach list stays consistent over time.

What You Get: Automation vs. Results

Example: What This Looks Like

Say you build a weekly list of 100 local businesses across 4 searches (different neighborhoods or categories). Manually, you might spend about 2 minutes per lead copying details, cleaning URLs, and checking if you already have them, which is roughly 3 hours. With this workflow, you submit the form once, let Apify pull the results, and n8n handles dedupe plus enrichment in the background. Realistically you’ll spend maybe 10 minutes reviewing the final table, not rebuilding it from scratch.

What You’ll Need

  • n8n instance (try n8n Cloud free)
  • Self-hosting option if you prefer (Hostinger works well)
  • Apify for scraping Google Maps search results
  • Anymailfinder to find and validate business emails
  • NocoDB API token (get it from your NocoDB account settings)

Skill level: Intermediate. You’ll be connecting APIs, matching table fields, and checking a few filters to fit your niche.

Don’t want to set this up yourself? Talk to an automation expert (free 15-minute consultation).

How It Works

Form submission kicks everything off. You enter the business type, city, country code, and the number of results you want. It’s the fastest way to run one-off searches without building extra infrastructure.

Apify scrapes Google Maps. n8n sends your search to an Apify actor and receives a batch of listings back (name, phone, address, website, rating, categories, and the placeId that matters for dedupe).

The workflow cleans, filters, and enriches. Website URLs are sanitized to extract the root domain, and obvious non-domains get filtered out. If there’s a good domain, Anymailfinder is called to retrieve professional emails and validation details, which means you’re not guessing.

NocoDB becomes the source of truth. Before inserting a row, the workflow checks stored placeIds and skips anything you already have. New leads get stored with consistent fields, so you can sort, tag, and export for outreach whenever you’re ready.

You can easily modify the trigger to run on a schedule instead of a manual form based on your needs. See the full implementation guide below for customization options.

Step-by-Step Implementation Guide

Step 1: Configure the Form Trigger

Set up the incoming form so your workflow can collect search parameters for local business discovery.

  1. Add or open Form Input Trigger.
  2. Set Form Title to Local Biz Search.
  3. Under Form Fields, create the labels query (required), city (required), country code, and number.
  4. Save the form and note the generated form URL for testing.

Tip: Ensure field labels match exactly (query, city, country code, number) so downstream expressions resolve correctly.

Step 2: Connect the Scraping and Email Services

Configure the two HTTP services that scrape Google Places data and enrich records with email leads.

  1. Open Map Search Scraper and set URL to https://api.apify.com/v2/acts/compass~crawler-google-places/run-sync-get-dataset-items.
  2. Set Method to POST, Send Body to true, and Body Content Type to json.
  3. In JSON Body, use the provided expression: ={ "city": "{{ $json.city }}", "countryCode": "{{ $json['country code'] }}", "locationQuery": "{{ $json.city }}", "maxCrawledPlacesPerSearch":{{ $json.number ? $json.number : 99999 }}, "searchStringsArray": [ "{{ $json.query }}" ], "skipClosedPlaces": true }.
  4. Credential Required: Connect your httpQueryAuth credentials in Map Search Scraper.
  5. Open Retrieve Email Leads, set URL to https://api.anymailfinder.com/v5.1/find-email/company, and keep Method as POST.
  6. In Body Parameters, set domain to ={{ $json.domain}}.
  7. Credential Required: Connect your httpHeaderAuth credentials in Retrieve Email Leads.

⚠️ Common Pitfall: If Map Search Scraper returns no items, verify your Apify credentials and the searchStringsArray value is correctly populated from the form input.

Step 3: Map, Batch, and Sanitize Scraped Data

Prepare the scraped place data, clean website domains, and remove already-stored records before enrichment.

  1. Open Batch Through Results and keep default options to process items in batches.
  2. In Map Data Fields, confirm the field mappings use these expressions: ={{ $json.title }}, ={{ $json.address }}, ={{ $json.categories.join(",") }}, ={{ $json.scrapedAt.toDateTime().format('dd/LL/yyyy') }}, and the other listed assignments.
  3. In Sanitize Site Info, keep the provided JavaScript to normalize website, derive domain, and remove social network hosts.
  4. In Fetch Stored Place IDs, set Operation to getAll, Project ID to [YOUR_ID], and Table to [YOUR_ID].
  5. Credential Required: Connect your nocoDbApiToken credentials in Fetch Stored Place IDs.
  6. In Exclude Existing Records, keep the JavaScript that filters out known placeId values by reading $('Fetch Stored Place IDs').

Tip: The Sanitize Site Info node removes social domains like facebook.com and instagram.com. This helps avoid sending non-business domains to email enrichment.

Step 4: Filter by Domain and Enrich With Emails

Route only valid domains to email discovery, then merge enriched details back into the dataset.

  1. In Check PlaceId Exists, keep the condition ={{ $json.placeId }} with the exists operator.
  2. In Filter Records by Domain, ensure the condition is ={{ $json.domain }} with the exists operator.
  3. Open Retrieve Email Leads and confirm Continue On Fail is enabled (onError: continueRegularOutput) to avoid stopping the workflow if no email is found.
  4. In Assemble Email Details, confirm the enrichment mappings reference the filtered record, for example ={{ $('Filter Records by Domain').item.json.title }} and ={{ $json.emails.join(",") }}.
  5. Keep Combine Branches connected so both the enriched path and the “no email” path feed into the same output pipeline.

Step 5: Configure Database Output

Write the final lead records into NocoDB with a consistent schema.

  1. Open Insert Database Row and set Operation to create.
  2. Set Project ID to [YOUR_ID] and Table to [YOUR_ID].
  3. Map fields using the provided expressions, for example email={{ $json.emails }} and categories={{ $('Filter Records by Domain').item.json.categories }}.
  4. Credential Required: Connect your nocoDbApiToken credentials in Insert Database Row.
  5. Confirm Insert Database Row connects back to Batch Through Results to continue processing remaining items.

Step 6: Test and Activate Your Workflow

Run a controlled test to confirm the end-to-end flow from form input to database insertion.

  1. Click Execute Workflow and submit the Form Input Trigger with sample values (e.g., query = plumber, city = Austin).
  2. Verify that Map Search Scraper returns place items and that Sanitize Site Info produces a valid domain.
  3. Confirm Retrieve Email Leads runs for items that pass Filter Records by Domain.
  4. Check Insert Database Row to ensure new records appear in NocoDB with fields like title, email, and placeId.
  5. Once successful, toggle Activate to enable production usage.
🔒

Unlock Full Step-by-Step Guide

Get the complete implementation guide + downloadable template

Common Gotchas

  • Apify credentials can expire or the actor can require specific permissions. If things break, check your Apify token and actor run logs first.
  • If you’re using Wait nodes or external rendering, processing times vary. Bump up the wait duration if downstream nodes fail on empty responses.
  • Default prompts in AI nodes are generic. Add your brand voice early or you’ll be editing outputs forever.

Frequently Asked Questions

How long does it take to set up this Maps lead cleaning automation?

About 30 minutes if your API keys and NocoDB table are ready.

Do I need coding skills to automate Maps lead cleaning?

No. You’ll mostly connect accounts and match fields. The only “technical” part is verifying your NocoDB columns match what the workflow expects.

Is n8n free to use for this Maps lead cleaning workflow?

Yes. n8n has a free self-hosted option and a free trial on n8n Cloud. Cloud plans start at $20/month for higher volume. You’ll also need to factor in Apify, Anymailfinder, and NocoDB costs based on your usage.

Where can I host n8n to run this Maps lead cleaning automation?

Two options: n8n Cloud (managed, easiest setup) or self-hosting on a VPS. For self-hosting, Hostinger VPS is affordable and handles n8n well. Self-hosting gives you unlimited executions but requires basic server management.

Can I customize this Maps lead cleaning workflow for scheduled weekly scraping?

Yes, and it’s a common upgrade. Replace the “Form Input Trigger” with a Schedule Trigger, then store your usual queries (business type, city, country code, result count) as fixed values or rows in a small control table. You can also duplicate the workflow for separate niches if you want cleaner reporting.

Why is my Apify connection failing in this workflow?

Usually it’s an invalid or expired Apify API token in n8n. Double-check the Apify actor you’re calling, then look at the actor run logs to see if the request payload is being rejected. It can also be rate limits or account-level restrictions if you’re running lots of scrapes back-to-back. Fix the token first, because honestly that’s the cause most of the time.

How many leads can this Maps lead cleaning automation handle?

It depends on your n8n plan and your Apify run limits, but hundreds of leads per run is normal.

Is this Maps lead cleaning automation better than using Zapier or Make?

Often, yes, because this kind of lead scraping and deduping needs branching logic, batch processing, and a real “check before insert” flow. Zapier and Make can do parts of it, but you’ll usually end up paying more as volume grows, and the logic gets harder to keep readable. n8n is also friendlier for self-hosting, which matters when you want unlimited executions. If you only need a simple 2-step capture (no enrichment, no placeId dedupe), Zapier or Make is fine. Talk to an automation expert if you want help choosing.

Once this is running, you stop rebuilding lead lists from scratch. The workflow keeps your NocoDB table clean, current, and ready for outreach whenever you need it.

Need Help Setting This Up?

Our automation experts can build and customize this workflow for your specific needs. Free 15-minute consultation—no commitment required.

Lisa Granqvist

Workflow Automation Expert

Expert in workflow automation and no-code tools.

×

Use template

Get instant access to this n8n workflow Json file

💬
Get a free quote today!
Get a free quote today!

Tell us what you need and we'll get back to you within one working day.

Get a free quote today!
Get a free quote today!

Tell us what you need and we'll get back to you within one working day.

Launch login modal Launch register modal