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

# Как подключить Telegram к Navixy-IoT Logic.

Это краткое руководство по шагам, которые можно выполнить для создания соединения между IoT logic и Telegram.

1\) Создайте бота и получите ваш токен

* В Telegram откройте чат с @BotFather.
* Выполните команду /newbot.
* Следуйте инструкциям и скопируйте предоставленный токен бота (он выглядит так: 123456:ABC-...).

2\) Получите chat\_id, которому хотите отправлять сообщения

Распространённые способы сделать это:

* Отправьте сообщение своему боту (или добавьте его в группу и отправьте сообщение там).
* Затем вызовите метод getUpdates из Telegram API.
* Если это группа, chat\_id обычно представляет собой отрицательное число.
* Убедитесь, что бот получил хотя бы одно сообщение, чтобы оно появилось в getUpdates.

<figure><img src="/files/6ed48bcff37f42a461bcfccc63de04955bec8438" alt=""><figcaption></figcaption></figure>

3\) Отправьте сообщение (REST-вызов)

* Используйте метод sendMessage из Telegram API.
* В тело запроса включите chat\_id и текст сообщения.
* Запрос должен быть отправлен в формате JSON с заголовком Content-Type: application/json.

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

4\) Создайте IoT Flow в Navixy

* После того как flow будет создан, подключите узел Webhook в разделе, куда вы хотите отправлять данные.
* Следуйте той же структуре, что и в API-вызове. В поле URL укажите конечную точку запроса:

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

* В разделе Headers:
* Key: Content-Type
* Value: application/json
* Наконец, в тело запроса включите параметры телеметрии, которые вы хотите отправить, обязательно снова указав chat\_id, например:

{

"chat\_id": X,

"text": "Устройство 12563254, широта: {{latitude}}, долгота: {{longitude}}, спутники: {{satellites}}, скорость: {{speed}}"

}

![](/files/71b7d675e0019b5974e2ca2ebee6c813ddac3f06) ![](/files/228bcd098360372c1b9af458c3bfd5024d7a80bd)

С этими шагами ваш бот сможет успешно получать сообщения, включая автоматические данные телеметрии из 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/ru/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.
