# Create An Appointment Booking WhatsApp Chatbot

You can use the **Calendar App** inside the **Bot Builder** to automatically book appointments through your chatbot.

#### Steps to Create a Booking Flow

1. Go to **Chatbot → Create Bot Flow**.
2. Add a **Trigger** (e.g., Keyword on WhatsApp).
3. Ask the user to choose the **consultation type** (Free or Paid) using an **Interactive Message**.

#### Fetch Available Dates

4. Add **Automation App → Calendar → Fetch Available Date**.
5. Enter the **Event ID** from the Calendar booking page.
6. Save the returned dates in a **Bot Field (JSON)** using **Save Variable Value**.

#### Let User Select a Date

7. Use an **Interactive Dynamic List** to display available dates.
8. Save the selected date in a field such as **Appointment Date**.

#### Fetch Available Slots

9. Add **Automation App → Calendar → Fetch Available Slots**.
10. Use the **Event ID** and the selected **Appointment Date**.
11. Save the slots in another **Bot Field (JSON)**.

#### Let User Select a Time Slot

12. Show the available **slots using a dynamic list** and save the selected slot.

#### Collect User Details

13. Ask for **Email** and optional **Notes** using **Ask a Question** blocks.

#### Create the Booking

14. Add **Automation App → Calendar → Create New Booking**.
15. Map the required details such as:

* Date
* Slot
* Name
* Email
* Phone number
* Notes

#### Confirmation Message

Finally, send a message confirming the booking with the **selected date and time**.

Once the user completes the process, the **booking will automatically appear in the Calendar Booking panel** with all the user details.

{% embed url="<https://youtu.be/KtasFTNebp0?si=oWvsktjUdaq3BeAo>" %}

```
Main Bot Template
products/bot/flow/819b317e8efb7fe9ecf5c80fb928dce5

Payment Is Received
products/bot/flow/610227010f1bfbf88083211d3ffaf827 

Payment Is Failed
products/bot/flow/5685d56b9bbb16f3cfa7d986c4f52afc

Reschedule Flow
products/bot/flow/7267f9906b86e40722545c47a751c325

Cancel Flow
products/bot/flow/b7fea1f12993c78931444eeee20439b0

Confirmation Messages
products/bot/flow/eb86b9cb2aa0fdf65f5a048c4fa9d072

```


---

# 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://helpdocumentation.gitbook.io/user/calendar-bookings/create-an-appointment-booking-whatsapp-chatbot.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.
