Input

The input cards are useful when you need to ask the user for information and store it in a variable.

Input string

Ask the user about information and store it in a variable.

Input pattern

Ask the user about information and match it against a regular expression before saving it to a variable. Useful when you need to validate the inputted informationen.

As default each input card is triggered only if the variable is empty. The second time the card is triggered it will jump to the next state. You can change this by setting "ask_again" to true.

Using the variable

You can use the collected variable in a response card by placing the variable name inside double curly brackets.

    "text": "Hello, my name is {{ name }} and I'm {{ age }} years old"

The variable is also accessible in a custom component.

def main(data):
    age = data['db']['age']
    name = data['db']['name']

Last updated