Hi,
I'm new to FortiSOAR and try to understand how data is being passed around in a playbook. I understand that there are:
Steps record: In Jinja fortmat, it starts with vars.step.<name of referenced action step output>
Input: Variables for data from Modules and Parameter. In jinja format, it starts with vars.input.record[0]
Custom variable: variable that is created in the playbook
The problem that I have right now is trying to wrap my head around how to test Jinja template using the step output. When I view the executed playbook in debug mode, the output does not explicitly mention the vars.step or vars.input.record. This is a problem when I need to troubleshoot other people's playbook as I need to carefully trace the variable.
Is there a best practice on how to play with variable and creating/test jinja template from the step output?
You can use the Jinja Editor to evaluate the Jinja template using the step output. For more information about the Jinja Editor, refer to the FortiSOAR documentation: Jinja Editor - FortiSOAR Playbooks Guide.
@khilfi You are correct that the ENV where all known data to the playbook resides does not contain the vars.steps.<step> json. As a best practice, I recommend always creating a variable that has the step results in it. That way the data is available in the ENV directly, and all the data is easily loaded into the Jinja editor so you can continue buliding templates there.
When you make the variable, you can do so on the same step of the connector, or right after the step as a separate "Set Variable" step that references the step with jinja.
The Fortinet Security Fabric brings together the concepts of convergence and consolidation to provide comprehensive cybersecurity protection for all users, devices, and applications and across all network edges.
Copyright 2025 Fortinet, Inc. All Rights Reserved.