Daily local lead list builder from Google Maps to Google Sheets

Every weekday at 6am, pull fresh local businesses with emails and socials for every target city, dedupe against your existing list, and append the new ones to a Google Sheet.

Deterministic Code
Local Business DataGoogle SheetsSalesOperationsLead EnrichmentData SyncResearch & Monitoring
PromptCreate

Build me a code workflow that grows a Google Sheet of fresh local business leads every weekday morning. The trigger is a cron schedule: every weekday at 6am in my local timezone.

Inputs the workflow should accept up front: the Google Sheets spreadsheet ID, the name of the config tab (default Targets), and the name of the leads tab (default Leads).

Step 1. Call Google Sheets Get Values on the config tab to read my target rows. Each row has three columns: business_type, city_or_area, country_code (ISO 3166-1 alpha-2, default us). Skip the header row and any empty rows.

Step 2. Call Google Sheets Get Values on the leads tab to read the business_id column. Build an in-memory set of business IDs already collected so we can dedupe against everything ever harvested.

Step 3. For each target row, call Local Business Data Search with query set to the business_type plus the city_or_area (for example: 'plumbers in Austin, TX'), region set to country_code, extract_emails_and_contacts set to true, and limit set to 100. This returns up to 100 businesses with email and social profile fields populated where available.

Step 4. Collect every returned business across all target rows. Drop any business whose business_id is in the dedupe set. Also dedupe within the current run, in case two target rows surface the same business.

Step 5. Call Google Sheets Append Values on the leads tab to append one row per new business, with valueInputOption USER_ENTERED. Columns in order: business_id, name, full_address, phone_number, email, website, rating, review_count, linkedin, instagram, facebook, query_used, harvested_at. query_used is the search query we sent for that row. harvested_at is the current ISO 8601 timestamp.

If a target row returns no results, log it and continue to the next row, do not fail the whole run. If the leads tab is empty (first ever run), treat the dedupe set as empty and append everything.

No AI judgement is needed at any step. This is a deterministic search, dedupe, and append pipeline.

Additional information

What does this prompt do?
  • Runs every weekday at 6am so you start the day with a fresh batch of local prospects.
  • Reads a simple config tab in your Google Sheet that lists the business types and cities you want to target.
  • Pulls businesses from Google Maps for each target row, including phone, website, email, and social profiles where available.
  • Filters out any business you already have in your sheet, then appends only the brand-new leads.
  • Keeps growing a single, deduped, contact-enriched prospect list ready for cold outreach.
What do I need to use this?
  • A Google account with edit access to the spreadsheet you want to grow.
  • A RapidAPI account subscribed to Local Business Data (a free tier is available).
  • A short list of business types and cities you want to prospect, dropped into a config tab in the sheet.
How can I customize it?
  • Change the schedule. Run it once a week, twice a day, or only on Mondays instead of every weekday.
  • Edit the target list. Add or remove rows in the config tab to cover new cities, neighborhoods, or business categories.
  • Tune how many leads come back per query, or add columns like opening hours and price level if you want richer rows.

Frequently asked questions

Will it create duplicate rows if the same business shows up across cities or days?
No. Before appending, the workflow reads the existing list, builds a set of business IDs already collected, and only adds rows that are new.
Where do the emails and social profiles come from?
Google Maps does not publish them directly. The Local Business Data service visits each business website and pulls the email, phone, and social links it can find. Coverage is partial, not every business will have an email.
Do I need to pay for the data source?
Local Business Data is on RapidAPI and has a free tier. If you prospect heavily you will likely want a paid plan, but you can validate the workflow on the free tier first.
How many leads will it add per day?
Up to a hundred per target row by default, so if you have ten cities times five business types you can pull thousands per run. You can lower the limit or trim the config tab to keep volume sensible.
Can I send the new leads straight into a CRM instead?
Yes. The Google Sheet is the simplest starting point, but you can extend the workflow to also push new rows into HubSpot, Salesforce, or any outbound tool you use.

Stop scraping Google Maps by hand.

Connect Google Sheets and Local Business Data once, and Geni grows your prospect list every weekday at 6am.