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

# Comment connecter Telegram à Navixy IoT Logic

Intégrez un bot Telegram à Navixy IoT Logic pour envoyer des notifications automatisées. Configurez le bot, définissez l'ID de chat et connectez le Webhook.

Voici un guide rapide des étapes qui peuvent être suivies pour créer la connexion entre IoT Logic et Telegram.

1. Créer un bot et obtenir votre jeton

* Dans Telegram, ouvrez la conversation avec @BotFather.
* Exécutez la commande /newbot.
* Suivez les instructions et copiez le jeton du bot fourni (il ressemble à : 123456:ABC-...).

2. Obtenez le chat\_id auquel vous souhaitez envoyer un message

Voici les façons courantes de le faire :

* Envoyez un message à votre bot (ou ajoutez-le à un groupe et envoyez-y un message).
* Appelez ensuite la méthode getUpdates de l'API Telegram.
* S'il s'agit d'un groupe, le chat\_id est généralement un nombre négatif.
* Assurez-vous que le bot a reçu au moins un message afin qu'il apparaisse dans getUpdates.

<figure><img src="https://938069364-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. Envoyer le message (appel REST)

* Utilisez la méthode sendMessage de l'API Telegram.
* Dans le corps de la requête, incluez le chat\_id et le texte du message.
* La requête doit être envoyée au format JSON avec l'en-tête Content-Type: application/json.

<figure><img src="https://938069364-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. Créer le flux IoT dans Navixy

* Une fois le flux créé, connectez le nœud Webhook dans la section où vous souhaitez envoyer les données.
* Suivez la même structure que l'appel API. Dans le champ URL, placez le point de terminaison de la requête :

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

* Dans la section des en-têtes :
* Clé : Content-Type
* Valeur : application/json
* Enfin, dans le corps de la requête, incluez les paramètres de télémétrie que vous souhaitez envoyer, en veillant à inclure à nouveau le chat\_id, par exemple :

{

"chat\_id": X,

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

}

![](https://938069364-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FIgDb43gtyXcm1Av4h1np%2Fuploads%2Fgit-blob-3ffecccdbc856d2256330f9ead8b2c6556fea221%2Funknown.png?alt=media) ![](https://938069364-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FIgDb43gtyXcm1Av4h1np%2Fuploads%2Fgit-blob-f5de8300a0b21fe30afa42ef8ebf93a335d88ead%2Funknown.png?alt=media)

Grâce à ces étapes, votre bot pourra recevoir des messages avec succès, y compris des données de télémétrie automatisées provenant de 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/fr/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.
