> 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/portugues/ia-do-whatsapp.md).

# IA do WhatsApp

Transforme o seu número do WhatsApp num agendador virtual autónomo.

## 4.1. Emparelhar o seu dispositivo

Estabeleça uma ligação entre o seu telefone e o Calshare para enviar e receber mensagens no seu próprio número.

1. Vá para o **WhatsApp e IA** menu no painel de administração.
2. Selecione o calendário para o qual pretende configurar a automatização.
3. Será gerado um Código QR dinâmico no ecrã.
4. Abra o WhatsApp no seu telefone e vá para **Definições > Dispositivos ligados > Ligar um dispositivo**, e digitalize o Código QR.
5. Aguarde 5 a 15 segundos. O ecrã mostrará **Ligado** com a sua imagem de perfil do WhatsApp.

## 4.2. Configurar o Agente de IA

#### Passos para ativar o Gemini:

1. Assinale a caixa com a indicação **Ativar Assistente de IA**.
2. **Chave de API do Gemini:** Introduza a sua chave de API gerada no Google AI Studio (deve começar por `AIzaSy`).
3. **Instrução do sistema (prompt):** Defina o comportamento, o tom e os objetivos do bot.

### Exemplo de instrução do sistema de IA

> "Você é o assistente virtual de marcações da Clínica do Dr. John. O seu tom deve ser cordial, profissional e prestável. O seu único objetivo é agendar consultas para o Dr. John. Quando o cliente manifestar interesse em marcar, use a ferramenta check\_available\_slots especificando a data pretendida. Nunca invente horários disponíveis. Ofereça apenas os horários livres devolvidos pela ferramenta. Para confirmar um horário de marcação escolhido pelo utilizador, invoque a ferramenta book\_appointment usando o nome e o número de telefone dele. Por fim, confirme os detalhes da consulta marcada."


---

# 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/portugues/ia-do-whatsapp.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.
