Every small business owner I've worked with has the same pain point: appointment scheduling eats their day alive.
They're stuck in an endless loop of WhatsApp messages. Multiply this by 20-30 conversations per day, and you've lost 3-4 hours before you've done any actual work.
Here's how to build a WhatsApp bot that handles this automatically — using open-source tools, self-hosted, for under $30/month.
Architecture Overview
Components:
- WAHA — Self-hosted unofficial WhatsApp API (connects to WhatsApp Web)
- n8n — Open-source workflow automation (handles all the logic)
- Supabase — PostgreSQL database (stores appointments, availability, customer data)
Step 1: Set Up Your Database Schema
In Supabase, create three tables: availability (business hours/slots), appointments (booked slots), and conversation_state (tracks where each customer is in the booking flow).
Why conversation state? WhatsApp conversations are asynchronous. A customer might send "Tuesday" at 10am, then reply with a time at 2pm.
Step 2: Build the n8n Webhook Flow
Create a workflow with a Webhook node as the trigger. WAHA sends incoming messages here. The core logic uses a Switch node to route by conversation state:
| State | What We Expect | Next Action |
|---|---|---|
initial |
Any message | Show welcome + available days |
waiting_for_date |
A date | Show available times |
waiting_for_time |
A time | Confirm booking |
waiting_for_confirm |
"yes"/"no" | Book or restart |
Step 3: Add Reminder Workflow
Create a second n8n workflow with a Cron trigger that runs every hour, finds tomorrow's appointments, and sends WhatsApp reminders via WAHA.
Step 4: Handle Edge Cases
The difference between a frustrating bot and a helpful one:
- Cancellation flow — detect "cancel" keyword, free the slot
- Rescheduling — cancel existing, restart booking
- Unrecognized input — show menu of options
Cost Breakdown
| Component | Monthly Cost |
|---|---|
| WAHA (self-hosted) | $5 (VPS) |
| n8n (self-hosted) | $0 (same VPS) |
| Supabase (free tier) | $0 |
| VPS (2GB RAM) | ~$10-15 |
| Total | ~$15-20/month |
Results from Production
I've deployed this for dental clinics, beauty salons, and consulting firms in Israel:
- 40-60% reduction in no-shows (automated reminders)
- 3-4 hours saved daily on scheduling
- 24/7 availability — customers book at midnight
- Zero missed leads — instant response
The full code and n8n workflow templates are on my GitHub.
I'm Achiya Cohen, founder of Achiya Automation. I build WhatsApp bots and workflow automation for small businesses using open-source tools like n8n.
Over to You
After deploying this for 15+ businesses, I noticed something weird: Monday no-shows are 2x higher than any other day. I still don't fully understand why.
Two questions for anyone running appointment systems:
- What's your no-show rate before vs. after automation? I've seen 40-60% reduction, but I suspect the number varies wildly by industry.
- How far in advance do you send reminders? I've settled on 24h + 2h, but some clinics swear by 48h + 4h. What's your sweet spot?
If you're building something similar and got stuck on a specific step — drop it below and I'll help debug. 👇
Top comments (0)