See llms.txt for all machine-readable content.

Back to Templates

Turn permit data into cleaning leads with Decodo, Apify, DeepSeek and ElevenLabs

A cleaning company usually hears about a new office build-out weeks after the contractor hired someone. City permit feeds publish tenant improvement filings the day they are issued, while the space is bare and the contract undecided. This workflow reads that feed every weekday morning, matches each build-out to a business on Google Maps, scores the lead, and reads the best ones out loud before your first crew meeting.

Last updated: November 2026.

Quick Overview

Decodo fetches the last seven days of renovation and alteration permits from the feed URL, cost floor and keywords set in Config. Filter Permits keeps the ones above the cost floor that mention commercial space, and Skip Seen Permits drops repeats. Apify Google Maps looks up each address and returns the business name, phone, website and category, and DeepSeek scores the lead 1 to 10 with the likely use, the timing, a first line to say and the contact path. Leads go to a Google Sheet, the best few become a 45 second brief voiced with ElevenLabs, and Telegram and Gmail deliver it.

How it works

  1. Weekday 07:00 runs Monday to Friday at 07:00, and Config builds the permit URL with a seven day window.
  2. Fetch Permits with Decodo posts it to the web data API, Parse Permits reads the JSON, and Split Permits makes one item per permit.
  3. Filter Permits keeps permits at or above minReportedCost whose work description matches a keyword.
  4. Skip Seen Permits drops ids from earlier runs, Any New Permits? routes the rest, and Tell Nothing New answers an empty morning.
  5. Limit Permits caps the batch at maxLeads, and Apify Google Maps searches each address with three results under a $0.50 charge ceiling.
  6. Build Lead keeps the permit fields plus the first Maps match, One Lead Per Permit keeps one row per permit id, and Score Lead sends it to DeepSeek V4.1 Flash.
  7. Lead Parser returns lead_score, likely_use, why_now, outreach_line and contact_path. Lead Row shapes the row, Append Lead to Sheet writes it to a Leads tab, and Collect Leads gathers the run.
  8. Write Morning Brief ranks by score and asks DeepSeek for 110 to 130 words. Narrate Brief voices it with ElevenLabs, Send Brief Audio posts the mp3, and Email Lead Table mails the table.

Setup

  1. Add the Decodo key as a Header Auth credential with Authorization: Bearer <your key>.
  2. Connect Apify on Apify Google Maps. apifyActor in Config defaults to compass~crawler-google-places.
  3. Connect a DeepSeek credential (OpenAI compatible) on DeepSeek V4.1 Flash and Brief Model.
  4. Connect ElevenLabs on Narrate Brief and pick the voice. voiceId and eleven_multilingual_v2 sit in Config.
  5. Connect Telegram on Tell Nothing New and Send Brief Audio, and set telegramChatId.
  6. Connect Google Sheets on Append Lead to Sheet, set sheetId, and make a Leads tab with columns runDate, permitId, permitNumber, issueDate, address, communityArea, reportedCost, workDescription, businessName, businessPhone, businessWebsite, businessCategory, mapsRating, mapsReviews, leadScore, likelyUse, whyNow, outreachLine, contactPath.
  7. Connect Gmail on Email Lead Table and replace [email protected] with your address.
  8. Check permitsUrl and city. The default is Chicago dataset ydr8-5enu, and any Socrata feed with these field names works.
  9. Run one test with maxLeads at 1 or 2 to check the Maps match and sheet row first.

Quick Answers

Does it chase the same permit twice?
Skip Seen Permits remembers permit ids from earlier runs, so each job goes out once.

What happens on a day with no new permits?
Tell Nothing New sends one Telegram line with the date and cost floor; nothing reaches Apify.

How much Apify credit can one morning burn?
maxLeads caps the addresses, each search returns three results, and the run stops at a $0.50 charge.

What if no business shows up at that address?
Build Lead writes "No business found at this address", and the scoring prompt tells the model not to invent one: why_now says the lookup was empty and contact_path points at the site office or the general contractor on the permit. Check a listed phone before calling it a prospect.

Additional info

Built with n8n. Need an assessment on your business? Feel free to reach out at https://khmuhtadin.com/consultation/