Get msg.payload value in exec node

I wanted to get the output from http post method which is in msg.payload form to the exec node. How can get it?

You tick the box that says "+ Append"

This will add the msg.payload to the end of the command executed.

If @hardillb's answer does not do what you want then tell us what command you are trying to run in the exec node.

I tried adding template node before exec node.

Well that is probably the best way if you want to include the payload value into the command.

If what you are trying to ask is how to include the value of msg.payload.ChillerName into a template string then the first example in the help pane for the template node shows you how to do that. In the example there the value is in

Okay. But What if I want a string message to get in template node. For example, I have print("Success") in python and I want to get this to template node, but it saying invalid identifier.

It doesn't matter where it came from, what does it look like in a debug node?

If you want to get the output of the python into a template node then you have to feed it into a template node.

I am wondering whether you may not fully understand some of the basic principles of node-red. I recommend watching this playlist: Node-RED Essentials. The videos are done by the developers of node-red. They're nice & short and to the point. You should understand a whole lot more in about 1 hour. A small investment for a lot of gain.

Thank you!

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