User Input Block
Prompt users for input during flow execution, enabling interactive workflows
Overview
The User Input Block allows you to prompt users for input during flow execution. This block is essential for creating interactive workflows where user input is required to proceed. It can use either static prompts defined in the block settings or dynamic prompts provided via the block’s input.
Inputs
An array of questions to prompt the user. Only available when “Use Input” is enabled.
A value to wait for before showing the input prompt. Only available when “Wait For Input” is enabled.
Outputs
An array containing just the user’s answers to the prompted questions.
An array containing just the questions that were asked.
An array containing the questions and answers formatted as “Question\nAnswer”.
Editor Settings
The message to display to the user when prompting for input. Only editable when “Use Input” is disabled.
When enabled, allows the prompt message to be provided via the questions input port instead of the editor settings.
When enabled, delays showing the input prompt until the “Wait For” input receives a value.
The format to render the prompt in. Options:
- markdown: Renders the prompt as markdown
- preformatted: Renders the prompt as preformatted text
Examples
Static Prompt
- Add a User Input Block to your flow.
- Set the “Prompt” to “What is your name?” in the block settings.
- Run the flow. It will pause and prompt the user for input.
- After the user submits their name, the flow continues with the input as the block’s output.
Dynamic Prompts
- Add a User Input Block and enable the “Use Input” toggle.
- Create an Array Block with two Text Blocks: “What is your name?” and “What is your favorite color?”
- Connect the Array Block to the User Input Block’s “Questions” input.
- Run the flow. It will prompt the user with both questions sequentially.
- The block’s output will be an array containing the user’s answers.
Error Handling
The User Input Block does not typically produce errors as it simply waits for user input. However, if there are issues with the user interface or the block fails to receive a response, it may timeout and return an error.
The User Input Block does not support input masking. Avoid using it for sensitive information like passwords.