Send Telegram Bot a value only if requested


Hi everyone, I'm trying to use a Telegram bot to receive a measure from the Serial node. I need to have a continuous measure to use it in the dashboard but I also want to see that measure in my telegram bot when requested. The idea is to send my bot a word and receive the measure as an answer. Example: send: "Voltage" // answer: "1 V".

My program:

The problem is that the bot is answering continously and not on my request.

Any help is appreciated. Thanks!



Hi @mvas

you need to split this into two separate flows.

In the top flow, add a Change node to store the latest value in flow context (set flow.myValue to msg.payload (assuming the reading is in msg.payload..))

Then in the telegram-triggered flow, you can use a Change node to retrieve that flow context value (set msg.payload to flow.myValue) and send it on.




I've do it and It worked perfectly.

Thank you Nick