Hi everyone! Wanted to share a project I built with n8n: a WhatsApp conversational agent for a physiotherapy clinic that handles the full appointment lifecycle in real time.
What it does:
- Patients message the clinic’s WhatsApp number directly — no app, no forms.
- The agent checks real availability, books, reschedules, and cancels appointments, all synced live with Google Calendar.
- The clinic staff gets a separate agent with extended permissions (they can modify appointments directly, patients can’t — cancel + rebook instead).
- Automatic WhatsApp reminders before each appointment (approved Meta template).
Stack: WhatsApp Business API (Cloud API), n8n (self-hosted on a VPS), Google Calendar API, OpenAI as the LLM behind the agent.
A fun debugging story: the “reschedule appointment” flow kept looping — the agent would call the availability-check tool over and over without ever reaching the update step. Turned out the system prompt only told it to “check the given date/time,” which it interpreted as the new slot instead of the original one — so it could never retrieve a valid event ID. Fixing the prompt to explicitly separate “find the original slot first, then check the new one” solved it completely.
Here’s a short demo: [pega aquí el link de YouTube]
Happy to answer questions about the WhatsApp API setup, the agent’s tool design, or the permission-based routing (patient vs. staff) if useful to anyone building something similar!