Templates in Studio are Jinja2 or TextFSM files that filter and reshape data for use in workflow tasks. You build and test them under Studio > Templates.
When an Apply Template task runs in a workflow, it combines data from a preceding task or job variable with a named template and passes the result to subsequent tasks.
Template Builder uses Jinja2 or TextFSM syntax. Knowledge of the relevant language is required before proceeding.

To open an existing template, select it from the Templates section of the side nav, or browse via the collection view by clicking Search.
Template Builder has three components:

Enter template logic in the Template field. The syntax depends on the language selected during creation.
Enter example data in the Data field. This should match the structure your template will receive at runtime — a JSON object for Jinja2, semi-formatted text for TextFSM.
The Output field shows the combined result in real time. Use this to draft and troubleshoot your template before using it in a workflow.

In this example, a workflow retrieves interface data from a network switch via API. The response contains dozens of entries, but only interfaces with a role of voice are needed. A Jinja2 template filters the response, and the result is passed to a View Data task for manual confirmation.
In this example, the API response is simulated by a New Variable task that creates a deviceResponse job variable:
Add Apply Template to the workflow and set:
text — the deviceResponse job variabletemplate — DocsDemoAdd a Query task and draw a success transition from Apply Template. Set:
object — the parsed output variable from Apply Templatequery — results

Apply Templates (plural) works the same way but accepts arrays. The text and templates fields each take an array, and items are paired by index: text[0] with templates[0], text[1] with templates[1], and so on.