Skip to main content

Template Interpolation

Many automation action fields support template interpolation — dynamic placeholders that are replaced with real values at execution time. Templates use the $namespace.path$ syntax.

Syntax

$namespace.path$
$namespace.path.nested.field$
$namespace.path.modifier$

A template token starts and ends with $. The first segment is the namespace, followed by a dot-separated path into the data. An optional modifier can be appended as the final segment.

Unresolved tokens (where the path doesn't match any data) are left as-is in the output.

Namespaces

request — Incoming webhook data

Access any part of the incoming HTTP request.

TokenDescription
$request.method$HTTP method (GET, POST, etc.)
$request.path$URL path after the endpoint slug
$request.url$Full request URL
$request.scheme$URL scheme (http or https)
$request.host$Request host
$request.port$Request port
$request.remote_addr$Sender's IP address
$request.timestamp$When the request was received
$request.headers.<name>$Request header value (e.g., $request.headers.content-type$)
$request.query.<name>$Query parameter value (e.g., $request.query.token$)
$request.body$Full request body
$request.body.<path>$Nested body field (e.g., $request.body.order.id$)

Body fields support dot notation for nested objects and bracket notation for array indices:

  • $request.body.user.name$ — nested object field
  • $request.body.items[0].id$ — array element

endpoint — Endpoint metadata

TokenDescription
$endpoint.id$Endpoint ID
$endpoint.name$Endpoint display name
$endpoint.slug$Endpoint URL slug

variable — Chain variables

Access variables set by previous actions in the chain (Extract JSON or HTTP Request response variables).

TokenDescription
$variable.<name>$Chain variable value (e.g., $variable.order_id$)
$variable.<name>.<path>$Nested field in a variable (e.g., $variable.api_response.body.id$)

store — Datastore values

Read values from the persistent Datastore.

TokenDescription
$store.<key>$Entry from the default namespace
$store.<namespace>.<key>$Entry from a specific namespace
$store.<namespace>.<key>.<path>$Nested field in a stored value

Modifiers

Append a modifier as the final path segment to transform the resolved value.

ModifierDescription
jsonJSON-serialize the value
base64_encodeBase64-encode the value
base64_decodeBase64-decode the value
url_encodeURL-encode the value
url_decodeURL-decode the value
upperConvert to uppercase
lowerConvert to lowercase
lengthReturn the length (string length, array/map count)

Examples:

$request.body.json$              → JSON string of the full body
$request.body.token.upper$ → Token value in uppercase
$variable.payload.base64_encode$ → Base64-encoded payload
$request.body.items.length$ → Number of items in the array

Supported fields

Not all action config fields support interpolation. Here's where templates work:

Action typeInterpolated fields
HTTP Requesturl, headers (values), body
Store Variablevalue
Modify Responseheaders (values), body

Examples

Forward with a dynamic URL:

{
"type": "http_request",
"config": {
"url": "https://api.example.com/orders/$variable.order_id$",
"method": "POST",
"headers": {
"Authorization": "Bearer $store.api_token$"
},
"body": "{\"event\": \"$request.body.type$\", \"data\": $request.body.json$}"
}
}

Store a value with interpolation:

{
"type": "store_variable",
"config": {
"key": "last_event_$request.body.type$",
"value": "$request.body.id$",
"ttl_seconds": 3600
}
}

Dynamic response body:

{
"type": "modify_response",
"config": {
"status_code": 200,
"body": "{\"received\": true, \"order_id\": \"$variable.order_id$\"}"
}
}