> 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/faq-and-troubleshooting/iot-logic/how-to-connect-telegram-with-navixy-iot-logic.md).

# How to connect Telegram with Navixy-IoT Logic

This is a quick guide of the steps that might be followed to create the connection between IoT Logic and Telegram.

1. Create a bot and get your token

* In Telegram, open the chat with @BotFather.
* Run the command /newbot.
* Follow the instructions and copy the bot token provided (it looks like: 123456:ABC-...).

2. Get the chat\_id you want to message

Common ways to do this:

* Send a message to your bot (or add it to a group and send a message there).
* Then call the getUpdates method from the Telegram API.
* If it's a group, the chat\_id is usually a negative number.
* Make sure the bot has received at least one message so it appears in getUpdates.

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

3. Send the message (REST call)

* Use the sendMessage method from the Telegram API.
* In the request body, include the chat\_id and the message text.
* The request should be sent in JSON format with the header Content-Type: application/json.

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

4. Create the IoT Flow in Navixy

* Once the flow has been created, connect the Webhook node in the section where you want to send the data.
* Follow the same structure as the API call. In the URL field, place the request endpoint:

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

* In the Headers section:
* Key: Content-Type
* Value: application/json
* Finally, in the body of the request, include the telemetry parameters you want to send, making sure to include the chat\_id again, for instance:

{

"chat\_id": X,

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

}

![](/files/3JfC89wPiNb6Ewlcj7IC) ![](/files/bwhr9v7KZLpQ1svmWv8Y)

With these steps, your bot will be able to receive messages successfully, including automated telemetry data from Navixy.


---

# 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/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.
