Overview
Tracecat expressions let you build values from trigger data, action results, secrets, variables, and functions. Expressions use${{ ... }}.
Where expressions are used
You can use expressions in:- Action inputs
run_iffor_each- Action
environment - Workflow environment
- Output schema
var.<name> in action inputs for actions that run with for_each.
Expression contexts
Use these references inside expressions:TRIGGER.<field>ACTIONS.<ref>.resultSECRETS.<name>.<KEY>VARS.<name>.<key>ENV.<field>var.<name>FN.<name>(...)
Operators
Expressions support literals and operators.Literals
- String literals such as
"high"and'prod' - Numeric literals such as
1and3.14 - Boolean literals such as
TrueandFalse - Null literals such as
None - List literals such as
["a", "b"] - Object literals with string keys such as
{"severity": "high"}
Operators
- Logical operators:
||and&& - Comparison operators such as
==,!=,<,<=,>,>= - Arithmetic operators such as
+,-,*,/,% - Ternary expressions such as
${{ "p1" if TRIGGER.severity == "high" else "p3" }}
Python-style
or / and and SQL-style OR / AND are not supported.Examples
Basic trigger reference:var.<name> in action inputs:
FAQ
How do I safely reference action results when an upstream action was skipped, failed, or returned null?
How do I safely reference action results when an upstream action was skipped, failed, or returned null?
Some actions only return data in certain conditions. For example, a hash enrichment might find no matches in your threat intel source. When a field does not exist, the expression resolves to
None — no error is raised.Use run_if with a != None check to skip downstream actions when the data is missing, or use a ternary to supply a fallback value.Related pages
- See Workflow definition for where expressions appear in workflow YAML.
- See JSONPath for field access, arrays, and filters.
- See Functions for the full function reference.