Flow steps
A flow check runs several steps, joined by next and branches, with values passed between them. This page lists the fields of a flow and of every step type, how templates and saved values work, and what the flow editor checks before it saves. For a walkthrough, see Build a flow.
Flow fields
Section titled “Flow fields”| Field | Type | Required | Default | What it does |
|---|---|---|---|---|
type |
"flow" |
yes | ||
steps |
array, 1–50 | yes | The steps, below. | |
start |
step id | no | the first step | The step the flow starts at. |
timeoutMs |
integer, 100–900,000 | no | 120,000 | Time for the whole flow. |
assert.expression |
expression | no | Checked after the last step. Falsy: the run is failed. |
|
value |
expression | no | none | A number stored as output.value, such as vars.stuck. |
Step fields
Section titled “Step fields”| Field | Type | Required | Default | What it does |
|---|---|---|---|---|
id |
string | yes | Letters, digits and _, starting with a letter or _, up to 63 characters. Unique in the flow. Expressions refer to the step’s output by it. |
|
type |
step type | yes | An action (http, postgres, mysql, mongodb, redis, elasticsearch, promql, dynatrace, script, integration) or a control step (assert, branch, set, wait, poll, log, compare). |
|
title |
string, up to 200 | no | Shown on the canvas and in run results. | |
config |
object | no | {} |
The step’s settings. Strings may hold ${…} templates. |
outputs |
array, up to 20 | no | [] |
Values to save after the step: { "name": "token", "expr": "output.json.token" }. Each becomes vars.<name>. |
branches |
array, up to 20 | no | [] |
{ "condition": "…", "next": "<step id>" }, checked in order after the step. The first truthy one decides the next step. |
next |
step id or null |
no | null |
The next step when no branch matches. null ends the flow. |
continueOnError |
boolean | no | false |
A failure becomes the output { "failed": true, "error": "…" } instead of ending the run. |
retry.maxAttempts |
integer, 1–10 | no | 1 | Tries before the step fails. |
retry.delayMs |
integer, 0–60,000 | no | 1,000 | Wait before the first retry. It doubles each time, up to 30 s. |
timeoutMs |
integer, 100–900,000 | no | A limit for this step, in addition to the action’s own timeout. Running out ends the step with timeout. |
|
position |
{ x, y } |
no | Where the editor draws the step. |
A step can’t lead to itself: use a poll step to repeat something. Every next and branch target must be a step in the flow.
How a flow runs
Section titled “How a flow runs”- The flow starts at
start, or the first step. - The step’s config is rendered (templates filled in), validated and run. Its result is saved under the step’s id.
- Each entry in
outputsis evaluated withoutputset to the step’s result and saved intovars. A step that failed withcontinueOnErrorsaves no outputs. - Branches are checked in order with
outputset. The first truthy condition picks the next step; otherwisenextdoes.nullends the flow. - At the end, the flow’s own
assert.expressionandvalueare evaluated.
How a run ends:
| What happened | Run status |
|---|---|
| Every step ran, the flow’s assert held | ok |
An assert or compare step, or the flow’s assert, didn’t hold |
failed |
| A step’s action failed (unreachable, refused, bad config, a script exiting non-zero) or an expression failed | error |
| A step, a poll or the flow ran out of time | timeout |
Retries apply to errors and timeouts only. An assert or compare that doesn’t hold is never retried. A non-2xx HTTP answer is a result, not an error, so it isn’t retried either: branch on output.status instead.
A run stops with error after 500 step runs (“The flow ran more than 500 steps. Check its branches for a loop.”).
What expressions see
Section titled “What expressions see”Every expression in a flow (branch conditions, outputs, assert, set, compare, poll.until, and the flow’s assert and value) sees:
| Name | What it is |
|---|---|
<step id> |
That step’s output, such as login.json.token or billing.first.email. Only steps that already ran. |
steps.<step id> |
The same, by its full name. |
vars.<name> |
Values saved by outputs and set steps. |
params.<name> |
The run’s parameter values. |
trigger |
How the run started: trigger.type, trigger.body (a webhook’s JSON body). |
meta.startedAt |
When the flow started, as an ISO time. |
output |
The current step’s result. Only in outputs, branch conditions and poll.until. |
An action step’s output is the action’s full result, as listed for each type in Check types. For example, an http step’s output has status, ok, headers, body, json, text, bytes, truncated, durationMs, finalUrl and certificate. A step that failed with continueOnError has the output { "failed": true, "error": "…" }.
Templates
Section titled “Templates”Strings in a step’s config may hold ${…} templates. What is inside is an expression over the names above, such as "Bearer ${vars.token}" or "/orders/${vars.orderId}".
- A string that is exactly one template keeps the value’s type:
"${vars.limit}"gives a number, and an object stays an object. - Otherwise the values are inserted as text: objects as JSON,
nulland missing values as nothing. - These fields are expressions already, so they are evaluated as written, without templates:
assert.expression,set.vars,compare.valuesandpoll.until.compare.expectedmay hold a template. - A
pollstep renders its action’s config again on every attempt. - The config is checked after rendering. A value that doesn’t fit fails the step, for example
config.url must start with http:// or https:// (after rendering templates). - When saving, a config with templates is checked only for required fields. A
connectionIdmust be a real connection id, not a template.
Saved values
Section titled “Saved values”outputs and set steps save values into vars. Later steps read them as vars.<name> in expressions and ${vars.<name>} in templates. Names use letters, digits and _, starting with a letter or _.
Saved values also fill connection variables (below), as text.
Connection variables
Section titled “Connection variables”A connection’s non-secret settings may hold ${name} placeholders, such as a base URL of https://${env}.example.com. Every action step can take config.connectionVars to fill them. Each name takes the first value found in this order:
- The step’s
connectionVars(empty values are skipped). They may hold templates. - The flow’s saved values so far (
vars). - The run’s parameters.
- Top-level fields of a webhook trigger’s body.
A name nobody sets fails the step: The connection "<name>" needs a value for ${env}. Set it under connection variables in the monitor or step, add a parameter with that name, save it as a flow value, or send it in the webhook body.
Action steps
Section titled “Action steps”An action step’s config is the check of that type without type, assert and value. For http, it is the request object. Fields, limits and results are in Check types.
| Step type | Config | Connection |
|---|---|---|
http |
method, url, headers, query, body, timeoutMs, followRedirects, certificate, connectionId, connectionVars |
http, optional |
postgres, mysql |
connectionId, query, params, maxRows, timeoutMs, connectionVars |
postgres, mysql |
mongodb |
connectionId, collection, operation, filter, pipeline, limit, timeoutMs, connectionVars |
mongodb |
redis |
connectionId, command, args, timeoutMs, connectionVars |
redis |
elasticsearch |
connectionId, index, mode, query, window, size, aggregations, timeoutMs, connectionVars |
elasticsearch |
promql |
connectionId, query, perSeries, timeoutMs, connectionVars |
prometheus |
dynatrace |
connectionId, problemSelector, timeoutMs, connectionVars |
dynatrace |
script |
language, code, runtime, image, env, network, registryConnectionId, timeoutMs |
docker_registry, optional |
integration |
connectionId, action, params, connectionVars, timeoutMs |
any connection whose integration offers action |
In a flow, a script that exits with a code other than 0 fails its step with error. Its input file holds trigger, params, steps, vars and meta.
Integration steps
Section titled “Integration steps”An integration step runs one action of a connection: post to Slack, open a Jira issue, dispatch a GitHub workflow. The actions and their parameters are listed in Connection types.
{ "id": "notify", "type": "integration", "title": "Tell #deploys", "config": { "connectionId": "6f1c2a9e-0000-4000-8000-000000000010", "action": "sendMessage", "connectionVars": { "env": "prod" }, "params": { "text": "Checkout failed: ${recheck.error}", "channel": "#deploys" } }, "continueOnError": true, "next": "rollback"}Control steps
Section titled “Control steps”assert
Section titled “assert”Fails the run unless a condition holds.
| Field | Type | Required | Default | What it does |
|---|---|---|---|---|
expression |
expression | yes | Falsy: the run is failed here. |
|
message |
string, up to 500 | no | The failure reason, shown on the run and the alert. |
Output: { "passed": true }.
branch
Section titled “branch”Routes only. Its branches (and next) decide where to go. Config: {}. Output: { "branched": true }.
Computes values into vars.
| Field | Type | Required | Default | What it does |
|---|---|---|---|---|
vars |
object | yes | { "<name>": "<expression>" }. Evaluated in order, so a later value can use an earlier one. |
Output: the values it set.
Pauses before the next step.
| Field | Type | Required | Default | What it does |
|---|---|---|---|---|
delayMs |
integer, 1–300,000 | yes | How long to wait. |
Output: { "waitedMs": … }.
Repeats an action until a condition holds.
| Field | Type | Required | Default | What it does |
|---|---|---|---|---|
action.type |
action type | yes | Which action to repeat. | |
action.config |
object | yes | That action’s config. Rendered again on every attempt. | |
until |
expression | yes | Checked after every attempt, with output set to that attempt’s result. |
|
intervalMs |
integer, 100–300,000 | no | 5,000 | Wait between attempts. |
maxWaitMs |
integer, 100–900,000 | yes | Give up after this. |
Output: { "matched": true, "attempts": …, "output": <the last attempt's result> }. When until is still false at maxWaitMs, the step ends with timeout: `output.json.status == "paid"` still wasn't true after 12 attempts in 60000 ms.
Records a line in the run’s log.
| Field | Type | Required | Default | What it does |
|---|---|---|---|---|
message |
string, 1–2,000 | yes | The line. Templates work here. | |
level |
info, warn, error |
no | info |
Its level. |
Output: { "message": … }. A run keeps up to 50 log lines, in output.logs.
compare
Section titled “compare”Compares values from several steps, such as “the email in the CRM equals the email in billing”. A mismatch fails the run with the values in the message.
| Field | Type | Required | Default | What it does |
|---|---|---|---|---|
values |
expression[], 1–10 | yes | One expression per source, such as crm.json.email. |
|
operator |
eq, neq, gt, gte, lt, lte, contains, not_contains |
no | eq |
How to compare. |
expected |
string, up to 2,000 | no | Set: every value is compared with it. Templates work, such as ${params.expected}. |
|
as |
auto, number, text |
no | auto |
auto compares as numbers when both sides are numbers. |
message |
string, up to 500 | no | The failure reason. The values are appended. |
With expected, each value must pass operator against it. Without it, the values are compared with each other:
| Operator | The values must |
|---|---|
eq |
all be the same |
neq |
all be different |
gt, gte, lt, lte |
each be greater than / at least / less than / at most the next |
contains |
the first contains every other one |
not_contains |
the first contains none of the others |
contains on a list checks whether an item equals the value. Output: { "passed": true, "values": [ … ], "detail": "…" }.
Run results
Section titled “Run results”A flow’s stored result (output) has:
| Field | What it holds |
|---|---|
summary |
4 steps, ended at check, or …, stopped at <step id>. |
value |
The flow’s value, or null. |
steps |
One entry per step that ran: id, type, title, status (ok, failed, timeout, error or continued), durationMs, attempts, summary, error. |
vars |
The saved values at the end. |
logs |
Lines from log steps. |
failedStep |
The step the run stopped at. |
steps and vars are each cut to about 12 KB. The run’s error names the step: Step Sign in (login): No complete response within 10000 ms.
Example
Section titled “Example”A flow that places an order, waits for it to be paid, and checks the invoice. It uses two parameters, sku and env. When the order isn’t paid within a minute, it tells Slack and fails.
{ "type": "flow", "timeoutMs": 180000, "value": "wait_paid.attempts", "steps": [ { "id": "login", "type": "http", "title": "Sign in", "config": { "method": "POST", "url": "/login", "connectionId": "6f1c2a9e-0000-4000-8000-000000000011", "connectionVars": { "env": "${params.env}" }, "headers": { "content-type": "application/json" }, "body": "{\"user\":\"monitor\",\"password\":\"${trigger.body.password}\"}" }, "outputs": [{ "name": "token", "expr": "output.json.token" }], "branches": [{ "condition": "output.status != 200", "next": "login_failed" }], "next": "place" }, { "id": "place", "type": "http", "title": "Place an order", "config": { "method": "POST", "url": "/orders", "connectionId": "6f1c2a9e-0000-4000-8000-000000000011", "headers": { "authorization": "Bearer ${vars.token}", "content-type": "application/json" }, "body": "{\"sku\":\"${params.sku}\",\"quantity\":1}" }, "outputs": [{ "name": "orderId", "expr": "output.json.id" }], "retry": { "maxAttempts": 3, "delayMs": 2000 }, "next": "wait_paid" }, { "id": "wait_paid", "type": "poll", "title": "Wait until paid", "config": { "action": { "type": "http", "config": { "url": "/orders/${vars.orderId}", "connectionId": "6f1c2a9e-0000-4000-8000-000000000011", "headers": { "authorization": "Bearer ${vars.token}" } } }, "until": "output.json.status == \"paid\"", "intervalMs": 5000, "maxWaitMs": 60000 }, "continueOnError": true, "branches": [{ "condition": "output.failed", "next": "tell_slack" }], "next": "invoice" }, { "id": "invoice", "type": "postgres", "title": "Invoice", "config": { "connectionId": "6f1c2a9e-0000-4000-8000-000000000012", "query": "select amount from invoices where order_id = $1", "params": ["${vars.orderId}"], "maxRows": 1 }, "next": "amounts_match" }, { "id": "amounts_match", "type": "compare", "title": "Invoice matches the order", "config": { "values": ["place.json.total", "invoice.first.amount"], "operator": "eq", "as": "number", "message": "The invoice amount differs from the order" } }, { "id": "tell_slack", "type": "integration", "title": "Tell #payments", "config": { "connectionId": "6f1c2a9e-0000-4000-8000-000000000013", "action": "sendMessage", "params": { "text": "Order ${vars.orderId} wasn't paid within a minute: ${wait_paid.error}", "channel": "#payments" } }, "continueOnError": true, "next": "not_paid" }, { "id": "not_paid", "type": "assert", "config": { "expression": "false", "message": "An order wasn't paid within a minute" } }, { "id": "login_failed", "type": "assert", "config": { "expression": "false", "message": "The monitor couldn't sign in" } } ]}Flow editor
Section titled “Flow editor”Open the flow editor with Edit flow on a flow monitor’s page (/monitors/:id/flow). A new flow opens at /monitors/new/flow. It has a palette of steps, a canvas and an inspector for the selected step.
- Drag from a step’s right handle to set its next step. Drag from its bottom handle to add a branch.
- Start here in the inspector makes the selected step the start.
- Each step shows the last run’s result.
- Values you can use in the inspector lists earlier steps’ fields, saved values and parameters. Click one to copy it.
- Renaming a step rewrites
next, branches,startand the expressions and templates of other steps that refer to it. - Arrange lays the steps out again (undo restores your layout). Draft with ADAM puts a described flow on the canvas for review. Export as tests turns the flow into a Playwright, pytest, k6 or Postman file.
- Run now uses the saved flow, so save first.
Keyboard shortcuts
Section titled “Keyboard shortcuts”⌘ on a Mac, Ctrl elsewhere.
| Keys | What it does |
|---|---|
⌘S |
Save. Works in text fields too. |
⌘Z |
Undo. |
⇧⌘Z or ⌘Y |
Redo. |
⌘D |
Duplicate the selected step. The copy has a new id and no connections. |
Backspace or Delete |
Remove the selected step or connection. |
Esc |
Clear the selection. |
Undo, redo, duplicate and Esc don’t act while you type in a field.
Problems list
Section titled “Problems list”The toolbar shows No problems or N problems. Click it to see the list, and click a problem to select its step. Errors block saving; warnings only show.
| Level | Problem |
|---|---|
| error | Add at least one step |
| error | A step continues to a step that doesn’t exist |
| error | A branch has no condition, or leads nowhere |
| error | A saved value needs both a name and an expression |
| error | An assert step has no condition (“write the condition that must hold”) |
| error | A compare step has no values |
| error | An HTTP step has no URL (a warning when it uses a connection) |
| error | A database, logs or metrics step, or an integration step, has no connection (“choose a connection”) |
| error | An integration step has no action |
| error | A poll step has no until condition |
| error | A log step has no message |
| warning | A step is never reached: nothing leads to it |
| warning | A compare step has one value and no expected value |
| warning | A set step sets no values |
| warning | A branch step has no branches |
The server checks the flow again when it is saved: unique ids, every next and branch target, and each step’s config.