Variables
Variables allow you to select data within your workflow. Some come from the Begin step or a module; others are values you save as the workflow runs. You can define your own workflow variables and use them in later steps.
Variable Selector
JSON type: global_var_selector.
Selects a named value available at this point in the workflow or trigger. expression is its exact key, including capitalization. props optionally selects fields within that value. This parameter has no children.
For a workflow with an input_record input containing an email field, this returns that email address. If input_record is a foreign key, Middle follows it to the synced record before reading the field.
{
"type": "global_var_selector",
"expression": "input_record",
"props": ["email"]
}For a declared workflow variable named points, this returns its current value. It is null until a step assigns it a value.
{
"type": "global_var_selector",
"expression": "points"
}Where the values come from
Source
JSON key in expression
Availability
Begin step input
The input field's key, such as input_record
Throughout the workflow. These fields do not need separate variable declarations.
Workflow variable
The declared key, such as points
Throughout that workflow execution. Starts as null; steps can assign and replace its value.
Module variable
The variable's key
In that module's workflows, using the connected account's value.
Begin step's full input
ROOT_INPUT
In assignments on the Begin step.
Action result
ACTION_OUTPUT
In that Action step's output assignments. Save the needed values in workflow variables to use them later.
File Export result
FILE_OUTPUT
In that File Export step's output assignments. Save the needed values in workflow variables to use them later.
Activity record
ACTIVITY
In an activity trigger's discard, requeue, and custom input parameters. References the synced record.
Prior activity record
PRIOR_ACTIVITY
In activity trigger parameters when the prior record version is included. Contains the previous record's values.
Start time
NOW
In workflows and triggers.
Now
NOW_REAL
In workflows and triggers.
Null, true, false
NULL, TRUE, FALSE
In workflows and triggers. These are values, not text.
The dropdown shows the values available in the current context. Trigger parameters run before the workflow, so they cannot read that workflow's declared variables. Pass values through the trigger's workflow input instead. ACTIVITY follows the current synced record when read; PRIOR_ACTIVITY is the saved prior version.
Selecting fields
props is an ordered path. For an object stored in a variable named customer, "props": ["address", "city"] selects customer.address.city. Use field keys from the input or variable's type, not their display labels. An omitted or empty props returns the entire value. A missing object field or related record returns null. Selecting a property that does not exist for the value's type can cause an error.
When selecting an object's foreign-key field, append ~ID to the field key to read just the ID. For example, this returns the customer ID from a sale object with a customer foreign-key field. To read a foreign key's complete record instead, use ~OBJECT as the next path element, such as ["customer", "~OBJECT"].
Older copied workflows can contain keys such as WORKFLOW:2 for a step's saved output. Keep those keys when reading an older workflow; new workflows should use declared variables and output assignments.
Now vs. Start time
Now is the time when this parameter is evaluated. Its JSON key is NOW_REAL.
Start time is the time the workflow was queued or the trigger activity occurred. Its JSON key is NOW. It stays the same when a workflow is re-executed or a trigger is requeued. Use it when a retry should make the same time-based decision as the original attempt.
Both return datetimes. Use Convert Timezone of Datetime or Format Date or Date Time when you need a particular local date or display format.
Parameter-scoped variable
JSON type: parent_np_selector.
Selects a value supplied by a surrounding array operation. These variables exist only inside that operation's per-item parameter; they are not workflow variables. expression is the full scoped key, and props can select a field from the value.
With "output_name": "items", Map, Filter, Sort, First Match, and Reduce provide items:value for the current item and items:index for its position in the source array, starting at 0. Reduce also provides items:acc for the accumulated value. Use different output names for nested operations so an inner operation does not hide the outer one's variables.
This complete Map parameter returns [10, 20]. The nested parent_np_selector reads each current item; it would not be valid on its own outside that Map.
See Array Manipulation for the child order and complete examples of each array operation.
Last updated
Was this helpful?

