# Send the value of msg.payload from template to another one

**URL:** <https://discourse.nodered.org/t/send-the-value-of-msg-payload-from-template-to-another-one/45926>\
**Category:** Dashboard\
**Created:** [19 May 2021 14:53 UTC](https://discourse.nodered.org/t/send-the-value-of-msg-payload-from-template-to-another-one/45926 "2021-05-19T14:53:50Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![oualid](https://avatars.discourse-cdn.com/v4/letter/o/8dc957/32.png) [@oualid](https://discourse.nodered.org/u/oualid)\
**Post date:** [19 May 2021 14:53 UTC](https://discourse.nodered.org/t/send-the-value-of-msg-payload-from-template-to-another-one/45926/1 "2021-05-19T14:53:50Z")

</div>

it's possible to send the value of msg.payload or topic from template to another one.  
if yes, could you please show me the flow of nods should i used to reach my goals.  
what i intend to do in details:  
1- in first template i have 10 ui\_switch  
2- in the second template i have svg img  
what i want to do is when i activate the first switch, i get the value of msg.payload in the second template and i execute js code in order to change the color of a particular element in my svg img.

thank you for your help.

---

<div class="post-metadata">

**Author:** ![Steve-Mcl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/steve-mcl/32/4826_2.png) [@Steve-Mcl](https://discourse.nodered.org/u/Steve-Mcl)\
**Post date:** [19 May 2021 14:58 UTC](https://discourse.nodered.org/t/send-the-value-of-msg-payload-from-template-to-another-one/45926/2 "2021-05-19T14:58:07Z")

</div>

If you use node-red-contrib-ui-svg this becomes trivial

---

<div class="post-metadata">

**Author:** ![oualid](https://avatars.discourse-cdn.com/v4/letter/o/8dc957/32.png) [@oualid](https://discourse.nodered.org/u/oualid)\
**Post date:** [19 May 2021 15:06 UTC](https://discourse.nodered.org/t/send-the-value-of-msg-payload-from-template-to-another-one/45926/3 "2021-05-19T15:06:47Z")

</div>

thank you for response.  
i used "Inskscape" to create my svg img and then i call it with html object

thank you

---

<div class="post-metadata">

**Author:** ![Steve-Mcl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/steve-mcl/32/4826_2.png) [@Steve-Mcl](https://discourse.nodered.org/u/Steve-Mcl)\
**Post date:** [19 May 2021 15:11 UTC](https://discourse.nodered.org/t/send-the-value-of-msg-payload-from-template-to-another-one/45926/4 "2021-05-19T15:11:55Z")

</div>

There is LOTS of info and tons of examples in the [readme](https://flows.nodered.org/node/node-red-contrib-ui-svg) and the [wiki](https://github.com/bartbutenaers/node-red-contrib-ui-svg/wiki)

---

<div class="post-metadata">

**Author:** ![oualid](https://avatars.discourse-cdn.com/v4/letter/o/8dc957/32.png) [@oualid](https://discourse.nodered.org/u/oualid)\
**Post date:** [20 May 2021 19:02 UTC](https://discourse.nodered.org/t/send-the-value-of-msg-payload-from-template-to-another-one/45926/5 "2021-05-20T19:02:07Z")

</div>

Finally, i find the solution.  
In fact, i used the "_websocket out_" node to send the value of msg.payload from template to another one.

---

<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:** [3 June 2021 19:02 UTC](https://discourse.nodered.org/t/send-the-value-of-msg-payload-from-template-to-another-one/45926/6 "2021-06-03T19:02:22Z")

</div>

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