Input
The Input
node can be used to get user input. It can be used to collect information from the user, such as their name, email, or any other details you need to proceed with the conversation.
You can use validation to ensure that the user input meets certain criteria, such as being in the correct format or within a specific range.
Properties
Input node properties are divided into three tabs: Message
, Validation
and Variables
.
Message
This is where you define the message that will be displayed to the user. You can use the variables in the flow to personalize the message.
Validation
This is where you define the validation rules for the user input. You can set the following validation rules:
- Disabled: No validation will be performed.
- Contains: Check if the user input contains a specific phrase.
- Regex: Use regular expressions to match patterns in user input.
If you choose Contains
or Regex
, you can define the error message that will be displayed to the user if the input does not meet the validation criteria. The error message appears on top of the input field.
The validation rules are applied after the user provides input. If the input does not meet the validation criteria, the user will be prompted to provide input again until it meets the criteria.
Variables
Here you can rename and decide to keep or discard the user input.
Best Practices
- Use the
Input
node to collect user input that you need to proceed with the conversation. - Use validation to ensure that the user input meets certain criteria.
- Provide clear instructions to the user on what type of input is expected.