Flow Data
Flows use JSON data which is passed between actions as an automation executes.
Data
Referenced as data
, data
is the primary reference point when accessing JSON data generated by an executing automation. data
is persistent for a single flow path.
data
also contains a special datastore called action
which is used to store the outcome of the last object. This storage is temporary and only lasts until the next action is completed.
NOTE When a flow path reaches a fork ( multiple possible paths ) there is no way for any of the paths to access data added or changed by another path. The paths will only have access to the data that have come before.
Other Data Types
Two other data types exist that contain similar data structure to data
but are more persistent.
NOTE Only data
contains the special datastore called action
eventData
- persistent for a given event
triggerData
- persistent for an entire automation execution across multiple events
It maybe easier to think of data
as being more like a local variable, whereas eventData
and triggerData
are more like global variables.
Variables
Referenced as var
, var
is a quick reference to accessing flow variables that have been defined within data.
Variable data comes in three scopes.
{ "var" : { "local" : {}, "event" : {}, "trigger" : {} } }
Action
Referenced as action
action
is a special pointer allowing you to access data generated on a given action. This is required because data[action]
references the previous action.
action
makes it possible to define variables on an action containing data that the action has generated