<<expression>> pattern, where expression is evaluated at runtime.
Where template expressions are used
The same template engine is used across superglue:- Integrations – connection strings and URL templates
- Step configuration –
urlHost,urlPath,headers,queryParams,body - Transforms – final transforms and data selectors
Template expression modes
There are two kinds of template expressions: simple expressions and arrow function expressions.Simple expressions (legacy)
Simple expressions resolve values directly from the context (payload, credentials, previous step results) without any JavaScript. Syntax:<<variable>><<variable.key>>for nested fields
Arrow function expressions (recommended)
Arrow function expressions use JavaScript arrow functions that receive the context as a single parameter (typically namedsourceData) and return the value to insert. superglue runs these functions in a sandboxed JavaScript VM.
Arrow function expressions are also used in places that are pure code (for example, the
finalTransform field), where you don’t wrap them in << >>. They still receive the same
sourceData context object and behave the same way.Template context
Template expressions evaluate against a context object that depends on where they’re used (step config, integration, or transform).- Arrow function expressions – context is passed as the function parameter (typically
sourceData) - Simple expressions – the string inside
<< >>is resolved against the same context object
Integration context
The context is built from the integration credentials (for example,username, password, access_token).
The sourceData might look like this:
Integration templates are only resolved at tool execution time and get merged with tool-specific credentials.
Tool step context
The context is the aggregated step input, which includes:payload– workflow input payloadcredentials– resolved credentials for the integration- Previous step results keyed by step ID (for example,
getCustomers) currentItem– current iteration data when the step runs in a loop
sourceData object might look like this:
Final transform context
The context is a combined view of the entire workflow execution:- All step results keyed by step ID
- The original
payload
sourceData object might look like this: