> For the complete documentation index, see [llms.txt](https://help.calshare.net/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://help.calshare.net/whatsapp-ai.md).

# WhatsApp AI

Turn your WhatsApp number into an autonomous virtual scheduler.

## 4.1. Pairing Your Device

Establish a connection between your phone and Calshare to send and receive messages on your own number.

1. Go to the **WhatsApp & AI** menu in the administration panel.
2. Select the calendar you want to configure automation for.
3. A dynamic QR Code will generate on the screen.
4. Open WhatsApp on your phone, go to **Settings > Linked Devices > Link a Device**, and scan the QR Code.
5. Wait 5 to 15 seconds. The screen will display **Connected** with your WhatsApp profile image.

## 4.2. Configuring the AI Agent

#### Steps to activate Gemini:

1. Check the box labeled **Enable AI Assistant**.
2. **Gemini API Key:** Enter your API key generated in Google AI Studio (must start with `AIzaSy`).
3. **System Instruction (Prompt):** Define the bot's behavior, tone, and goals.

### Sample AI System Instruction

> "You are the virtual booking assistant for Dr. John's Clinic. Your tone must be warm, professional, and helpful. Your sole objective is to schedule appointments for Dr. John. When the client expresses interest in booking, use the check\_available\_slots tool by specifying the date they want. Never make up open slots. Only offer the free times returned by the tool. To confirm a booking slot chosen by the user, invoke the book\_appointment tool using their name and phone number. Finally, confirm the booked appointment details."


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://help.calshare.net/whatsapp-ai.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
