Errors
Each step runs on its own. If the AI fails, the alert still goes out with a plain reply draft, and the failure is logged.
A multi-tenant lead system on Cloudflare Workers: one deployment serves many businesses, each with its own key, settings and data. A form sends the lead; the system saves it and answers the form at once, then classifies it and alerts the owner in the background.
Leads contacted within 5 minutes are 21× more likely to qualify than leads contacted after 30 minutes (MIT / InsideSales lead response study). Most small businesses reply hours later, or never.
The form gets its answer straight away. In the background the AI reads the message, marks it hot, warm or junk, writes a one-line summary and drafts the reply. The owner gets a phone notification with the draft ready to send.
Every 10 minutes the system looks for leads nobody has answered and reminds the owner at 15 and 60 minutes. A day after a reply it asks "Won or lost?", and every Monday it sends a short report.
The same rules I check in every health check, and how this system handles them.
Each step runs on its own. If the AI fails, the alert still goes out with a plain reply draft, and the failure is logged.
If the main AI model is slow or fails, a second model starts at once in parallel and the first good answer wins. A model that keeps failing is skipped for a while. A form that sends the same lead twice is saved once.
WhatsApp first when it's set up for the business, then a phone push notification if nothing got through, plus an optional email.
Each business has its own intake key, stored only as a hash.
Every AI fallback, failure and over-limit lead is written to an event log for that business.
Agencies that sell speed-to-lead: one deployment serves every client, each with its own key, settings and weekly report.