How to set previous node's output/payload as an input in .html file of a current custom node?

I am creating a custom node, in which I need to use the previous node's output as input in the current node. for that, I was trying to set "msg.payload" as a value at line number 6, but its not working.

Welcome to the community. You will, I'm afraid, need to go back and re-read the Node-RED docs on creating custom nodes.

There are three elements to a node. The html file that you have shown and which is inserted into the Editor when you open a Node's settings. The javascript file that is executed partly when Node-RED starts, partly when you add a deply node instance to a flow and partly when you send a msg to a node instance. And finally, the overarching description and config in the node's package.json file. You need all three parts if you want to create a custom node.

It is the javascript file that handles incoming msgs not the html file. And you shouldn't be using a node's Editor panel to show the content of a msg. There is separation between the Editor and the runtime. In the future, you may not even need/want the editor for some things. The editor isn't meant to be a dashboard.

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