Skip to content

Control Flow and Logging Steps

These steps shape the run rather than talk to another system. None needs a credential.

Evaluates a condition and runs one of two nested step lists. How to write the condition is in Variables and expressions.

SettingRequiredWhat it does
ifYesThe condition.
thenYesSteps to run when it is true.
elseNoSteps to run when it is false. With none, nothing runs.

Output: branch (then or else), steps_executed (how many steps the chosen list holds).

The run history records if, then and else as written, and each nested step as its own row.

Runs the try list; if a step in it fails with a matching error, abandons the rest of try and runs the catch list.

SettingRequiredWhat it does
tryYesSteps to attempt.
catchYesSteps to run after a failure.
catch_codesNoError codes to catch. Empty or missing catches every error.

Output: branch (try or catch), error_code (the caught code, or null).

An error outside catch_codes, or an error inside catch, fails the try_catch step itself, and its own on_error applies. A nested step with on_error: continue never reaches catch, because it does not fail.

Stores a value for later steps as {{ vars.<name> }}.

SettingRequiredWhat it does
nameYesThe variable name.
valueYesAny value: text, number, list or object. Placeholders in it are filled in before it is stored.

Output: value.

{ "name": "pick_team", "type": "set_variable",
"config": { "name": "team", "value": "{{ data.department || 'general' }}" } }

Pauses the run.

SettingRequiredWhat it does
secondsYesWhole seconds, 1 to 3600. Anything else fails with config_error.

Output: delayed_seconds.

The run holds a background worker for the whole pause. Keep delays short; for “tomorrow” or “next week”, use a scheduled workflow instead.

Write a message at the matching level.

SettingRequiredWhat it does
messageYesThe text. Placeholders are filled in.
contextNoAn object of extra values written alongside the message.

Output: logged (true).

The message goes to the PHP error log, and only when WP_DEBUG_LOG is on, as a line starting [FMW][INFO], [FMW][WARNING] or [FMW][ERROR]. In the context values, email addresses are partly masked and any key containing password, token, api_key, secret or authorization is replaced with <redacted>; the message itself is written as it is. Developers can also receive every message through the fmw_log action.

The run history does not show the message in the admin screen, but the step’s recorded config does, placeholders filled in: ask the assistant to fetch the run with flowmint_get_run.