Variables by Workato

Workato variable is a user-declared datapill that contains a data value. These user-declared variables are different from a standard datapill in that your declared variables are mutable - the value of the variable can be changed within a recipe.

The lifetime of a variable is for the duration of a single job (job scope) - there is no persistence, and no mechanism can access this across different jobs.

Workato variables are typed. In order to use variables, you will first have to declare it using the create variable action. To update the variable, use update variable action.

Examples

If you want to find a particular entry within a report - the entry with the largest ARR.

  1. Create a variable called ARR.
  2. Run the for each action, and update ARR whenever it finds a higher value.
  3. Subsequently, use the ARR value to call up that specific entry.

Iterate through the report for highest ARR Iterate through the report for highest ARR

Connection setup

No connection setup is required. Simply select App > Variables by Workato to get started.

Variables by Workato Variables by Workato

Create variable action

This action creates a variable in the specified data type. You should configure this variable to match the data type that it will be used for (e.g. integer, string).

Create variable Create variable

Input field Description
Variable name The name of the variable.
Variable type The data type of the variable.
Default value The default value of the variable. Leave this blank to set the default value as null.

Update variable

This action updates an existing variable. You can only update variables managed by Variables by Workato.

Update variable Update variable

Input field Description
Variable name Select the variable to update.
Value The new value of the variable.

Note: This action does not generate a datapill. To call your custom variable, use the output of the Create variable step.

Example: Creating a name variable from an image file

Suppose you want to read a name from an image file (e.g. PNG). You can generate a Name variable and add the values for First name, Middle name, and Last Name.

Create a name variable from an image file Create a name variable from an image file

See the full example recipe here.

Create list action

This action creates an empty list with its item schema. The list item schema will apply to every item in the list.

Create list Create list

Input field Description
List name The name of the list.
List item schema Define the properties of each item on this list.

Define list item schema

The list item schema will show up as a list of usable variables in the output datatree. These variables can be mapped unto subsequent recipe steps. Use Add field to define a new field.

Add new field Add new field

Input field Description
Name The name of the new field.
Data type The data type of the new field.
Optional Select if this new field is mandatory.
Hint A description of this new field.

Add item to list

This action appends a new item entry to an existing list. You can only update lists managed by Variables by Workato.

Some item fields are mandatory. Check that you have valid inputs for the required fields before using this action.

Add item to list Add item to list

Input field Description
List name Select the list to add your new entry.
Insert location Select the location of the new entry.
List item Define the values of the new entry.

Note: This action does not generate a datapill. To call your list, use the output of the Create list step.

For more information on list management, see here.

results matching ""

    No results matching ""