Unify Automations
Logo
Variable by UnifyApps

Variable by UnifyApps

Logo

6 mins READ

Overview

‘Variable by UnifyApps’ enables users to create runtime variables within an automation to store and reuse data in further nodes. The lifetime of a variable is for the duration of a single run (execution scope) and this value can be dynamically updated for each run.

Users can create variables of different data types , such as :

  • String

  • Integer

  • Number

  • Boolean

  • Object

  • Array

Actions Supported

You can perform following action through Variable by UnifyApps:

ActionDescription
Create VariablesCreate typed variables.
Create ListCreate list and specify schema for list Items.
Update VariablesUpdate value of the variables.
Add Item to ListAppends a new item to an existing list.
Add Items to ListAppends multiple items to an existing list.
Find and update variables with namesUpdate the values of variable matching the provided name.
Remove all items from listRemoves all entries in an existing list.

Use Cases

Let’s take an example on how you can bucketize all the high tickets present in Zendesk based on the priority of the ticket and  then use Slack to notify about both high and low priority tickets.

  1. Create a variable list “ticketStatus” where you'll store the ticket id based on the priority of the ticket.

    Frame 427319212 (8).png
    Frame 427319212 (8).png

  2.  Run “For each item in the list” action in Loop, to check the priority of each ticket and identify those marked as "High" priority.

  3. Add an item to the “ticketStatus” List with Ticket ID wherever it find the priority of ticket market ”High”.

    Frame 427319213 (6).png
    Frame 427319213 (6).png
    Frame 427319211 (7).png
    Frame 427319211 (7).png
    Frame 427319214 (8).png
    Frame 427319214 (8).png

Create variables

This action helps users create variables to transiently store and re-use information within an automation run.

Frame 427319216 (5).png
Frame 427319216 (5).png
Frame 427319215.png
Frame 427319215.png
  • Add field : Multiple variables can be created in this step by clicking on the "Add Field" button. 

  • Clear All :  You can delete the variable by clicking on the Bin icon or click on the “Clear All” button if you want to delete all the existing variables.

    Frame 427319218 (4).png
    Frame 427319218 (4).png

Input FieldsDescription
Field NameUnique ID associated to the variable.
LabelThe name of the variable.
Field TypeThe data type of the variable.
Exclude field in runsEnsures sensitive information is omitted in runs.
DescriptionA brief description of the variable.

Create List

This action helps users create a list. Lists can be useful to store multiple data points in a certain format. 

List schema should be defined in this node to ensure that we can map data according to subsequent nodes such as add an item to list , add items to list(batch).

Frame 427319217.png
Frame 427319217.png
Input FieldDescription
List NameThe name of the list.
Create List ofData type of the list such as Object, String, Integer, Number, Boolean.
List SchemaDefine the structure and data types for elements within an array.
Setup using JSONDefine the structure of the list by proving the JSON schema.

List Schema

The schema for list items will appear as a data pill in the output data tree, ready for consumption to later steps in the automation.

To introduce a new field, simply utilize the "Add field" or “Setup using JSON” Option.

Frame 427319219 (3).png
Frame 427319219 (3).png

Setup using JSON

This action is useful if users have a predefined JSON Schema for the list they intend to create, selecting "Setup using JSON" enables you to enter the JSON schema directly, thereby generating the list's structure based on it. Ensure that you are adding the schema expected within the list (for the Object, String, Integer) as this schema is appended within the List.

Frame 427319220 (2).png
Frame 427319220 (2).png

Frame 427319217 (5).png
Frame 427319217 (5).png
Input FieldsDescription
Field NameUnique ID associated to the variable.
LabelThe name of the variable.
Field TypeThe data type of the variable.
Is OptionalSelect if this field is not mandatory.
Help textA description of the field.
Default valueValue of the field when no other input is provided.
Nest underHierarchy of the fields present in the list.
Exclude field in runsEnsures sensitive information is omitted in runs.

Update Variables

This action updates existing variables , but it's important to note that only variables initially created with the 'Create variable' action can be updated. Without prior creation, this action remains unusable.

Frame 427319218 (1).png
Frame 427319218 (1).png
Input FieldsDescription
Select variableSelect the variable(s) to update.
<variable>The new value of the variable.
Thumbnail

Note

This action does not generate a datapill. To use this variable in another action, use the variable datapill from the Create variables node.

Add Item to List

This action helps users insert a new record into an already existing list . This action can be used only if a list is already defined in the automation before the node. Users can select the list and map the list schema to create a new item within the list. 

Frame 427319214 (9).png
Frame 427319214 (9).png
Input FieldsDescription
List nameSelect the name of the list to add your new entry.
Insert locationSelect the location of the new entry.
List item fieldsDefine the values of the new entry.
Thumbnail

Note

This action does not generate a datapill. To use this variable in another action, use the variable datapill in the Create List step.

Add Items to List

This action helps users add multiple records to an existing list simultaneously. Users can define the list source and map the datapills based on which the records should be created within the list.

Frame 427319221 (2).png
Frame 427319221 (2).png
Input FieldsDescription
List nameSelect the list to add your new entry.
Insert locationSelect the location of the new entry.
List item sourceThe source array from which data will be mapped.
List item fieldsDefine the values of the new entry.
Thumbnail

Note

This action does not generate a datapill. To use this variable in another action, use the variable datapill in the Create List step.

Find and update variables

This action updates the value of variables with the name provided. The first variable found will be updated with the new value.

Frame 427319223 (2).png
Frame 427319223 (2).png
Input FieldsDescription
Variable List sourceSelect the list to add your new entry.
Item sourceSelect the location of the new entry.
Item valueThe source array from which data will be mapped.
Thumbnail

Note

This action does not generate a datapill. To use this variable in another action, use the variable datapill in the Create variable step.

Remove all items from list

This action removes all items in an existing list. This action should be used after the Create list. 

Frame 427319222.png
Frame 427319222.png
Input FieldsDescription
List NameName of the list to clear items from.

FAQs

Can Variables be used to set up custom logic-based checks? 

Yes, Variables can be used to create custom validation logic and conditional checks. You can store values, compare them, and use them to control workflow behaviour or validate data entry.

How do I manage multiple items in a list variable?

You can use the "Add Item to List" or "Add Items to List" action. Use the "Remove all items from list" function to remove items. Lists can be populated and modified dynamically during workflow execution.

What's the difference between "Add Item to List" and "Add Items to List"? 

"Add Item to List" allows you to add a single item at a time, while "Add Items to List" enables you to add multiple items in bulk to your list variable.

Can I update variables after they're created? 

You can modify variables using the "Update Variables" action. This allows you to change values dynamically during workflow execution.

When should we use variables to store information? Why choose them over objects?

Variables are ideal for storing temporary, workflow-specific information that only needs to exist during a single execution cycle. Unlike objects designed for permanent data storage, variables are better suited for transient data that are only relevant within the current workflow execution.