Just deployed my first cloud automation with Trigger.dev + Claude Code! What I built: A weekly real estate lead generator that runs every Monday at 9am, searches Google Maps via SerpAPI for real estate agencies across 8 UK cities, scrapes contact emails from their websites, and writes everything to a Google Sheet automatically — while I sleep.
What it does: Finds ~60 real estate agency leads per week, extracts contact emails, and logs them to a spreadsheet with zero manual effort.
What broke (and how Claude Code fixed it):
Three things broke silently — the worst kind of bug:
- The Google Sheets write function was calling the API and completely ignoring the response — so even when it failed, the task showed "success." Claude spotted the missing if (!res.ok) throw and added proper error propagation.
- All 59 tasks fired simultaneously and hit Google's 60 writes/minute rate limit. Claude added a concurrency Limit: 5 queue so only 5 tasks run at a time — the rest wait their turn.
- The State tab (which tracks which city to search next week) used a PUT request on an empty cell — which silently does nothing. Claude switched it to an append+overwrite so it always writes regardless of whether the cell is empty.
59 leads in the sheet on the first successful run. Manchester is next Monday.
#AISChallenge #leadgenerationworkflow #serpAPI #trigger.dv #github #claude