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

# Cara menghubungkan Telegram dengan Navixy-IoT Logic.

Ini adalah panduan singkat mengenai langkah-langkah yang dapat diikuti untuk membuat koneksi antara logika IoT dan Telegram.

1\) Buat bot dan dapatkan token Anda

* Di Telegram, buka obrolan dengan @BotFather.
* Jalankan perintah /newbot.
* Ikuti instruksi dan salin token bot yang diberikan (tampilannya seperti: 123456:ABC-...).

2\) Dapatkan chat\_id yang ingin Anda kirimi pesan

Cara umum untuk melakukannya:

* Kirim pesan ke bot Anda (atau tambahkan bot ke grup dan kirim pesan di sana).
* Lalu panggil metode getUpdates dari Telegram API.
* Jika itu grup, chat\_id biasanya berupa angka negatif.
* Pastikan bot telah menerima setidaknya satu pesan sehingga bot muncul di getUpdates.

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

3\) Kirim pesan (panggilan REST)

* Gunakan metode sendMessage dari Telegram API.
* Di body permintaan, sertakan chat\_id dan teks pesan.
* Permintaan harus dikirim dalam format JSON dengan header Content-Type: application/json.

<figure><img src="/files/3c5191207dea4d8729079588a14ec387a070fdd3" alt=""><figcaption></figcaption></figure>

4\) Buat IoT Flow di Navixy

* Setelah flow dibuat, hubungkan node Webhook di bagian tempat Anda ingin mengirim data.
* Ikuti struktur yang sama seperti panggilan API. Di kolom URL, masukkan endpoint permintaan:

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

* Di bagian Headers:
* Key: Content-Type
* Value: application/json
* Terakhir, di body permintaan, sertakan parameter telemetri yang ingin Anda kirim, pastikan untuk menyertakan kembali chat\_id, misalnya:

{

"chat\_id": X,

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

}

![](/files/d2ce30030f34f1fea63d9ef00b86980f03ba8de2) ![](/files/a7a2bd855709fea4e7b630bc5db9a3ad5a54c4ae)

Dengan langkah-langkah ini, bot Anda akan dapat menerima pesan dengan sukses, termasuk data telemetri otomatis dari 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/id/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.
