Skip to main content
In this guide you’ll build a WhatsApp AI agent that acts as a dental clinic receptionist — collecting patient information and automatically creating a calendar booking via Cal.com. The same pattern works for any business that takes appointments.

What you’ll build

  • An AI agent that chats with patients on WhatsApp
  • A Save Attribute tool that stores appointment details against the contact record
  • A Create Calendar Event tool that calls the Cal.com API to confirm the booking

Prerequisites


Step 1 — Create a new automation

  1. In the sidebar, go to Automation and click New Bot.
  2. Name it something descriptive, e.g. AI Receptionist.
  3. In the Start Flow block, select your WhatsApp Business number.

Step 2 — Add an AI Agent node

Inside the automation canvas, click + and choose AI Agent. An AI Agent node has four components:
ComponentPurpose
PromptSystem prompt that defines the agent’s personality and task
Knowledge BaseWebsites or PDFs the agent can reference to answer questions
ToolsThird-party integrations the agent can call to take actions
RoutesExit paths triggered when specific outcomes occur (e.g. appointment confirmed)

Step 3 — Write the system prompt

Open the Prompt tab. You can write a prompt manually or use the Generate with AI button. Example input to the prompt generator:
Generate a system prompt for an AI receptionist working at a dental clinic.
Your job is to help patients book an appointment with the clinic.
Make sure to collect: email address, date of appointment, time of appointment,
and the service they need.
The clinic provides: general consultation, root canal, teeth whitening,
teeth cleaning, and braces consultation.
The generated prompt will instruct the agent to:
  • Greet the patient warmly and introduce the clinic
  • Collect the required booking information one step at a time
  • Confirm all details before creating the appointment
Always review the generated prompt before saving. Make sure the clinic name, services, and any operating hours are accurate.

Step 4 — Add the Save Attribute tool

Switch to the Tools tab and click Add Tool → Save Attribute.
FieldValue
Namesave_appointment_info
DescriptionUse this tool to save appointment booking information
Add the following attributes for the agent to collect and save:
  • appointment_date — Date of the appointment
  • appointment_time — Time of the appointment
  • email — Email address of the patient
  • service — Type of service requested
When the agent has gathered all four pieces of information, it will automatically call this tool and store the values on the contact’s profile in your Audience.

Step 5 — Add the Create Calendar Event tool

Still in the Tools tab, click Add Tool → HTTP Request and configure it as follows. General
FieldValue
Namecreate_calendar_event
DescriptionCreates a booking on the clinic’s Cal.com calendar
MethodPOST
URLhttps://api.cal.com/v2/bookings
Headers
KeyValue
cal-api-version2024-08-13
AuthorizationBearer <your_cal_api_key>
Request Body
{
  "eventTypeId": <your_event_type_id>,
  "start": "{{start_datetime}}",
  "attendee": {
    "name": "{{contact.name}}",
    "email": "{{contact.email}}",
    "phoneNumber": "{{contact.phone}}",
    "timeZone": "Asia/Kolkata"
  }
}
  • start_datetime is marked as a dynamic variable — the LLM generates an ISO 8601 datetime string (e.g. 2025-03-26T11:00:00Z) based on the date and time the patient provided.
  • contact.name, contact.email, and contact.phone are pulled automatically from the contact’s Audience attributes.
Make sure your Cal.com event type allows API bookings and that the timezone on your event type matches what your patients expect.

Step 6 — Deploy and test

  1. Click Deploy (or toggle the automation live).
  2. Send a message to your WhatsApp Business number from any phone.
  3. The agent will greet you and walk through the booking flow.
Example conversation:
Agent:  Hello! Welcome to Bright Smile Dental Clinic. I'm your virtual
        receptionist. How can I help you today?

Patient: I'd like to book a root canal for March 26th at 11am.

Agent:  Of course! Could I get your email address to confirm the booking?

Patient: patient@example.com

Agent:  Perfect — your root canal appointment is confirmed for March 26th
        at 11:00 AM. You'll receive a calendar invite shortly!
After the conversation, you can verify the result in two places:
  • Audience → Contact profileappointment_date, appointment_time, email, and service are saved as attributes.
  • Cal.com dashboard — the booking appears in your calendar with the patient’s details.
  • Live Chat — a full transcript of the conversation is available in real time.

What’s next?

Add a Route

Trigger a follow-up email or assign a ticket to a human agent once the appointment is confirmed.

Explore the AI Agent block

Learn about knowledge bases, multiple tools, and advanced routing options.

View Live Chat transcripts

Monitor all WhatsApp conversations in real time from the Live Chat view.

Connect a Voice Agent

Extend the same receptionist experience to inbound phone calls.