A flow works by passing messages between nodes. The messages are simple JavaScript objects that can have any set of properties.

Messages usually have a payload property - this is the default property that most nodes will work with.

Flow also adds a property called _msgid - this is an identifier for the message which can be used to trace its progress through a flow.

    "_msgid": "12345",
    "payload": "..."

The value of a property can be any valid JavaScript type, such as:

  • Boolean - true, false
  • Number - eg 0, 123.4
  • String - "hello"
  • Array - [1,2,3,4]
  • Object - { "a": 1, "b": 2}
  • Null

More information about JavaScript types

Understanding the structure of a message

The easiest way to understand the structure of a message is to pass it to a Debug node and view it in the Debug sidebar.

By default, the Debug node will display the msg.payload property, but can be configured to display any property or the whole message.

When displaying an Array or Object, the sidebar provides a structured view that can be used to explore the message.

  • At the top it shows the name of the property that has been passed in. Here, the default msg.payload has been used.
  • Next to the property name is the type of the property - Object, String, Array etc.
  • It then shows the contents of the property. For Arrays and Objects, the property is collapsed into a single line. By clicking on it, the property will expand to show more detail.