The Flow Module block

Flow block

The Flow Module block references a Flow from your workspace and outputs the Flow's result. This powerful block enables you to use the logic of multiple other Flows in your current Flow. By accepting input data and referencing other Flows, Flow Module blocks can work like code functions.

Suppose you have two Flows: Flow A and Flow B. Flow A checks the availability of meeting rooms in your office based on input data such as location, time, and room preference. It then outputs whether a room is available. Flow B can use a Flow Module block to send input data to Flow A and retrieve its result (room availability), then use that result in its own logic (for example, to decide to send an API call that reserves the room).

The Flow Module block can reference any Flow in your workspace that has at least one snapshot. Snapshots are saved versions of a Flow. To learn more, see Version Flows with snapshots.

Inputs

By default, the Flow Module block has a single input port. If it's connected to another block, it will trigger when it receives data. If it's not connected, the Flow Module block will trigger when its host Flow runs.

If the referenced Flow has a Start block with inputs, the Flow Module block will have inputs that correspond with the Start block's inputs. For example, if a Flow Module block references a Flow with three inputs defined in its Start block, the Flow Module block will have three input ports with the same names and data types as the Start block's inputs. Data sent to the Flow Module block's input ports will be passed to the corresponding Start block inputs in the referenced Flow.

When the referenced Flow has Start block inputs, the Flow Module block must receive data in each of its input ports to trigger the referenced Flow.

Outputs

The Flow Module block has a single output port. The output port sends a JSON object containing key-value pairs created by the Output block in the referenced Flow.

Setup

When you add a Flow Module block, it prompts you to select a Flow to reference. The Flow Module block can only reference Flows in your workspace that have one or more snapshots.

To set up a Flow Module block, do the following:

  1. Create a Flow and add a Flow Module block. A list of Flows you can reference appears.

    If the list is empty, make sure the Flow you want to reference has at least one snapshot.

  2. Select a Flow from the list. The Flow Module block appears with the same title as the referenced Flow. The latest snapshot number appears next to the title. When a newer version of the snapshot is available, the Snapshots Snapshots icon turns purple.

Select a different snapshot

When you add a Flow Module block, it automatically selects the latest snapshot of the referenced Flow. To select a different snapshot, do the following:

  1. In the Flow Module block, select Snapshots Snapshots.

  2. Select a snapshot from the dropdown list. The Flow Module block will use the selected snapshot of the referenced Flow.

Last modified: 2024/10/02