> ## Documentation Index
> Fetch the complete documentation index at: https://docs.odella.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# User Input Block

> Prompt users for input during flow execution, enabling interactive workflows

<Frame>
  <img src="https://mintcdn.com/odella/PGZ7enNCqh0mvwj_/block-reference/assets/user_input_light.png?fit=max&auto=format&n=PGZ7enNCqh0mvwj_&q=85&s=84a84c2fbc1ee84f9a5a4c32221b3986" alt="User Input Block Screenshot" className="block dark:hidden" width="774" height="386" data-path="block-reference/assets/user_input_light.png" />

  <img src="https://mintcdn.com/odella/PGZ7enNCqh0mvwj_/block-reference/assets/user_input_dark.png?fit=max&auto=format&n=PGZ7enNCqh0mvwj_&q=85&s=c7d7d7788e01a9768a4ae806465233a1" alt="User Input Block Screenshot" className="hidden dark:block" width="768" height="370" data-path="block-reference/assets/user_input_dark.png" />
</Frame>

## 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

<ParamField path="questions" type="string[]" optional>
  An array of questions to prompt the user. Only available when "Use Input" is enabled.
</ParamField>

<ParamField path="wait" type="any" optional>
  A value to wait for before showing the input prompt. Only available when "Wait For Input" is enabled.
</ParamField>

## Outputs

<ResponseField name="output" type="string[]">
  An array containing just the user's answers to the prompted questions.
</ResponseField>

<ResponseField name="questions" type="string[]">
  An array containing just the questions that were asked.
</ResponseField>

<ResponseField name="questionsAndAnswers" type="string[]">
  An array containing the questions and answers formatted as "Question\nAnswer".
</ResponseField>

## Editor Settings

<ParamField path="prompt" type="string" default="This is an example question?">
  The message to display to the user when prompting for input. Only editable when "Use Input" is disabled.
</ParamField>

<ParamField path="useInput" type="boolean" default={false}>
  When enabled, allows the prompt message to be provided via the questions input port instead of the editor settings.
</ParamField>

<ParamField path="useWaitForInput" type="boolean" default={false}>
  When enabled, delays showing the input prompt until the "Wait For" input receives a value.
</ParamField>

<ParamField path="renderingFormat" type="string" default="markdown">
  The format to render the prompt in. Options:

  * markdown: Renders the prompt as markdown
  * preformatted: Renders the prompt as preformatted text
</ParamField>

## Examples

### Static Prompt

1. Add a User Input Block to your flow.
2. Set the "Prompt" to "What is your name?" in the block settings.
3. Run the flow. It will pause and prompt the user for input.
4. After the user submits their name, the flow continues with the input as the block's output.

### Dynamic Prompts

1. Add a User Input Block and enable the "Use Input" toggle.
2. Create an Array Block with two Text Blocks: "What is your name?" and "What is your favorite color?"
3. Connect the Array Block to the User Input Block's "Questions" input.
4. Run the flow. It will prompt the user with both questions sequentially.
5. 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.

<Warning>
  The User Input Block does not support input masking. Avoid using it for sensitive information like passwords.
</Warning>

## FAQ

<AccordionGroup>
  <Accordion title="Can I prompt for multiple inputs at once?">
    Yes, you can use an Array Block connected to the "Questions" input to prompt for multiple inputs sequentially.
  </Accordion>

  <Accordion title="What happens if the user doesn't provide input?">
    If the user submits without providing input, the block will output an empty string for that prompt.
  </Accordion>

  <Accordion title="How does the Wait For Input feature work?">
    When "Wait For Input" is enabled, the input prompt won't be shown until a value is received on the "Wait For" input port. This allows you to sequence prompts after other operations complete.
  </Accordion>

  <Accordion title="What's the difference between the output formats?">
    * "Answers Only" gives you just the user responses
    * "Questions Only" gives you just the questions asked
    * "Q & A" combines each question and answer pair with a newline between them
  </Accordion>
</AccordionGroup>

## See Also

* [Array Block](/block-reference/data/array)
* [Text Block](/block-reference/data/text)
* [Split Block](/block-reference/modifiers/chunk)
* [Join Block](/block-reference/modifiers/join)
