Prefix | Expression syntax | Description |
---|---|---|
ACTIONS | ACTIONS.<action_slug>.result.<jsonpath> | Reference the result of an action |
TRIGGER | TRIGGER.<jsonpath> | Reference data passed via webhook or UI |
SECRETS | SECRETS.<name>.<key> | Reference a secret |
FN | FN.<fn_name>(<arg1>, <arg2>, ...) | Call an inline function |
${{ <context>.<expression> }}
syntax:
ACTIONS
context
Tracecat uses JSONPath
and dot notation to select outputs from previous actions.
JSONPath can also be used to filter and transform nested JSONs.Both
ACTIONS
and TRIGGER
expression contexts support JSONPath syntax.
If you are new to JSONPath or need a refresher, check out our JSONPath syntax cheatsheet.ACTIONS
context.
Actions are referenced by a sluggified version of their name.
Example
Example
1
Rename action
For example, let’s assume you renamed the 
core.http_request
action in Your first workflow from HTTP Request
to Get weather
.
You can rename the action under the General
section in the action inputs panel.
2
Reference action output
You can then reference the 
You can then reference the
Get weather
action’s output in the next action by using the ACTIONS.get_weather.result
expression.
For example, you can use the core.transform.reshape
action as a pass-through action to extract and organize the weather data.
temp
and rain
outputs in downstream actions in the workflow using:TRIGGER
context
Check out the workflow triggers tutorial for a detailed guide setting up webhooks for workflows.
Execute child workflow
action.
Use the TRIGGER
context to reference the data from the trigger as a JSON object.
Manual trigger example
Manual trigger example
1
Send webhook
For example, if you send a
POST
request to the workflow’s webhook URL with the following payload:2
Reference webhook payload
You can reference the 
lat
and long
values in an action’s inputs using the TRIGGER
context.
Webhook example
Webhook example
Given a workflow with a live webhook, the following curl command will send the JSON payload The following expression will return the string
{"data": {"name": "John", "age": 30}}
and trigger the workflow:John
:SECRETS
context
Tracecat comes with a built-in secrets manager.
This allows you to store and retrieve sensitive data scoped to a workspace without exposing the value in plaintext.
Secrets are encrypted at rest and stored in the database.
Secrets stored in the secrets manager can be accessed using the SECRETS
prefix:
Operators
You can use standard operators (+
, -
, *
, /
) on int
, float
, str
, datetime
, timedelta
, list
, and dict
data in actions.
Example
Example
This expression will return the integer value 3:And the following expression will return the string
hello world
:Typecasting
You can convert data from actions from one data type to another (e.g. from string to integer) using the following syntax:Data Type | Behavior |
---|---|
int | Python int |
float | Python float |
str | Python str |
bool | Custom bool - true for any truthy value, 1 , or upper/lower case true |
Example
Example
${{ "101" -> int }}
and ${{ int("101") }}
both return the integer object 101
.FN
context
Check out the full list of supported functions in the functions cheatsheet.
FN
context.
Here are some examples of functions you can use with FN
:
For the following function examples, we’ll use the
Example alert
JSON as sample data.
Feel free to copy and paste this into your own workflow to follow along.Example alert
Example alert