Nice work @Diego_Ostro — the vertical focus (dental/legal/real estate) is the right call. Generic chatbot builders drown in edge cases; vertical-specific classification is way more accurate.
@Benjamin_Behrens raises a great point about ambiguous messages. We run a WhatsApp AI agent for a dental clinic in production (~500+ conversations/month) and hit exactly this. Our approach: instead of a rigid classifier with fixed categories, we use an AI Agent node with a detailed system prompt that handles triage conversationally. The AI collects what it needs (name, procedure, urgency) across multiple messages, then decides the routing.
For the overlap problem (“I need to reschedule AND get a quote”), the agent handles it naturally in one conversation thread rather than trying to force a single category. When it hits something it can’t resolve (emergencies, complex insurance questions), it includes a {handoff} tag in its output — a downstream IF node catches that and routes to the human team with full conversation context.
A few production patterns that might help anyone building this:
Message buffering for WhatsApp: People send 3-4 messages in a row before the bot can reply. We INSERT each message into a Postgres buffer table, WAIT 10 seconds, then SELECT + aggregate all messages for that phone number before sending to the AI. Without this, you get fragmented replies to each partial message.
Race condition fix: If two webhook executions fire for the same phone number simultaneously, use SELECT … FOR UPDATE SKIP LOCKED on the buffer query. The second execution gets zero rows and exits cleanly — no duplicate AI responses.
Urgency fallback: Don’t rely only on the AI to flag urgency. Add a structural regex check on the raw input (keywords like “emergency”, “bleeding”, “severe pain”) as an OR condition alongside the AI’s judgment. If the AI misses it, the regex catches it deterministically.
The classification + Google Sheets approach is solid for the first layer. The next evolution is usually adding state management (Postgres table tracking conversation stage, human mode flag, follow-up scheduling) — that’s where it goes from a classifier to a full agent.