Help center      Workflows  
Variables

Variables

Updated March 7, 2024

What are variables?

Variables are an easy way of displaying ‘variable’ information that is unique to each of your workflow runs.

They effectively act as placeholders for information that you can push data into.

You can use them to cut down on data entry or copy-pasting information from one place to another, and use them to surface any information that might be required to complete a specific task. You can also use them to auto-fill form fields in your workflow runs.

Users: In order to create or edit workflows you must be an Administrator or a Member who has been given ‘edit’ access by your Administrator.

Variables examples

Here are some examples of how you can use variables:

  • To create a summary inside a task, so that data is collated in one place for easy review
  • To populate details in your email widget from form fields that were filled out in your workflow run
  • To add into workflow run links so that you can pre-fill data in new workflow runs
  • To dynamically fill form fields in your workflow runs
  • To pass data to or from other apps via automations

The example in the video below shows how to use variables in an annual leave request process.

Available variables

Variable information could include the name of a workflow run, a workflow run created date, or data that was inputted into a form field in that specific workflow run.

The available Variable list is distributed into Global Variables, Workflow Variables, and Data Set Variables.

Global variables

These are generic variables independent of any aspect within your workflow.

  • Current date – {{current_date.full}}
  • Current day of the month – {{current_date.day}}
  • Current month – {{current_date.month}}
  • Current user’s email – {{current_user.email}}
  • Current user’s name – {{current_user.name}}
  • Current year – {{current_date.year}}
  • Organization name – {{organization.name}}

Workflow variables

These are the standard variables you can select in a workflow. Apart from these, most form fields that you create in your workflow, can also be used as variables, so the more you add the more you can use.

  • Email trigger’s body – {{email_trigger.body}}
  • Email trigger’s sender email – {{email_trigger.sender.email}}
  • Email trigger’s sender name – {{email_trigger.sender.name}}
  • Email trigger’s subject – {{email_trigger.subject}}
  • Task due date – {{task.due_date.full}}
  • Task name – {{task.name}}
  • Task URL – {{task.url}}
  • Workflow name – {{workflow.name}}
  • Workflow Run created date – {{run.created_date}}
  • Workflow Run due date – {{run.due_date.full}}
  • Workflow Run name – {{run.name}}
  • Workflow URL – {{workflow.url}}
  • Workflow Runner (email) – {{run.created_by.email}}
  • Workflow Runner (name) – {{run.created_by.name}}
  • Workflow Run URL – {{run.url}}

The email trigger variables are available when you run a workflow via email.

Data Set variables

You can connect saved views from your Data Sets with your workflows and use the data columns as variables to populate your form fields.

In the example below, we have used a Data Set variable to name a workflow run.

If you run a workflow via Data Set automations, you can populate its form fields using the data set trigger variables.

Note: To populate your form fields with variables from a Data Set, you have to first connect the desired Data Set to your workflow.


How to set up variables

First, locate the workflow in your library, to which you want to add variables. Click the workflow’s name then click “Edit“.

Note: To add variables, you need to first add some form fields in your workflow that will be used as variables.

Setting up variables in a text widget

Select the task you want to use and drag and drop a text widget into the center of your screen.

In the example below, we’re creating a summary using data from other parts of our workflow.

Click the magic wand icon in the top right of the widget and then select the variable/s you want to use from the list that appears.

You can use any variable in text widgets, so if you have a lot in your list, type the name of your form field into the search box or switch the tabs in the variable menu to narrow down your options.

When you’re finished editing, Publish and run your workflow to test that everything works as expected.

Pro tip: Once you have added a variable in a field, you can copy it (including the curly brackets) and use it elsewhere, such as in the body of an email widget or another text widget. For example: {{form.Employee_Email}} or {{form.Date_of_Birth}}

Setting up variables in an email widget

Select the task in which you want to use the variable, and drag and drop an email widget to the center of your screen.

In the example below, we’re using a variety of variables to fill out details 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 workflow run.

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

  • Email address form fields
  • Single-line form fields (short text)
  • The current user’s email address (as in, the person using the workflow run)

When you’re finished editing, Publish and run your workflow to test that everything works as expected.

Setting up variables in an embed widget

