How to pass the data

Flow, is designed based on each node. It contains the data defined for node input / output. To control flow or add a program using data, you need to understand the data basics.

  • global data is available throughout the Automation Studio.
  • flow data is the data shared in that flow.
  • msg data is passed through the node's inputs and outputs. The data of global, flow and msg are the Java Script Object Notation (JSON).

You may need to select each data in the node properties settings. For example, the msg.payload is the body data used by the HTTP response node. If you pass the msg.payload = {"code": "200"}, you will receive a {"code": "200} as the response body. Or even receive new data like msg.output = {"hello" : "hello"}. You can add the string Hi in the next node through msg.output.hello.

In addition, the Config node added to the Automation Studio allows you to predefine the variables used by Flow. The data set via this node can be read via flow.get("metadata").