Skip to content
Tala Safadi
All work

Automation · RAG · Demo

AI Receptionist for a Dental Clinic

A Telegram assistant that answers patient questions accurately from the clinic's own information, by text or voice. It never invents an answer and never gives medical advice. Built in n8n as a demo with sample data.

Demo project with sample data, built around a fictional clinic, "Al Noor Dental Clinic".

Problem

Clinic receptionists spend a large part of the day answering the same questions about hours, prices, doctors and insurance. Patients often ask outside working hours and get no answer. A general chatbot is risky in a medical setting: it can invent prices or give medical advice.

Solution

A Telegram bot with one focused AI agent that searches the clinic's knowledge base before every factual answer. It answers common enquiries 24/7, formally and accurately, only from information the clinic has approved.

Architecture

voicetextvoicetextTelegramtriggerFix AudiotoolTranscribellmAI Agentagentsearch_clinicragText to SpeechvoiceSend Replyoutput

Live replay

An answer from the clinic's own document

What it does

  • Answers questions about hours, location, services and prices, doctors, insurance, payment and emergencies
  • Replies in formal Arabic or English, matching the patient's language
  • Understands voice notes and answers with a short spoken reply
  • Refuses medical advice politely, points to an examination and gives emergency guidance for serious cases
  • Never invents information: if it isn't in the knowledge base, it says so and gives the reception number
  • One-click knowledge updates: edit the file on Google Drive and run ingestion, and the old version is removed automatically
  • Patients always get a reply, even when a service fails, and the owner is alerted
  • Handles enquiries only, and gives the reception phone and WhatsApp for appointments

Results

  • "Are you open on Friday?" went from "information not available" to "closed on Fridays".
  • "Do you offer implants?" went from "information not available" to "not offered", with the reception number.
  • A question about aligner prices and installments stopped mentioning internal document sections.
  • A medication question is refused, with a recommended examination and emergency guidance instead of an offer to book.

From testing with sample data, on the same questions before and after the fixes. The live replay above is one of these runs.

Challenges and fixes

  • Re-running ingestion duplicated the knowledge base, so search returned the same chunk five times and missed answers.

    The document's old chunks are deleted before inserting, with Execute Once set after the delete step.

  • Instructions inside the knowledge file contradicted the system prompt, and references like "see section 7" leaked into answers.

    The knowledge file now holds facts only, and all behaviour rules live in the system prompt.

  • Spoken replies read out bullet points, slashes and currency codes.

    Voice questions are tagged for the agent, and the text is cleaned before speech.

  • Telegram voice notes (.oga) were rejected by the transcription service.

    A small code step renames the file to .ogg before transcription.

  • Stray & or < characters could break formatted Telegram messages.

    Replies are escaped for HTML while keeping the allowed bold tags.

In action

The AI Agent in n8n with its chat model, memory and clinic knowledge search(opens the full image)
The AI Agent in n8n with its chat model, memory and clinic knowledge search
Message intake in n8n: text and voice paths, audio fix and transcription(opens the full image)
Message intake in n8n: text and voice paths, audio fix and transcription
Reply step in n8n: voice notes get speech, typed messages get text(opens the full image)
Reply step in n8n: voice notes get speech, typed messages get text
Knowledge ingestion in n8n: clear old knowledge, download from Drive, store in Supabase(opens the full image)
Knowledge ingestion in n8n: clear old knowledge, download from Drive, store in Supabase

Stack

  • n8n
  • OpenAI (gpt-5-mini, Whisper, embeddings)
  • Supabase pgvector
  • Google Drive
  • ElevenLabs
  • Telegram Bot API

My role

AI automation design and build, solo.

What I'd add next

  • Booking integration with the clinic's calendar, left out of scope on purpose
  • Automatic knowledge refresh when the Drive file changes
  • A weekly report of the most common patient questions
  • Rate limiting for a public bot

Want this for your business?

Next projectAI Personal Assistant (Telegram)