> 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

Интегрируйте бота Telegram с Navixy IoT Logic, чтобы отправлять автоматические уведомления. Настройте бота, укажите ID чата и подключите Вебхук.

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

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

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

2. Получите идентификатор чата, которому хотите отправить сообщение

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

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

<figure><img src="https://2371323805-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FIgDb43gtyXcm1Av4h1np%2Fuploads%2Fgit-blob-f7f6fcc34d0900aa010886b55597bc81e71d8210%2Funknown.png?alt=media" alt=""><figcaption></figcaption></figure>

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

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

<figure><img src="https://2371323805-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FIgDb43gtyXcm1Av4h1np%2Fuploads%2Fgit-blob-a9dcc4cc6160133e664cb4b261ded66af5317460%2Funknown.png?alt=media" alt=""><figcaption></figcaption></figure>

4. Создайте IoT-поток в Navixy

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

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

* В разделе «Заголовки»:
* Ключ: Content-Type
* Значение: application/json
* Наконец, в теле запроса укажите параметры телеметрии, которые хотите отправить, не забудьте снова включить chat\_id, например:

{

"chat\_id": X,

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

}

![](https://2371323805-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FIgDb43gtyXcm1Av4h1np%2Fuploads%2Fgit-blob-3ffecccdbc856d2256330f9ead8b2c6556fea221%2Funknown.png?alt=media\&token=62a344c4-a410-4539-97c3-ea7ecafd2820) ![](https://2371323805-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FIgDb43gtyXcm1Av4h1np%2Fuploads%2Fgit-blob-f5de8300a0b21fe30afa42ef8ebf93a335d88ead%2Funknown.png?alt=media\&token=c2357d5b-7a47-4003-aba8-6a1403426a2a)

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

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
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=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
