# How to pass information from a sensor to my telegram bot

**URL:** <https://discourse.nodered.org/t/how-to-pass-information-from-a-sensor-to-my-telegram-bot/27839>\
**Category:** General\
**Created:** [5 June 2020 16:19 UTC](https://discourse.nodered.org/t/how-to-pass-information-from-a-sensor-to-my-telegram-bot/27839 "2020-06-05T16:19:25Z")\
**Posts on this page:** 3\
**Page:** 4

<div class="post-metadata">

**Author:** ![osancleca](https://avatars.discourse-cdn.com/v4/letter/o/ecccb3/32.png) [@osancleca](https://discourse.nodered.org/u/osancleca)\
**Post date:** [9 June 2020 20:39 UTC](https://discourse.nodered.org/t/how-to-pass-information-from-a-sensor-to-my-telegram-bot/27839/61 "2020-06-09T20:39:44Z")

</div>

Thank you for all the support provided, as you have helped me to identify the problem, I am going to ask in the general forum to see if a colleague gives me a hand and if in the end I solve it, I will come back here to put the solution for someone someday you are interested in how to solve it, I said many thanks for your time, greetings

---

<div class="post-metadata">

**Author:** ![troubleinparadise](https://avatars.discourse-cdn.com/v4/letter/t/278dde/32.png) [@troubleinparadise](https://discourse.nodered.org/u/troubleinparadise)\
**Post date:** [11 February 2021 02:40 UTC](https://discourse.nodered.org/t/how-to-pass-information-from-a-sensor-to-my-telegram-bot/27839/62 "2021-02-11T02:40:04Z")

</div>

Had this exact issue and the detail in this thread is pretty much the only thing I could find on google. Since the final working solution was not actually posted, I figured it out for my own purposes and added here in case it helps someone else.

```auto
[{"id":"bd8e31c9.41f47","type":"chatbot-telegram-receive","z":"13f5d38f.51b8ac","bot":"194b8e9b.918651","botProduction":"","x":150,"y":180,"wires":[["b002eb3e.8b1e68"]]},{"id":"89028f38.da245","type":"chatbot-telegram-send","z":"13f5d38f.51b8ac","bot":"194b8e9b.918651","botProduction":"","track":false,"passThrough":false,"errorOutput":false,"outputs":0,"x":890,"y":180,"wires":[]},{"id":"b002eb3e.8b1e68","type":"chatbot-command","z":"13f5d38f.51b8ac","name":"","command":"/temps","x":330,"y":180,"wires":[["b1e5b6d4.428968"]]},{"id":"db79d19a.f22b4","type":"chatbot-message","z":"13f5d38f.51b8ac","name":"","message":[{"message":"Outside temperature is {{payload.content}} degrees\n"}],"language":"none","x":690,"y":180,"wires":[["89028f38.da245"]]},{"id":"3663cd1.3701b32","type":"link in","z":"13f5d38f.51b8ac","name":"Mkbedroom","links":["a438198e.f91a38"],"x":75,"y":260,"wires":[["978e7a4a.83c3c8"]]},{"id":"b1e5b6d4.428968","type":"change","z":"13f5d38f.51b8ac","name":"Outside temp","rules":[{"t":"change","p":"payload.content","pt":"msg","from":"/temps","fromt":"str","to":"outsidetemp","tot":"flow"}],"action":"","property":"","from":"","to":"","reg":false,"x":490,"y":180,"wires":[["db79d19a.f22b4"]],"info":"Replace the message command with the figure saved to the Flow context from the external data source"},{"id":"978e7a4a.83c3c8","type":"change","z":"13f5d38f.51b8ac","name":"","rules":[{"t":"set","p":"outsidetemp","pt":"flow","to":"payload","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":260,"y":260,"wires":[[]],"info":"Save the external data source to the Flow context"},{"id":"a2e66f5f.b26d1","type":"comment","z":"13f5d38f.51b8ac","name":"External data source","info":"In my case, this is from an MQTT link node sending a temperature payload every 20 seconds","x":210,"y":300,"wires":[]},{"id":"4a6215e4.2bab0c","type":"comment","z":"13f5d38f.51b8ac","name":"Main Flow","info":"","x":150,"y":140,"wires":[]},{"id":"194b8e9b.918651","type":"chatbot-telegram-node","botname":"yourbot-here","usernames":"","providerToken":"","polling":"1000","store":"","log":"","debug":false,"webHook":"","connectMode":"polling"}]

```

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)\
**Post date:** [25 February 2021 02:40 UTC](https://discourse.nodered.org/t/how-to-pass-information-from-a-sensor-to-my-telegram-bot/27839/63 "2021-02-25T02:40:56Z")

</div>

Closed on 25 February 2021 02:40 UTC

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.

[Previous page](https://discourse.nodered.org/t/how-to-pass-information-from-a-sensor-to-my-telegram-bot/27839.md?page=3)
