> For the complete documentation index, see [llms.txt](https://aizy.gitbook.io/aizy-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://aizy.gitbook.io/aizy-docs/aizy-docs-es/channels/telegram.md).

# Telegram

## 1. Descripción

En este apartado conectas tu bot de Telegram con Aizy Agents para recibir y responder mensajes desde ese canal.

## 2. Antes de empezar

Antes de configurar Telegram en Aizy Agents, prepara lo siguiente:

* Un bot creado en Telegram con **@BotFather**.
* El **token del bot** que te entrega BotFather.
* Permiso para configurar el webhook del bot.

Referencias oficiales:

* Crear bot y obtener token: <https://core.telegram.org/bots/tutorial>
* API de bots: <https://core.telegram.org/bots/api>
* Configurar webhook (`setWebhook`): <https://core.telegram.org/bots/api#setwebhook>

## 3. Apartados de Telegram

| Subapartado                 | Qué haces en este subapartado                                          |
| --------------------------- | ---------------------------------------------------------------------- |
| `Token del bot`             | Pegas el token que te dio BotFather.                                   |
| `URL de webhook`            | Copias la URL que Telegram debe usar para enviar mensajes a tu agente. |
| `Configurar webhook`        | Abres el enlace directo para registrar el webhook en Telegram.         |
| `Nombre de usuario del bot` | Añades el `@usuario` del bot (opcional).                               |
| `Abrir conversación`        | Abres tu bot en Telegram para probar la conexión.                      |
| `Guardar cambios`           | Guardas la configuración del canal.                                    |
