Workflow References
How a step's settings read trigger and step output, the current loop item, inputs and system values; where a step can go; and what an If/Else condition can test.
A value in a step's or trigger's configuration can read data from earlier in the run with a reference in double braces, such as {{ steps.<stepId>.output[0].email }}. Text around a reference is kept: Hello {{ steps.<stepId>.output[0].firstName }}. Update Workflow Step Configuration refuses a reference to a step that does not come before the one being set up, and Get Workflow Step Schema lists the output fields each step offers.
References
| Reference | Reads |
|---|---|
{{ steps.<stepId>.output }} | Every record a step returned, as a list. The step must come before the one that references it. |
{{ steps.<stepId>.output[0].<field> }} | One field of one record: [0] is the first record. Dot further into nested objects: output[0].address.city. |
{{ steps.<stepId>.output[].<field> }} | That field of every record, as a list. |
{{ steps.<loopStepId>.output[0].<field> }} | Inside a loop: the current item. Each run of the loop's body sees the loop step's output as a list holding just that item. |
{{ trigger.<triggerId>.output... }} | The trigger's output, addressed the same way as a step's (a webhook's body, query and headers; an app event's records). |
{{ workflow.inputs.<key> }} | A workflow variable's value for the run's environment (Get Workflow Inputs). |
{{ function.inputs.<key> }} | Inside a function: an input the calling workflow passed. |
{{ integration.metadata.<key> }} | In an integration workflow: a value from the installation's metadata. |
{{ system.<name> }} | A value the platform supplies when the step runs: one of the names below. |
{{ memory.<path> }} | A value a Memory step stored earlier, by its path. |
{{ item.<path> }} | Inside a $map in a Map step: a field of the item being mapped. |
System values
| Reference | Value |
|---|---|
{{ system.environment }} | Environment |
{{ system.installationId }} | Installation Id |
{{ system.lastSuccessfulStartedOn }} | Last Successful Start Date |
{{ system.lastSuccessfulFinishedOn }} | Last Successful Finish Date |
{{ system.now }} | Now |
{{ system.oneHourAgo }} | 1 Hour Ago |
{{ system.sixHoursAgo }} | 6 Hours Ago |
{{ system.twelveHoursAgo }} | 12 Hours Ago |
{{ system.oneDayAgo }} | 1 Day Ago |
{{ system.oneWeekAgo }} | 1 Week Ago |
{{ system.oneMonthAgo }} | 1 Month Ago |
{{ system.twoMonthsAgo }} | 2 Months Ago |
{{ system.threeMonthsAgo }} | 3 Months Ago |
{{ system.sixMonthsAgo }} | 6 Months Ago |
{{ system.oneYearAgo }} | 1 Year Ago |
Where a step goes
Add Workflow Step and Duplicate Workflow Step take a position: { parentStepId, slot, afterStepId }. Set Workflow Step Order nests steps under the same slot names.
| slot | Where |
|---|---|
steps | The top level of the workflow. |
body | Inside a loop, a folder, or a step that pages in batches: the steps that run for each item or page. |
then | The If/Else lane that runs when its conditions are true. |
else | The If/Else lane that runs otherwise. |
If/Else conditions
An If/Else step's condition argument is a condition, { field, operator, value, type }, or a group, { conjunction, where }: conjunction is and or or and each item of where is a condition or another group. disabled: true on a condition or group turns it off. field and value are text or references; type says what to compare them as: string, number, boolean, date, array, object. Get Workflow Step Schema describes the arguments of an If/Else step you have added.
| operator | Tests | value |
|---|---|---|
eq | Equals | one value |
ne | Does Not Equal | one value |
gt | Is Greater Than | one value |
lt | Is Less Than | one value |
gte | Is Greater Than or Equals | one value |
lte | Is Less Than or Equals | one value |
contain | Contains | one value |
ncontain | Does Not Contain | one value |
between | Is Between | a list of values |
exist | Exists | no value |
nexist | Does Not Exist | no value |
includes | Includes | a list of values |
empty | Is Empty | no value |
nempty | Is Not Empty | no value |