> For the complete documentation index, see [llms.txt](https://navixy.com/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://navixy.com/docs/expert-center/es/faq-and-troubleshooting/iot-logic/how-to-connect-telegram-with-navixy-iot-logic..md).

# Cómo conectar Telegram con Navixy-IoT Logic.

Esta es una guía rápida de los pasos que pueden seguirse para crear la conexión entre IoT Logic y Telegram.

1\) Cree un bot y obtenga su token

* En Telegram, abra el chat con @BotFather.
* Ejecute el comando /newbot.
* Siga las instrucciones y copie el token del bot proporcionado (tiene este aspecto: 123456:ABC-...).

2\) Obtenga el chat\_id al que desea enviar el mensaje

Formas comunes de hacerlo:

* Envíe un mensaje a su bot (o agrégelo a un grupo y envíe allí un mensaje).
* Luego llame al método getUpdates de la API de Telegram.
* Si es un grupo, el chat\_id suele ser un número negativo.
* Asegúrese de que el bot haya recibido al menos un mensaje para que aparezca en getUpdates.

<figure><img src="/files/344aad10e8e86a8fd813e4225c168298999ffeaa" alt=""><figcaption></figcaption></figure>

3\) Envíe el mensaje (llamada REST)

* Use el método sendMessage de la API de Telegram.
* En el cuerpo de la solicitud, incluya el chat\_id y el texto del mensaje.
* La solicitud debe enviarse en formato JSON con la cabecera Content-Type: application/json.

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

4\) Cree el flujo de IoT en Navixy

* Una vez creado el flujo, conecte el nodo Webhook en la sección donde desee enviar los datos.
* Siga la misma estructura que la llamada a la API. En el campo URL, coloque el endpoint de la solicitud:

<https://api.telegram.org/bot\\>\<BOT\_TOKEN>/sendMessage

* En la sección Headers:
* Key: Content-Type
* Value: application/json
* Por último, en el cuerpo de la solicitud, incluya los parámetros de telemetría que desea enviar, asegurándose de incluir nuevamente el chat\_id, por ejemplo:

{

"chat\_id": X,

"text": "Device 12563254, latitude: {{latitude}}, longitude: {{longitude}}, satellites: {{satellites}}, speed: {{speed}}"

}

![](/files/1ae97583944a872afcaa581ceda83448f02a9d42) ![](/files/c2219ea1ba3f19cf501500cb8da4864fe065b3f4)

Con estos pasos, su bot podrá recibir mensajes correctamente, incluidos los datos de telemetría automatizados de Navixy.

<br>


---

# 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://navixy.com/docs/expert-center/es/faq-and-troubleshooting/iot-logic/how-to-connect-telegram-with-navixy-iot-logic..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.