Select the task to which you want to add an embed widget with a variable then, drag and drop the embed widget into the center of your screen.

In the example below, we’re using a website form field variable to fill the embed widget.

Much like in text widgets, you can click the magic wand next to the field in an embed widget, and look for the website form field to push a URL into it from elsewhere in the workflow run.

When you’re finished editing, Publish and run your workflow to test that everything works as expected.

Setting up variables in a snippet field

Select the task to which you want to add a snippet field then, drag and drop a snippet field into the center of your screen.

In the example below, we’re using a variety of variables to fill out details in a snippet field.

Much like in text widgets, you can click the magic wand next to the snippet field, to push information (a variable) into it from elsewhere in the workflow run.

When you’re finished editing, Publish and run your workflow to test that everything works as expected.

Setting up variables in subtasks

Select the task to which you want to add subtasks then, drag and drop subtasks into the center of your screen.

In the example below, we’re using a variety of variables to fill out details in subtasks.

Much like in text widgets, you can click the magic wand next to the subtask fields, to push information (a variable) into it from elsewhere in the workflow run.

When you’re finished editing, Publish and run your workflow to test that everything works as expected.

Advanced variable options

Fallback values
Form fields can be auto-filled with answers that are populated as soon as the workflow runs. These answers are fallback values for variables if there is no manual input into that form field.

When you select a variable to use, you will be prompted to enter a fallback value for it, as shown below.

Once you insert a variable with a fallback value, you can still edit this value, as shown above.

Note: You can only insert a fallback value for your workflow variables, not your data set or global variables.

If you have not entered a fallback value while selecting a variable, you can add it once you have inserted the variable, as shown below.

Note: The word ‘fallback’ is case-sensitive and only works when in lowercase. When using inverted commas, you need to use two separate ‘ ‘ instead of “.

When a form field with an auto-filled fallback answer is edited, the manually added information becomes the variable value.

Uppercase and lowercase values

You can set a filter to ensure your variables are displayed only in uppercase or lowercase irrespective of how the form field has been populated.

Copy and paste the following code after your variable, within the curly brackets.

Uppercase: |upcase

For example, if you want a Name field variable to display in uppercase by default, your variable should read like- {{form.Name|upcase}}

Lowercase: |downcase

For example, if you want the email field variable to display only in lowercase, your variable should read like- {{form.Email|downcase}}

Spaces in variables
One final thing to note is that ‘spaces’ do not affect these filters.

{{form.Name|upcase}} works the same as {{form.Name |upcase}}

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 that ‘spaces’ have no effect on variables when not used in a link.

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

Note: You can use only one filter at a time. For example, if you use a fallback filter, you cannot use a lowercase or uppercase filter with it.

Hyperlink text with variables
You can hyperlink text with variables to create clickable links. Just type the text in a text field and pull in a variable into the same field. Then, copy the variable code, select the text you want to hyperlink and click on the hyperlink button. Now, paste the variable code in the URL field as shown below.

Using variables

When running a workflow

To use a variable you need to run the workflow from a workflow where you’ve set them up. Click your workflow’s name in your library, and then click “Run Workflow” on the top right corner of your screen.

Once the workflow run is open, fill out the form fields you are using as variables and then take a look at how the information is pulled through into your email or text widget.

When naming a workflow

You can set default run names while editing your workflows with either static text or variables. To use a variable in your default run name, edit your workflow then click on the Settings cog in the top right corner. Then go to Workflow Run Name, and choose from the list of variables.

You can also use variables to name your workflow runs when you trigger them via email.

When creating a workflow run link or integration link

When you create a workflow run link, you have the option to add variables into the link, so that you can pull data from one place (for example another workflow run or a CRM) into your new workflow run.

Learn more about workflow run links, and also how to use variables in integrations links.

 

Discover Process Street

Use Process Street to make your team processes fun, fast and faultless. We'll help you transform your team's static checklists into powerful interactive workflows!

Learn more about Process Street

YouTube videos
Deep dive into Process Street with our YouTube video series.
Join a webinar
Effectively record, replicate, and replace your workflow!
See latest releases
Catch up on the latest releases and enhancements.
Join the community
Share with others about how you are using the app day to day.

Take control of your workflows today.