How-To: Understand and Create Template Variables
Overview
To create an effective Template, you’ll need to add multiple Template Variables that a user can fill out on the Inputs tab while building a Task. The data from these Template Variables will then pass directly to the code as environment variables every time the Task runs. This how to guide will walk you through the steps to create these Template Variables.
Steps
Step 1 - Required Fields
Edit an existing Template, or create a new one.
On the Input tab, click the + button next to the “Template Variables” header. A drawer on the right hand side of the screen will open up.
Give your variable a Display Name that will be shown to users.
Give your variable a Reference Name that will be passed to the script.
Select the Variable Type. This changes the format of how the user needs to provide their input.
Step 2 - Optional Fields
The following steps are optional, but strongly recommended to increase usability.
Set a default value for the variable to use.
Select if the field should be required or not.
Give the variable placeholder text as an example of what should be entered.
Give the variable a tooltip explanation.
Step 3 - Create the Variable
Click the Add Variable Button at the bottom.
You’ve successfully made a new Template Variable!