# Check calendar availability

This function integrates directly with [Cal.com](http://cal.com) to access your calendar in real-time so your agent can automatically check availability and provide open time slots to users during the conversation.

With this tool, your agent can answer questions like "What times are you available this week?" or "When can you see me?" without needing to transfer the call or ask the user to check your calendar externally.

**Note:** *To obtain your* [*Cal.com*](http://cal.com) *API Key and Event Type ID, check our documentation "*[*How to Configure* ](https://docs.dapta.ai/agent-actions/cal.com)*cal.com".*

### Step-by-Step Guide

#### Step 1: Select Your Agent

* Navigate to the agent list and select the agent you want to add the calendar availability checking action to.

#### Step 2: Access Settings

* Once inside the agent, go to the **Settings** tab.
* Within Settings, click on **Agent Actions** to access the available actions for your agent.

<figure><img src="/files/M1xewjrQzEIACA6VN7cr" alt=""><figcaption></figcaption></figure>

#### Step 3: Add the Check Calendar Availability Function

* A menu with available options will appear. Click **Add** and then select **Check Calendar Availability** from the list of options.

<figure><img src="/files/7UDOs9lyH44neCOyeI2C" alt=""><figcaption></figcaption></figure>

Step 4: Configure the Required Fields

To obtain your API Key and Event Type ID, check our documentation "*How to Configure* [*Cal.com*](http://cal.com)".

* **Name:** Assign a descriptive name (e.g., "check\_calendar\_availability")
* **Instructions:** Write how you want the agent to handle availability inquiries.
* **API Key:** Enter your [Cal.com](http://cal.com) API key
* **Event Type ID:** Specify the [Cal.com](http://cal.com) event type ID
* **Timezone:** Set the time zone (optional)

<figure><img src="/files/0i8xyHMlWzCIWFnVrOrS" alt=""><figcaption></figcaption></figure>

#### Important Instructions for the Agent

Remember that when referring to dates, you should always update the timezone of the location where you are. This is important to maintain clarity and consistency in communication.

To provide the AI with context about the current time, you must include the following variable in your prompt: `{{current_time}}`, which is a variable we introduce by default. This variable gives the agent context about the current time.

If you need a different time zone, you can specify it using `{{current_time_[timezone]}}`. For example: `{{current_time_America/New_York}}`.

**Note:** *The \[timezone] must be in **IANA (Internet Assigned Numbers Authority) format.***

Some of the available options are:

| Time Zone - City         | Format for \[timezone] |
| ------------------------ | ---------------------- |
| Bogotá, Colombia         | America/Bogota         |
| Santiago, Chile          | America/Santiago       |
| La Paz, Bolivia          | America/La\_Paz        |
| Lima, Peru               | America/Lima           |
| Caracas, Venezuela       | America/Caracas        |
| Madrid, España           | Europe/Madrid          |
| Ciudad de Mexico, Mexico | America/Mexico\_City   |

### Multiple Calendar Configuration

If you need to schedule appointments in different calendars, you can create multiple actions by specifying in each one which specific calendar the appointment should be scheduled to. This is useful for separating different types of services or work teams.

### Additional Examples for Check Availability

* **For scheduling meetings:** "When the user asks about availability, check the calendar and offer at least 3 time slot options within the next 7 days. Present the options clearly mentioning day, date, and time. If there's no availability in the requested period, offer the next available dates."
* **For Consultations:** "When patients inquire about availability, check the calendar and offer time slots on weekdays between 8:00 AM and 5:00 PM. Present a maximum of 4 options within a 2-week period. Mention that appointments last 30 minutes and ask if they prefer morning or afternoon times."
* **For Professional Services:** "When checking availability, verify the calendar and provide 1-hour meeting options. Offer both in-person and virtual time slots. Mention that in-person meetings are at our downtown offices and virtual meetings are conducted via Zoom. Ask for their preference before showing the schedule."
* **For Beauty/Spa Services:** "When they ask about availability for \[service type], check the calendar and offer time slots considering the specific duration of the treatment. Mention they can choose between morning times (9:00 AM - 12:00 PM) or afternoon times (2:00 PM - 6:00 PM). Inform them that we need 24 hours advance notice for reservations."
* **For Technical Services:** "When they request availability for technical support, check the calendar and offer 2-hour time windows (e.g., 9:00-11:00 AM). Mention that we can schedule both on-site and remote visits. For on-site visits, confirm that we cover the metropolitan area."


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.dapta.ai/ai-voice-agents/agent-actions/check-calendar-availability.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
