GOOGLE MAPS LEAD SCRAPER
Finds local businesses on Google Maps, crawls their websites for email addresses, and sends personalised outreach emails via Gmail. Built for finding headshot photography clients.
How It Works
-
Scrape
Playwright automates Google Maps, searches for businesses matching your query, and saves each result — name, category, address, phone, and website — to an
.xlsxfile. -
Crawl
For each business with a website, a crawler visits the page and hunts for contact email addresses. It prioritises generic addresses (
info@,contact@) over personal names and only returns addresses on the same domain. -
Review
Open the
.xlsx, delete any rows you don't want to contact, and save. TheSend Tocolumn is pre-populated with the best email found — edit any cell to override. -
Send
The email sender reads the spreadsheet, skips anyone already in the history log, and sends a personalised email via Gmail for each remaining row — stamping each row with a sent timestamp on completion.
Quick Start
-
Scrape leads
python3 main.py -
Review
Open the
.xlsx, delete rows you don't want, save and close. -
Send emails
python3 email_sender.py
Project Files
| File | Purpose |
|---|---|
| main.py | Scrapes Google Maps → saves leads to .xlsx |
| email_sender.py | Reads .xlsx → sends emails via Gmail |
| maps_scraper.py | Playwright browser automation |
| website_crawler.py | Email finder for business websites |
| email_template.txt | Your email subject, body, and signature |
| sent_history.csv | Auto-created. Permanent log of every email sent |
| gmail_config.txt | Auto-created. Stores Gmail credentials |
Email Template
Edit email_template.txt to change what gets sent. Available placeholders:
| Placeholder | Example output |
|---|---|
| {Business Name} | Smith & Jones LLC |
| {Name} | Smith & Jones (legal suffix stripped) |
Notes
- Deduplication: Every successful send is logged to
sent_history.csv. Future runs check this file and skip any address already contacted, regardless of which.xlsxyou're running. - Gmail setup: Requires a Gmail App Password on first run — generate one at Google Account → Security → 2-Step Verification → App Passwords.
- Send limits: Keep runs under 100 emails/day to stay within Gmail's sending limits.
- Debugging: Run with
--show-browserif the scraper returns no results — this opens a visible browser window for debugging or CAPTCHA solving.