Use Variables in Toolkits
You can use Jinja to interpolate variables and apply conditional logic to automate flows using Toolkits.
Jinja variable interpolation flow
Toolkit (Payload Transformation)
Jinja is processed after receiving the server response, during the payload transformation step.
tip
StackSpot AI supports Jinja’s standard filters, operators, and conditional structures. For more details, see the official Jinja documentation.
Variables
The most common use of Jinja expressions in StackSpot AI is within Toolkits (Payload Transformation). See the available variables below:
Toolkit (Payload Transformation)
- The dictionary with response headers
{{response.headers}}
Example:
{{response.headers['Content-Type']}}
- The HTTP status of the request response:
{{response.status_code}}
- The response body as plain text (string):
{{response.raw_data}}
- The response body as a dictionary, if the response is JSON:
{{response.json.variable_name}}