1
Dental Booking AI Agent π¦·π€
An AI-powered WhatsApp agent that automates dental appointment booking end-to-end β no manual front-desk work required. Patients message the clinic like they normally would; the AI handles the entire conversation, checks real calendar availability, and books the appointment directly.
Built as a hands-on project to explore agentic AI workflows using n8n.
π‘ The Problem
Most dental clinics still handle appointment booking manually: a patient messages, staff replies, checks the calendar, confirms, and books it by hand. It's repetitive, slow, and pulls staff away from patients who are physically in the clinic.
β
What This Agent Does
Receives patient messages over WhatsApp
Holds a natural conversation to collect: name, preferred date/time, and reason for visit
Checks real-time calendar availability before confirming anything
Confirms the details back to the patient and asks for a final "yes"
Only after confirmation, creates the actual appointment on Google Calendar
Remembers conversation context per patient (so it doesn't ask the same question twice)
No forms. No hold music. No manual back-and-forth.
π οΈ Tech Stack
Component Tool
Workflow orchestration n8n
AI / LLM Google Gemini (via n8n's Google Gemini Chat Model node)
Messaging channel WhatsApp (via Twilio Sandbox)
Calendar & booking Google Calendar API
Memory n8n Buffer Window Memory (keyed by patient's phone number)
π§© Architecture
Patient (WhatsApp)
β
βΌ
Twilio WhatsApp Sandbox
β
βΌ
n8n Webhook (trigger)
β
βΌ
Extract Fields (parse incoming message)
β
βΌ
AI Agent (Gemini + system prompt)
βββ Chat Model β Google Gemini
βββ Memory β Conversation Buffer (per patient)
βββ Tool β Check Availability (Google Calendar)
βββ Tool β Book Appointment (Google Calendar)
β
βΌ
Send WhatsApp Reply (Twilio)
β
βΌ
Patient (WhatsApp)
βοΈ Setup
1. Prerequisites
An n8n instance (cloud or self-hosted)
A free Twilio account (for WhatsApp Sandbox)
A free Google Gemini API key
A Google account with Calendar access
2. Import the workflow
Import dental-booking-agent.json into n8n via Import from File.
3. Connect credentials
Twilio β Account SID + Auth Token (from Twilio Console)
Google Gemini β API key (from Google AI Studio)
Google Calendar β OAuth2 (connect via "Sign in with Google" inside the node)
4. Configure the WhatsApp Sandbox
In Twilio Console β Messaging β Try it out β Sandbox settings, set "When a message comes in" to your n8n webhook's Production URL.
5. Activate the workflow
Toggle the workflow to Active in n8n. Test by messaging the Twilio sandbox number on WhatsApp.
π§ Known Limitations (Demo Version)
Runs on Twilio's free Sandbox, which is capped at a small number of messages/day and requires each tester to "join" the sandbox manually β not production-ready for real clinic use yet.
Uses gemini free-tier models β tool-calling reliability can vary; verified fixes included for date-handling accuracy.
Single calendar/clinic only β no multi-provider or multi-location support yet.
πΊοΈ Roadmap
Appointment reminders (proactive, outside patient-initiated conversations)
No-show follow-up automation
Lead qualification for new patient inquiries
Move off Twilio Sandbox to a verified WhatsApp Business number for production use
π About This Project
Built as a learning project to move from no-code workflow automation (n8n) into agentic AI β where the AI doesn't just answer questions, but takes real actions (checking availability, creating calendar events) on a user's behalf.
Add a comment
0/2000