Token Picker Masterclass: The Easy Way to Tell Text from a List (and Why It Matters)

As Zenphi flow masters, we often navigate a jungle of data, shuttling information from one action to the next. But here's a crucial truth: every field in a Zenphi action expects a specific type of data. Using the wrong type is the number one cause of frustrating flow errors!


Why Variable Type Matters in Zenphi

Think of your Zenphi actions like kitchen appliances. A blender expects solid ingredients and outputs a liquid. A toaster expects bread and outputs... well, toast! If you put a water balloon in a toaster, you're going to have a bad time.

Similarly, every input field in Zenphi is programmed to handle a specific variable type.


The Essential Variable Types

Here are the most common types you'll encounter in your flows:

Text (or String): A sequence of characters. A person's name, an email subject, a file name.

Number: A numeric value (integer or decimal).An invoice amount, a count of files, an age.

Boolean: A value that is only True or False. 'Is this item approved?', 'Does the file exist?'.

Date/Time: A specific point in time. A creation date, a deadline, a timestamp.

List (or Array): A collection of items of the same type. A list of email addresses, a collection of file names, all the files returned by a Search action.

Object: A complex data structure with multiple properties. A single Google Calendar Event, a single user's profile information.

File: A reference to a digital file. An uploaded document, an attachment from an email.


Your Secret Weapon: The Token Picker Icons

This is where the Token Picker becomes your best friend. It doesn't just show you available variables; it gives you an instant, visual cue about the type of data that token holds!


Visual Cues in Action

In the image below, which shows the References section of the Token Picker, notice the icon next to each token. These icons immediately tell you what type of data you're pulling into your action field.



You can easily see that Created Time and Updated Time have a calendar icon (Date/Time), while Summary, Description, and Location have the "ABC" text icon (Text/String). The Creator and Organizer tokens, represented by curly braces {}, indicate complex Object types, which often contain multiple pieces of information about an entity.


The Zenphi Token Icon Glossary

Here is a quick reference for the most common icons you'll see and what they mean:


1. Text (String)


svgviewer-output.svg


This is the most common variable type, representing any combination of letters, numbers, and symbols.

| Text / String | Use this token when the action field expects a single piece of text, like a file name, an email body, or a comment. |


2. Date/Time

This icon signifies a variable holding a specific date, time, or both.

| Date / Time | Use this token for fields expecting a date, time, or both, such as scheduling an event or setting a due date. |


3. Object


This icon indicates a complex data structure that contains multiple pieces of related information.

| Object | This token represents a collection of properties (like a user's name, email, and ID all bundled together). You'll often need to specify a property within the object (e.g., Creator.Email) to use it in a text field. |


4. List (or Array)


This icon signifies a collection of items, which can be a list of texts, numbers, objects, or any other type.

| List / Array | Use this token when you expect multiple items, such as a list of email addresses, files returned from a search, or rows from a spreadsheet. When using a list in a field that expects a single item, you'll often need to iterate through it (e.g., with a Loop action) or select a specific item by its index. |


5. Number


This icon denotes a numeric value, which can be an integer or a decimal.

| Number / Integer / Decimal | Use this token for mathematical values, like counts, durations, or monetary amounts. Can be a whole number or have decimal places. |


6. File / Attachment


This icon represents a digital file, such as a document, image, or email attachment.

| File / Attachment | Use this token when you need to reference a digital file, whether it's an attachment from an email, a document from a cloud storage service, or a file uploaded via a form. |