Zenphi offers a way to create predefined Variables that can be accessed in the subsequent steps of a Flow. These variables are defined using a given data type and this guide will elaborate on zenphi Variables.


In this article we'll learn:

  1. What are Variables?

    1.1 How to Create Variables Using Configurations?

    1.2 How to Create Variables Using Set Variable Action?

  2. Example of Using Variables in the Flow

1. What are Variables?

Zenphi variables hold predefined data values which can be used in the subsequent actions of a Flow. There are two approaches to creating variables in zenphi.

1. 1 Using Configurations

In the zenphi Flow Designer, a configuration button is located at the top right corner as shown in the following.

Upon clicking on the Configuration button, the Configuration dialogue will pop up as follows.

As you can see, the Variables section can be used to create variables by clicking on the Create Variable button. Furthermore, different types of variables can be created such as String, Number, Boolean, DateTime, Integer, and Decimal.

1.2 Using Set Variable Action

The ‘Set Variable’ action which is available under the Control Flow category can be used to create variables for a given flow. Upon dragging and dropping the ‘Set Variable’ action, it is possible to create a new Variable by clicking on the add variable icon in the Settings tab as shown in the following.

2. Example of Using Variables in the Flow

In this example, we will send an email to a recipient using a zenphi Flow. The email address of the recipient, subject, and body of the email will be provided by variables.

Step 01

Click on the Configuration button at the top right of the flow designer. Then we will be creating three variables to store the email address of the recipient, subject, and body of the email as follows.

All three variables are accepting String-type values. Upon creation of these variables, those should be available to access through the token picker.

Step 02

Let’s start building the Zenphi flow by dragging and dropping the Set Variable action to the flow as shown in the following.

Now let’s set the values for the three predefined variables created via the Configuration window. In the Settings tab, you can select the variable and set the preferred value as follows.

Step 03

Drag and drop the Send Email(Gmail) action. Go to the Settings of the Send Email action. The To, Subject, and Body input fields support the token picker shown in the following.

Let’s access the three variable values via the Token Picker:

As you can see, the three fields(To, Subject, Body) have been filled with the predefined variable values as shown above.

To summarize, the Variables can be predefined via the configuration window for Zenphi flows. These variable values can be set using the Set Variable action and accessed through the token picker.


What’s next

🎓 What is a Vault?

🎓 What is a Toke Picker?

Follow us on Social Media to not miss a thing about automation tips and best practices:

Have any other questions? Just drop a message in the support chat.

Did this answer your question?