Skip to main content

Interpolation reference

Air Pipe interpolates values into your config at runtime using the a|…| marker. This page is the full grammar reference — for a gentle introduction see Variable substitutions.

Every marker has the form:

a|<root>::<path>->filter1->filter2|
  • <root> selects a data source (see below).
  • ::<path> optionally drills into it (dotted path, or jq::<expr> for jq).
  • ->filter optionally transforms the resolved value; filters chain left to right.

Roots

Request data (available on HTTP interfaces):

RootResolves to
bodythe request body — a|body::user.email|
paramsroute/query parameters — a|params::id|
headersrequest headers — a|headers::authorization|
ipthe resolved client IP
raw_bodythe exact request bytes
requestthe full request object

Config & environment:

RootResolves to
vara config-local variable from global.variablesa|var::api_base_url|
ap_vara platform managed variable, shared org-wide — a|ap_var::API_KEY|
secreta decrypted global.secrets value — a|secret::store::field|
envan OS environment variable (self-hosted only — unavailable in managed mode) — a|env::HOME|
templatea named response template
statedurable state — a|state::last_seen|, a|state::NAMESPACE.KEY|
uuida freshly generated UUID
timestamp:<spec>a formatted timestamp
includefile include (self-hosted)

Action outputs: any root that is not a built-in is treated as an action namea|FetchUser::email| reads the email field from the FetchUser action's output. Use jq:: for richer extraction: a|FetchUser::jq::.items[0].id|.

Filters

Chain with ->. Common filters:

to_string, to_number, upper, lower, length, single_quote, double_quote, json_esc, json_array, array_values, raw, some, map(...), default(...), wrap(...), prefix(...), suffix(...), join(...), access(...), path(...).

# Uppercase a param, defaulting when absent
url: "https://api.example.com/a|params::region->upper->default(US)|"

Function wrappers

Wrap a marker to coerce its rendering: single_quote(...), double_quote(...), json_esc(...), json_stringify(...). These are useful when injecting values into SQL or JSON bodies.

Multi-line values

For templates, HTML or JSON, use a YAML literal block so the marker expands inside the string:

http:
url: https://example.com/webhook
body: |
a|var::some_big_json|
note

Always close the marker with a trailing |input: a|body|, not input: a|body. The open form without the trailing pipe is deprecated; older examples may still show it. The legacy <OR> fallback syntax is likewise deprecated — use ->default(...).