Docs

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

ReferenceReads
{{ 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 the each of a $map (an app step argument that is a list of rows, built one row per record): a field of the record being mapped. A Map step's JavaScript reads its inputs differently: Built-in Steps describes it.

System values

ReferenceValue
{{ 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

Lists built from earlier records

An app step argument that is a list of rows can be built one row per record of an earlier output with { "$map": "{{ steps.<stepId>.output }}", "each": { ... } }: inside each, {{ item.<field> }} reads the record being mapped, as in { "$map": "{{ steps.<stepId>.output }}", "each": { "sku": "{{ item.sku }}", "qty": "{{ item.quantity }}" } }. $map works only in such an argument. A Map step is JavaScript instead: Built-in Steps describes it.

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.

slotWhere
stepsThe top level of the workflow.
bodyInside a loop, a folder, or a step that pages in batches: the steps that run for each item or page.
thenThe If/Else lane that runs when its conditions are true.
elseThe 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.

operatorTestsvalue
eqEqualsone value
neDoes Not Equalone value
gtIs Greater Thanone value
ltIs Less Thanone value
gteIs Greater Than or Equalsone value
lteIs Less Than or Equalsone value
containContainsone value
ncontainDoes Not Containone value
betweenIs Betweena list of values
existExistsno value
nexistDoes Not Existno value
includesIncludesa list of values
emptyIs Emptyno value
nemptyIs Not Emptyno value
startsWithStarts Withone value
nstartsWithDoes Not Start Withone value
endsWithEnds Withone value
nendsWithDoes Not End Withone value

How values compare when the step runs:

  • gt, gte, lt, lte and between compare a field of type string with its value character by character, by character code: alphabetical, and case-sensitive, with every capital letter before every lowercase one ("Z" < "a").
  • eq and ne compare the two as text, so 5 eq "5" holds; contain and ncontain look for the value anywhere in the field, and startsWith, nstartsWith, endsWith and nendsWith at its start or end, all case-sensitive ("dana" does not start with "D").
  • In an If/Else condition between excludes its two ends: between [1, 10] holds for 2 to 9. A step filter's between includes them.
  • Use type number to compare numbers as numbers and type date to compare dates.

Paging a step

An app step whose action reads in pages takes the pagination option, { mode, size, page, rememberPage, resetWhenTotalReached, maxPagesPerRun, onMaxPages }; Get Workflow Step Schema says whether the action pages, which modes it takes and its page size bounds. Unset or null, paging is off: the step makes one request for the first page only, at the action's default page size (Get Workflow Step Schema's size.default: the app's default, 25 when it sets none), so a list longer than one page is cut short. To read more, set pagination: mode all reads every page of an action that can ask for later pages; an action that pages by size only takes mode single (Get Workflow Step Schema lists the modes an action takes), so raise its size, up to size.max.

modeReads
singleOne request: the page given by page (1 by default) of size records.
allEvery page, read one after another in this run, returned as one output.
batchOne page at a time: the steps nested inside this step run for each page before the next is read.
SettingMeaning
modesingle, all, batch: how pages are read (below).
sizeRecords per page, within the size bounds Get Workflow Step Schema answers.
pagesingle mode: the page to read, from 1.
rememberPagebatch mode: the next run starts after the last page read, instead of at the first.
resetWhenTotalReachedbatch mode with rememberPage: start over at the first page once every page was read.
maxPagesPerRunbatch mode: read at most this many pages in a run.
onMaxPagesbatch mode: end or continue, what the run does after maxPagesPerRun pages.

Run Universal Action pages with limit and offset for every provider, including those that page by cursor: MindCloud reads as many of the provider's pages as offset + limit needs, up to 5,000 rows. meta.cursor in its answer is the provider's own cursor, for information; it cannot be sent back.