Inject node is an input node used to initialize aflow. You can initialize the flow either manually or automatically using configured time interval. Message object in injects node has payload and topic. By default, the payload is a current timestamp.
Debug node is output node used to show messages to debug console This will be very useful during development of flow. usually, the data received from other nodes are input to this debug node
This always displays msg object with payload to debug console
Function node is one of core node of node red palette
The function always returns msg object or null. null means no message received
As you see below the screenshot, flow is Inject Node –> Function Node –> Debug Node.
Inject node initiates with an interval of 1 second which sends the request to the Function node. Function node return msg object to debug node to log msg payload to debug console
Use node.send(msg) to send the asynchronous request. Normally Function node basically sends the msgs once the request comes. When asynchronous used, It will not send the request immediately until asynchronous is completed
Save data to the context store during code execution You need to store data in context. Context is kind of global way of storing and sharing data across different nodes. Context has three scopes **Node scope - ** is limited to a specific node. Flow scope - is accessible to all nodes on the same flow context Global scope - is data store in this is accessible to all nodes across all flows