This guide explains how to integrate cal.com’s book appointment functionality into your application. This integration allows you to book appointments on cal.com.

1

Create a Cal.com Account

  1. Visit cal.com to create an account
2

Configure Event Type

  1. Navigate to the “Event Types” section in your cal.com dashboard
  2. Click “New”
  3. Configure your event settings
  4. Click “Save” to create the event type
3

Obtain Required Credentials

Get Event Type ID

  1. Open your created event type
  2. Look at the URL in your browser
  3. The event type ID is the number in the URL Example: https://app.cal.com/your-username/event-type/1427703 In this case, 1427703 is your event type ID

Get API Key

  1. Go to “Settings” in your cal.com dashboard
  2. Navigate to “Developer” section
  3. Click on “API Keys” to retrieve your API key
4

Add a book on calendar function in Retell

  1. Enter the following details:
    • Tool name: this has to be unique within that agent
    • API Key from cal.com
    • Event Type ID
    • Tool description (example: “Book the appointment for 30-minute consultation calls”)
    • (optional): add a timezone to be used in the function
  2. Click “Save” to complete the setup
5

Update prompt for function

It’s best to include in the prompt explicitly when is the best time to invoke the custom function. For example:

When user selected a slot, please book the appointment by calling the `book_appointment` function.

Video tutorial (based on single / multi prompt agent):