Skip to main content

User Input Node

User Input Node Screenshot

Overview

The User Input Node is designed to prompt the user for input during the execution of the graph. The user's response becomes the output of this node. This node is particularly useful in interactive scenarios where user input is required to proceed with the graph execution.

The User Input Node can either use a static prompt defined in the node settings or dynamic prompts provided via the node's input.

Inputs

TitleData TypeDescriptionDefault ValueNotes
Questionsstring[]An array of questions to prompt the user.N/AThis input is only available when the "Use Input" toggle is enabled in the node settings.

Example 1: Using a static prompt

  1. Create a User Input Node.
  2. In the node settings, set the "Prompt" to "What is your name?".
  3. Run the graph. The graph execution will pause and prompt you for input.
  4. Enter your name and press "Submit". The graph execution will resume and the output of the User Input Node will be the name you entered.

User Input Node Example 1

Example 2: Using dynamic prompts

  1. Create a User Input Node.
  2. In the node settings, enable the "Use Input" toggle.
  3. Create an Array Node and connect 2 Text Nodes to it.
  4. Add the text "What is your name?" to the first Text Node and "What is your favorite color?" to the second Text Node.
  5. Connect the Array Node to the "Questions" input of the User Input Node.
  6. Run the graph. The graph execution will pause and prompt you for input.
  7. Enter your answers and press "Submit". The graph execution will resume and the output of the User Input Node will be an array containing your answers.

User Input Node Example 2

Error Handling

The User Input Node does not have any error handling behavior. If the node is executed, it will always pause the graph execution and prompt the user for input.

FAQ

Q: Can I use the User Input Node to prompt the user for multiple inputs at once?

A: Yes, you can do this by connecting an Array Node to the "Questions" input of the User Input Node. Each item in the array will be a separate question that the user is prompted for.

Q: What happens if the user does not provide any input?

A: If the user does not provide any input and presses "Submit", the output of the User Input Node will be an empty string.

Q: Can I use the User Input Node to prompt the user for a password or other sensitive information?

A: No, the User Input Node does not currently support masking the user's input. All input provided by the user will be visible in the graph execution log.

See Also