AI Lead Generation and Outreach Autopilot
A scheduled pipeline that finds local businesses city by city, writes them to Google Sheets and sends each one a personalised cold email, written by a language model and sent only during the recipient's business hours.
The problem
Outbound sales to local businesses is slow manual work: someone searches maps, copies details into a spreadsheet, writes an email per lead and keeps track of who replied. It rarely gets done consistently, and generic templates get ignored.
How it works
- Area planning. For each city in a queue, a language model proposes the neighbourhoods worth searching and returns them as structured JSON.
- Lead collection. An open-source Google Maps scraper runs locally in Docker. Results are cleaned into lead fields (name, category, address, phone, website, rating) and enriched with social links from each business's site.
- Storage and reporting. Leads go into Google Sheets, one tab per country, with a dashboard, sent-email log and activity tabs refreshed on every run. Pipeline state lives in SQLite.
- Personalised outreach. A language model writes the opener and email for each lead from its details. Sending respects the recipient's local business hours and pauses when bounces rise.
- Feedback loop. Replies, unsubscribes and bounces are detected over IMAP and written back, so nobody is emailed twice or after opting out.
- Runs itself. A scheduler fires the pipeline every 15 minutes, with a lock file so runs never overlap.
What it demonstrates
A language model used only at the steps that need judgement (where to search, what to say), with ordinary, testable automation everywhere else: queues, deduplication, rate limits, compliance rules and a human-readable dashboard.
Built with
Python, an LLM API, Playwright, Google Sheets API, Gmail SMTP/IMAP, SQLite, Docker and a system scheduler. The scraping engine is the open-source gosom/google-maps-scraper (MIT).
The build
- Type
- Demo build
- Discipline
- AI Automation
Built with
- Python
- LLM
- Google Maps data
- Google Sheets
- Gmail
- Playwright
- SQLite
- Scheduling