# Change node / Telegram message

**URL:** <https://discourse.nodered.org/t/change-node-telegram-message/23365>\
**Category:** General\
**Created:** [20 March 2020 19:47 UTC](https://discourse.nodered.org/t/change-node-telegram-message/23365 "2020-03-20T19:47:41Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![duffy6](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/duffy6/32/18594_2.png) [@duffy6](https://discourse.nodered.org/u/duffy6)\
**Post date:** [20 March 2020 19:47 UTC](https://discourse.nodered.org/t/change-node-telegram-message/23365/1 "2020-03-20T19:47:41Z")

</div>

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

> **[node-red-contrib-telegrambot](https://flows.nodered.org/node/node-red-contrib-telegrambot)**
>
> Telegram bot nodes.

?

Thx guys  
duffy6

---

<div class="post-metadata">

**Author:** ![TotallyInformation](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/totallyinformation/32/31_2.png) [@TotallyInformation](https://discourse.nodered.org/u/TotallyInformation)\
**Post date:** [20 March 2020 21:07 UTC](https://discourse.nodered.org/t/change-node-telegram-message/23365/2 "2020-03-20T21:07:18Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![dceejay](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dceejay/32/38_2.png) [@dceejay](https://discourse.nodered.org/u/dceejay)\
**Post date:** [20 March 2020 22:46 UTC](https://discourse.nodered.org/t/change-node-telegram-message/23365/3 "2020-03-20T22:46:18Z")

</div>

Or just use a template node...

---

<div class="post-metadata">

**Author:** ![TotallyInformation](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/totallyinformation/32/31_2.png) [@TotallyInformation](https://discourse.nodered.org/u/TotallyInformation)\
**Post date:** [21 March 2020 01:29 UTC](https://discourse.nodered.org/t/change-node-telegram-message/23365/5 "2020-03-21T01:29:58Z")

</div>

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

---

<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:** [20 May 2020 01:30 UTC](https://discourse.nodered.org/t/change-node-telegram-message/23365/6 "2020-05-20T01:30:03Z")

</div>

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