The Evaluate block

Evaluate block

The Evaluate block is a powerful tool for manipulating and evaluating data within your flow. It's ideal for filtering data, conditionally executing parts of your flow, and integrating complex logic.

Using Flows Query Language (FQL) queries or TypeScript scripts, you can set up the Evaluate block to process data and send the result. The Evaluate block has pre-defined snippets to help you create FQL queries.

Input

variable - This input port accepts data from another block's output port. When this port is connected to another block, the Evaluate block embeds a Select block and assigns the selected value to a variable named value. To rename the variable, select it and enter a new name.

Output

Result - Sends the result of the script or query.

Setup

The Evaluate block can process data it receives from its input ports and embedded data blocks. When you create an Evaluate block, it has one input port next to a variable name. When you connect the input port to another block's output port, the Evaluate block embeds a Select block for the incoming data and creates a variable named value. To rename the variable, select it and enter the new name. You can also change the embedded Select block to a different data block by selecting the Select block's icon View logs icon and choosing a data block from the dropdown list.

You can also embed more data blocks in the Evaluate block to process their data. For example, you could embed a String block in your Evaluate block, name the variable string1, and reference it in your query as string1. Select Add data blocks Add data blocks to embed a data block in your Evaluate block.

The Evaluate block has a text box where you can enter FQL or TypeScript code to create queries or scripts. Select the dropdown list at the top of the block to set the text box to use TypeScript or FQL. Then select the text box and enter your code. When the text box is set to use FQL, you can select Snippets and choose from a list of common tasks.

Example

To see the Evaluate block in an example flow, check out Flow Snippets: Evaluate.

You can embed the following blocks in the Evaluate block to process their data:

Last modified: 2024/11/05