AI Dental Reception & Live Queue System
An AI receptionist and live patient-queue engine where the database, not the AI, owns the scheduling logic.
Overview
A reception and queue-management system built for a dental clinic client (not named): an AI receptionist handles conversations, while a PostgreSQL-based queue engine decides who is next and what changes when appointments run late.
Problem
In a busy clinic, one running-late appointment shifts everything after it. Patients need accurate updates, and reception needs one reliable view of the queue.
Existing process
Typically a mix of phone calls, a paper or spreadsheet schedule and manual messages to patients when delays occur.
Workflow
- 01
Patient message
- 02
AI receptionist
- 03
Queue engine
- 04
Delay notice / reminder
- 05
Reception dashboard
Architecture
Conversation
AI receptionist workflow in n8n (LangChain agent via OpenRouter, conversation memory in Postgres).
Business logic
Queue recalculation lives in PostgreSQL stored functions, so there is a single source of truth.
Dispatch
The backend and n8n act as thin dispatchers that call the database functions and send messages.
Automation
Separate workflows for delay notifications and a scheduled 15-minute reminder job.
Interface
Next.js dashboards with role-based access (admin, reception, dentist) using JWT roles.
Workflow steps
- A patient message reaches the AI receptionist workflow.
- The assistant answers or collects details, and calls the booking and queue functions for anything that changes data.
- When an appointment runs late, the database recalculates the queue and workflows notify affected patients.
- A scheduled job sends reminders ahead of appointments.
- Reception and clinicians see the same live queue in their dashboards.
Technology stack
- n8n
- LangChain
- OpenRouter
- PostgreSQL (plpgsql)
- Node.js / Express
- Prisma
- Next.js
- Docker Compose
Key engineering decisions
- Queue logic is in database functions, not in prompts or workflow nodes, so the result is deterministic and testable.
- The AI handles conversation only. It never calculates queue positions.
- Workflows are kept thin so there is one place to change a rule.
Reliability and safety decisions
- Role-based access separates admin, reception and clinician views.
- Changes to queue state go through database functions rather than free-form AI output.
- No patient data is used in this public description.
Testing approach
- Queue recalculation was developed as database logic so cascade cases (a delay affecting later appointments) can be checked directly.
Outcome and limitations
Outcome: Built and deployed for a dental clinic client. No operational outcome metrics are published.
Limitations: The WhatsApp channel for the AI receptionist is still being end-to-end tested. Healthcare regulatory requirements are not claimed to be met and would be assessed per engagement.
Have a similar workflow?
Tell me how your team handles it today and we can see whether automation is a practical fit.
Siddique Hossain