Overview

The Flow Input Block is used to define an input for a flow. This input can be passed in when the flow is called using the SDK, or defines one of the input ports when the flow is used as a subflow.

The Flow Input Block is particularly useful for creating reusable subflows that can accept different inputs each time they are used. For example, you could create a subflow that accepts a string input and outputs a string value with the input value appended to it. You could then use this subflow in multiple places in your flow, passing in different values each time.

    Example 1: Define an input for a flow

    1. Create a Flow Input Block.
    2. In the Editor Settings, set the ID to input1 and the Data Type to string. Set the Default Value to Hello World.
    3. Run the flow. The Flow Input Block will output the default value, Hello World.

    Example 2: Use a Flow Input Block in a subflow

    1. Create a new flow and add a Flow Input Block to it.
    2. In the Editor Settings, set the ID to input1 and the Data Type to string.
    3. Add a Text Block to the flow and connect the Flow Input Block to it.
    4. Save the flow and go back to the main flow.
    5. Add a Subflow Block to the main flow and select the flow you just created.
    6. You will see that the Subflow Block has an input port named input1. This is the input defined by the Flow Input Block in the subflow.

    Error Handling

    The Flow Input Block will error if the input value cannot be coerced into the specified data type.

    FAQ

    Q: Can I use the Flow Input Block to define multiple inputs for a flow?

    A: Yes, you can add multiple Flow Input Blocks to a flow to define multiple inputs. Each Flow Input Block will define a separate input for the flow.

    Q: What happens if I don’t provide a value for an input when calling a flow?

    A: If you don’t provide a value for an input when calling a flow, the Flow Input Block will use the default value specified in the Editor Settings. If the Use Default Value Input setting is enabled, the block will use the value provided to the Default Value input port.

    See Also