Control Flow and Logging Steps
These steps shape the run rather than talk to another system. None needs a credential.
conditional
Section titled “conditional”Evaluates a condition and runs one of two nested step lists. How to write the condition is in Variables and expressions.
| Setting | Required | What it does |
|---|---|---|
if | Yes | The condition. |
then | Yes | Steps to run when it is true. |
else | No | Steps 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.
try_catch
Section titled “try_catch”Runs the try list; if a step in it fails with a matching error, abandons
the rest of try and runs the catch list.
| Setting | Required | What it does |
|---|---|---|
try | Yes | Steps to attempt. |
catch | Yes | Steps to run after a failure. |
catch_codes | No | Error 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.
set_variable
Section titled “set_variable”Stores a value for later steps as {{ vars.<name> }}.
| Setting | Required | What it does |
|---|---|---|
name | Yes | The variable name. |
value | Yes | Any 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.
| Setting | Required | What it does |
|---|---|---|
seconds | Yes | Whole 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.
log_info, log_warning, log_error
Section titled “log_info, log_warning, log_error”Write a message at the matching level.
| Setting | Required | What it does |
|---|---|---|
message | Yes | The text. Placeholders are filled in. |
context | No | An 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.