Overview
Workflows in Tracecat are defined as YAML workflow definitions.Workflow schema
The workflow body uses these top-level fields:Top-level fields
string
Workflow name.
string
Workflow description.
object
Input schema. Use
expects to define trigger inputs in the workflow definition.object
Workflow settings. Supported fields are
environment and timeout.list[object]
Optional trigger definitions. Trigger types are
webhook and schedule.string
Workflow alias to run when the workflow fails.
list[object]
Workflow actions.
any
Output schema. Use
returns to define the workflow output in the workflow definition.Actions schema
string
Unique action identifier. It must be unique within the workflow and match Tracecat’s slug format.
string
Fully qualified action name such as
core.http_request, core.transform.reshape, core.transform.scatter, core.loop.end, or tools.slack.post_message.mapping
Action inputs. The valid keys depend on the action type.
list[string]
Dependencies for this action.Use
upstream_ref for a success edge, upstream_ref.success for an explicit success edge, and upstream_ref.error for an error edge. Any other suffix is invalid.expression
Conditional expression. If it evaluates to a falsy value, the action is skipped.
expression | list[expression]
Run the action once per item in a collection. Inside the action, access the current item through
var.<name>.
Example: for_each: ${{ for var.alert in TRIGGER.alerts }}.object
Retry configuration with
max_attempts and timeout.float
Delay in seconds before the action starts.
string
Join behavior for downstream actions. Use
all to wait for all upstream branches, or any to allow a downstream join to complete once any upstream branch completes.expression | string
Per-action override for the secrets environment.
boolean
Redacts this action’s result in workflow execution views and execution API responses. Tracecat keeps object and array structure but replaces each individual value, so JSONPath references remain visible. Downstream actions still receive the original result.
object
Marks an action as interactive.
interaction cannot be combined with for_each.Expressions
Expressions use${{ ... }}.
Use these references inside expressions:
TRIGGER.<field>ACTIONS.<ref>.resultSECRETS.<name>.<KEY>VARS.<name>.<key>ENV.<field>var.<name>FN.<name>(...)
Control-flow primitives
Conditional execution with run_if
Scatter and gather
Usecore.transform.scatter to fan out a collection into parallel streams, then core.transform.gather to collect results back into a list.
ACTIONS.<scatter_ref>.result.
Do-while loops
Usecore.loop.start to open a loop region and core.loop.end to decide whether to continue.
core.loop.startexposesACTIONS.<loop_start_ref>.result.iterationcore.loop.endrequiresconditionmax_iterationsdefaults to100
Subflows
Usecore.workflow.execute to run a subflow.
workflow_id. Trigger data is passed through trigger_inputs.
Validation rules
These are the main workflow rules:- All action refs must be unique.
- Every dependency in
depends_onmust reference a real action. - Cycles in the action graph are invalid.
interactioncannot be combined withfor_each.- Outer scopes cannot reference actions inside a nested scatter or loop scope.
- Inner scopes can reference actions in parent scopes.
core.transform.gathermust close the scatter scope it depends on.core.loop.endmust close the loop scope it depends on.