Change node / Telegram message

My MQTT data looks like this:
{"topic": "heating/Hz system/flow temperature", "payload":33, "qos":0, "retain":false,"_msgid": "446dfe39.cc451"}

How could a change or function node look like that I can send the payload value (="33") including a text ("The value is: xxxx") with telegram messenger with this node

?

Thx guys
duffy6

Have you got the telegram bot set up yet?

When you have, send some test messages to get the feel for it.

Assuming you have those things working, all you need to do is to combine the payload into a string. I'd probably use JSONata for that since all you would need is "The value is: " & payload (actually you may need to wrap the payload in a function to turn it into a string, I can't quite remember.

Or just use a template node...

1 Like

The template node allows you to use mustache to format output. Not to be confused with the Dashboard's ui_template node.

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