The List block

List block

The List block sends an array in your flow. You can define the items in the array by inserting data blocks into the List block. For example, you could insert a Now block, a Bool block, and a String block into a List block. The output would be something like [1723043098836,false,"<string>"].

Inserting a Select block into the List block enables you to select information sent from another block and pass it into the List block. This is useful for adding API response information to your List block.

Each item in the List block has an index number next to it, indicating the item's position in the array. The first index number in the list is 0.

Input

The List block has no input port by default. When you insert a Select block into the List block, an input port appears where the inserted Select block can receive data from another block. You can then use the inserted Select block to choose a specific piece of data to be added to the List block's array. See Setup for more details. You can also insert List blocks into List blocks to create nested arrays.

Output

The List block has a single output port that sends an array when the block runs. The array is formatted like this: [item,item,item].

Setup

When you create a List block, it contains an empty array ([]). It has an index number, 0, but no items. To add items to the List block's array, select Add icon Add data blocks, then select a block from the dropdown list. The embedded block's data becomes an item in the List block's array. The item's index number appears next to the embedded block.

If you insert a Select block, it adds an input port to the List block. You can then connect another block's output port to the inserted Select block's input port, and select a specific piece of information from the incoming dat. The selected information becomes an item in the List block's array.

Example

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

You can insert the following blocks into the List block to add their data as items in the array:

You can insert the List block into the following blocks:

Last modified: 2024/08/23