Automated follow-ups that don't feel automated
The WhatsApp bot was qualifying leads and the CRM was organizing them, but a pattern kept showing up in the data: a significant number of conversations would start strong and then go silent. Someone would ask about course schedules, get a detailed answer, maybe even ask about pricing — and then vanish. The admissions team would notice these dead conversations a day or two later, send a manual follow-up, and sometimes revive the lead. But "sometimes" and "a day or two later" aren't a strategy. The school needed a system that catches the silence early and responds before the prospect moves on.
follow-up engine
We built a three-stage follow-up engine that triggers automatically when a lead stops responding mid-conversation. The first nudge fires at 7 minutes — a gentle, context-aware message referencing what they were just discussing. Something like "By the way, I wanted to mention that the evening group you asked about still has spots — would that work for your schedule?" The second follow-up comes at 24 hours with a value reminder: a relevant detail about the program, a mention of an upcoming enrollment deadline, or an answer to a question that commonly comes up at this stage. The third and final message goes out at 72 hours — a friendly last-chance note that doesn't push, just leaves the door open. Each message is generated by Claude using the full conversation context, so the follow-ups feel like a continuation of the dialogue rather than a canned template.
timing and voice latency
Getting the timing right was the most sensitive part of this system. Our first iteration used a 3-minute first nudge, which felt pushy — the kind of message that makes people mute a chat. We tried 15 minutes, which was too passive for a channel where people expect near-instant responses. The 7-minute mark was tuned empirically by looking at actual conversation patterns: most engaged prospects reply within 5 minutes, so 7 minutes is just past the point where silence likely means distraction rather than typing. The 24-hour and 72-hour intervals follow a similar logic — frequent enough to stay top of mind, spaced enough to not feel like spam. The cadence is configurable per school, but the defaults came from real data, not guesswork. The scheduling runs on APScheduler inside the FastAPI backend, with follow-up tasks stored in PostgreSQL so they survive server restarts.
The voice message pipeline feeds into this system as well. When a prospect sends a voice note instead of text, the Baileys bridge saves the audio file to the server, Whisper transcribes it, and the transcription goes to Claude for response generation. The full round trip — WhatsApp voice receipt to response sent — takes 3-5 seconds. In a normal messaging context that's fine, but when someone sends a quick voice message and watches the typing indicator spin for five seconds, it feels slow. We experimented with sending a brief acknowledgment ("Got your voice message, one moment...") while processing, but that created its own awkwardness — a meta-message about a message. In the end, we left it as-is with the typing indicator active during processing, which most users interpret naturally. It's not perfect, but the alternative was worse.
hot lead alerts
When the bot classifies a lead as hot — ready to buy — the system immediately pushes a notification to the admissions team's Telegram group via aiogram. This is where deduplication mattered. Early on, the same lead would trigger multiple alerts: once when initially classified, again when a follow-up updated their status, and sometimes a third time if they sent another message that re-confirmed intent. Three pings about the same person in an hour trains the team to ignore alerts, which defeats the purpose. We added a notification cooldown per lead — once a hot alert fires, the same lead won't trigger another one for 4 hours unless their status actually changes. Simple fix, meaningful impact on how the team trusts the system.
results
The result is measurable: leads that previously went cold now get revived at a noticeably higher rate, and the admissions team spends less time manually scrolling through dead conversations looking for people to follow up with. The system handles that entire workflow autonomously. The honest takeaway from this build is about restraint. Automation makes it trivially easy to send more messages, faster, to more people. The hard part is knowing when not to. An aggressive follow-up cadence converts a few extra leads in the short term but burns the phone number's reputation in the long term — and once a WhatsApp number gets flagged for spam, recovering it is a nightmare. The 7/24/72 cadence is conservative by design, and that conservatism is a feature, not a limitation.
Stack
Backend: FastAPI, APScheduler, SQLAlchemy, PostgreSQL
AI: Anthropic Claude, OpenAI Whisper
Notifications: aiogram (Telegram Bot API)
Bridge: Node.js, Baileys (voice message handling)
