Docs

Get Workflow Definition

Read a workflow's whole structure in one call: its properties, its triggers, and its steps as a tree in execution order. Read the draft the editor shows, the published version that runs, or any saved version. Step settings are not included yet.

GET

Path

Path parameters
stringrequired

The workflow's id, from List Workflows.

Headers

Optional headers
string

Optional. The id of a child organization of your API key's company to act on. Leave it out to act on the key's own company. See Child organizations.

Query

Arguments
string

draft (the default), published, or a version label from List Workflow Versions.

draft (the default, what the editor shows), published (what runs), or a version label from List Workflow Versions, such as 0.0.14.

Default: draft

Response fields

idstring

The workflow's id.

namestring

The workflow's name.

typestring

workflow, or function for a workflow other workflows call.

isActiveboolean

Whether the published version runs on its triggers.

environmentIdstring

The environment the workflow runs in. Null for the default environment.

tagsarray of string

Ids of the tags on the workflow.

versionstring

The version this answer describes: draft, or the saved version label.

publishedVersionstring

The version that runs. Null when the workflow was never published.

changesSincePublishnumber

How many draft edits are not published yet.

revisionstring

The draft's revision: send it in If-Match on your next change to the draft. Null when reading a saved version, which never changes.

triggersarray of objects

What starts the workflow. A workflow can have several.

  • idstring

    The trigger's id.

  • namestring

    The trigger's display name.

  • appSlugstring

    What starts the workflow: schedule, webhook, runWorkflow (when another workflow calls it), or the app whose event does.

  • appVersionstring

    The app version the trigger is pinned to. "0" for built-in triggers.

  • actionIdstring

    The app event the trigger listens for. Null for a built-in trigger.

  • isDisabledboolean

    True when the trigger is turned off.

  • isConfiguredboolean

    Whether the trigger passed the editor's validation. Null when it was never validated.

stepsarray of objects

The steps, top level first, in execution order. A step that holds others carries them in body (a loop, folder or batch step) or then and else (an If/Else).

  • idstring

    The step's id. Stable across edits; never positional.

  • numbernumber

    The number the editor shows for this step, in execution order. Null for a folder, which the editor does not number.

  • namestring

    The step's display name.

  • appSlugstring

    The app the step runs, or the built-in step type (iterate, ifElse, map, ...).

  • appVersionstring

    The app version the step is pinned to. "0" for built-in step types.

  • actionIdstring

    The app action the step runs. Null for a built-in step type.

  • functionIdstring

    The function this step calls, for a function call step.

  • parentStepIdstring

    The step this one sits inside (a loop, group, folder or if/else). Null at the top level.

  • slotstring

    Where the step sits in its parent: steps (the top level), body (a loop, group or folder), then or else (an if/else lane).

    • steps
    • body
    • then
    • else
  • depthnumber

    How deeply the step is nested. 0 at the top level.

  • isDisabledboolean

    True when the step is turned off and runs skip it.

  • isConfiguredboolean

    Whether the step passed the editor's validation (required values set, connection chosen). Null when it was never validated.

  • bodyarray

    Steps nested inside this one, in order. Present when it has any; each has the same keys.

  • thenarray

    Steps nested inside this one, in order. Present when it has any; each has the same keys.

  • elsearray

    Steps nested inside this one, in order. Present when it has any; each has the same keys.