Formula Editor

Formula Editor

Overview   

When you configure a step in your flow, most fields accept more than static text. The formula editor lets you combine values from multiple steps, apply functions to transform data, and build expressions without leaving the field you're configuring.

For example, instead of passing a raw date from a form submission, you can format it to match what the next app expects. Instead of passing a billing city by itself, you can combine the street number, street name, and city into a single formatted address. Use the formula editor to build these transformations directly within a field.




How it works  

When you configure a step, the Insert Variable panel on the right lists all the variables available from previous steps in the flow. Click a variable to insert it into the field you're configuring. The formula editor opens as an overlay when you click the variable mapped, with the selected variable already added to the formula bar(the text box where you edit a formula).

From here, you can:

  • Save the formula without making changes to pass the variable's value directly

  • Type a '.' after the variable to view the functions available for it

  • Add more variables or static text to build a complete formula

Variables appear as readable tags in the preview section on top, such as Fetch Invoice → Billing Address → City, instead of internal variable names. This helps you identify the value you're working with.

Accessing nested variables

Some variables return more than one value. For example, a contact record might include a name, email address, and phone number all within the same variable. You can use a '.' to navigate into these nested variables and access the exact value you need.

Example

Your flow fetches a contact from Zoho CRM. Instead of passing the entire contact record, you want to pass just the email address to the next step.

trigger.contact.email

You can go as many levels deep as needed:

trigger.invoice.billingAddress.city

If a variable's full path is too long to display, the formula editor shortens it for readability. Hover over it to view the complete path.

Understanding the formula editor

The variable you select from the previous step is automatically added to the formula editor. Use the formula editor to build and edit formulas for the selected variable.

You can add:

  • Variables from previous steps in the flow

  • Functions by typing a '.' after a variable

  • Static text by typing directly into the formula bar

  • Operators such as +, -, *, /, &&, and || to build expressions

As you type a '.' after a variable, the suggestion list shows:

  • Recommended functions based on the selected variable and what you've typed

  • Other functions grouped by category, such as String, Number, Date, List, and Map

Click a function to insert it directly into the formula bar.



Building a formula  

Build a formula by combining variables, functions, and static text. Here are some common examples.

Format a date  

Your flow receives a form submission date, but the next app expects it in a specific format.

format_date.format("yyyy-MM-dd")

This converts the date into the required format before passing it to the next step.



Extract a domain from an email

Your flow receives a customer's email address, but the next step only needs the domain name.

email.getSuffix("@")

This extracts everything after the @, for example, "zylker.com" from "frank@zylker.com".

Extract part of a string  

A webhook payload contains an order ID embedded in a longer string, such as "Your order ORD-8845 has been placed," and you need only the order ID.

message.getPrefix(" has been placed").getSuffix("Your order ")

This extracts the order ID from the message.

Calculate a due date  

Your flow creates a task and needs to set a due date 10 days from the submission date.

submissionDate.addDays(10)

This adds 10 days to the submission date before passing it to the next step.

Chaining functions  

You can apply multiple functions to the same variable. Each function uses the output of the previous function.

Example  

Your flow receives a product code from a form submission, but your internal system requires it in uppercase without extra spaces.

toUpperCase_string.trim().toUpperCase()

This removes extra spaces first, then converts the value to uppercase in a single formula.



Formula editor vs. custom functions  

Use the formula editor for common data transformations that you can perform directly within a field.

Use the formula editor when you need to:  
  • Format dates and times
  • Perform arithmetic on dates and numbers

  • Combine values from multiple fields

  • Extract part of a string

  • Convert text to uppercase or lowercase

  • Trim spaces or check whether a value contains specific text

  • Round numbers or find minimum and maximum values

  • Extract values from lists and maps

Use a custom function when you need to:  
  • Apply conditional logic based on multiple values

  • Loop through a list of records

  • Make API calls to external services

  • Perform complex calculations with intermediate values

  • Build multi-step logic that goes beyond a single field

Learn more about custom functions

Frequently asked questions  

Can I apply more than one function to a variable?  

Yes. You can chain multiple functions so the output of one function becomes the input of the next.

productCode.trim().toUpperCase()

This removes extra spaces and converts the value to uppercase in a single formula.

Why does a variable show a shortened path such as "Fetch Invoice → ... → City"?  

When a variable has a long path, the formula editor shortens it to improve readability. Hover over the variable to view its complete path.

Does the formula editor work on all field types?  

The formula editor is available for input fields that accept dynamic values. Fields that accept only predefined values, such as standard dropdowns, don't support the formula editor. If a dropdown accepts custom values, you can use the formula editor for that field.

What if I don't know which function to use?  

Type a '.' after a variable to view the functions available for that variable. You can also browse functions by category from the suggestion list.

What's the difference between the formula editor and custom functions?  

Use the formula editor for common data transformations such as formatting, combining, extracting, and calculating values. Use custom functions when you need more complex logic, such as conditions, loops, API calls, or multi-step calculations.