Variables

What are variables?

Variables are an easy way of displaying ‘variable’ information that is unique to each checklist of a template.

Variables can currently be added to text and email widgets

Variable information could include the checklist name, created date or data that was inputted into a form field in that specific checklist run either manually or via Zapier.

This lets you surface any information that might be required to complete a specific task.

For example, if you record a client’s email address using a form field, you could set up a sample email and then push their email address into the “To” field.

That way, the email is automatically populated instead of having to copy it from the form field into your email client. If the email is changed or even updated, the sample email will always be sent to the right place.

Variables Example

Available Variables

There are variables for almost every aspect of a template and checklist, namely:

  • Template name = {{template.name}}
  • Template URL = {{template.url}}
  • Checklist name = {{checklist.name}}
  • Checklist URL = {{checklist.url}}
  • Checklist due date = {{checklist.due_date}}
  • Checklist creation date = {{checklist.created_date}}
  • Checklist creator’s name = {{checklist.created.by_name}}
  • Checklist creator’s email = {{checklist.created.by_email}}
  • Organization name = {{organization.name}}
  • Task name = {{task.name}}
  • Task URL = {{task.url}}
  • Task due date = {{task.due_date}}

Along with many, many more, such as individual form fields.

How to set up variables

To set up a variable you need to be editing a template. Do this by locating the template in your dashboard and clicking the cog next to its name to open the template menu on the right-hand side of your screen.

Next, click “Edit this template” to open the template in edit mode.

variables - edit this template

Go into the task you want to use the variable in, and find (or create) a basic text or email widget. Click the section of the widget you want to put the variable in, and then on the magic wand icon to bring up the variable list.

In text widgets the variable icon (magic wand) is in the top right of the text options, and in email widgets the icon is next to each field.

variables - variable text and email widget button

Setting up variables in a text widget

To set up a variable in a text field, click the magic wand in the to right of the widget (shown above).

Next, select the variable you want to use from the menu which appears to add it to the text widget. You can use any and every variable in text widgets, so use the search bar to narrow down your options.

variables - select variable text widget search bar

Now you can copy the variable and use it elsewhere, such as in an email widget.

Setting up variables in an email widget

Much like in text widgets, you can click the magic wand next to the fields in an email widget to push information (a variable) into it from elsewhere in the checklist.

However, when putting a variable into the “To”, “Cc”, and “Bcc” fields on an email widget your options will be limited to pushing in information from:

  • Single line form fields
  • Email address form fields
  • The current user’s email address (as in, the person using the checklist)

variables - email widget to variables option

Once you’ve finished setting up your variables, click “Save changes” in the top left of your template edit view to apply your changes.

variables - edit template save changes

Advanced variable options

Default values
Variables can have a default value set if there is no input into the form field, all you need to do is copy and paste this to the end of the existing variable text before the last two brackets (don’t forget the leading space at the beginning):

 | default:'there'

To set a default value for a variable, follow the below format:

{{form.First_Name | default:'there'}}

To set a blank default value for a variable, follow this format:

{{form.First_Name | default:''}}

URL encode
You can use a URL encode on a variable to make symbols safe to use in a link or Send Email widget. Simply copy and paste this to the end of the existing variable text before the last two brackets (don’t forget the leading space at the beginning):

 | url_encode

Your link containing a variable should look like this if followed properly:

http://google.com?q={{form.Name | url_encode}}

This will ensure your link will not break if your form fields have values with spaces or symbols inside such as “Name”, “Address”, or “Title”.

Spaces in variables
One final thing to note is ‘spaces’ have no effect on variables when not used in a link.

Example:
{{Hey}} is the same as {{ Hey }} and also {{Hey }}

Using variables

To use a variable you need to run a checklist from a template where you’ve set them up. Do this by clicking the cog next to a template’s name in your dashboard, and then clicking “Run checklist” in the right-hand side of your screen.

variables - cog and run checklist

Once open, click on a task with variables in it to see them. Any variables that are empty will have bold text labeling what they are related to.

variables - highlight completed and empty variable in checklist

To learn more about how you can use variables to their full potential, check out our article on using variables in integrations links.

Was this article helpful?

Related Articles