Table of Contents

User Input Block

Jonathan Goodfellow Updated by Jonathan Goodfellow

The User Input block is a super useful tool that we can use to capture and use your user's first interaction with your bot! ๐Ÿค– This can be a really useful way to start your flow!

This is the first block that will show when you start to build your bot for WhatsApp, Facebook Messenger, and APIchat channels! ๐Ÿ™‚

For WhatsApp:

Block anatomy

Your user's first input to the bot will be saved by default in the Variable @user_input, a string! You can change the name of this Variable if you like!

Note: Currently, the User Input block cannot recognize if the input is a sticker or a contact.


It is not possible to delete, duplicate or change the User Input block! It will always be the first block in a WhatsApp bot flow.


With a Conditions Block

You can use this Variable inside the bot flow with theย Conditionsย block, for example:

IF @user_input CONTAINS โ€œorderโ€, you can point to a specific path in the bot. โžก๏ธ

It would look like this:

With the Keyword Jump Block

You can also use theย Keyword Jumpย block to point to several different paths of the bot if the variable contains one of the keywords provided. ๐ŸŽฏ

It would look like this:

With a Goodbye Block

A common issue in WhatsApp bots goes like this:

The flow ends with a Goodbye Block

The User then writes a goodbye message like "Bye" or "Chao" or "Goodbye"

This causes the bot to trigger again from the start as it is understood as the first input of a new session! ๐Ÿ˜ญ

The User Input Block can prevent this nightmare! ๐ŸงŸโ€โ™‚๏ธ

By capturing the user input and then using a Conditions Block to direct the flow based on this input, we can direct these friendly users who want to say goodbye to the Close Chat block, preventing the flow from starting again! Magic! ๐Ÿง™๐Ÿผโ€โ™‚๏ธ

It would look like this:

Tip: You can even use a Natural Language Processing integration like Dialogflow to interpret that first message and respond to it!

For Facebook Messenger

The block works in exactly the same way for Facebook Messenger bots.

For APIchat

The block works in exactly the same way for APIchat bots.

How did we do?

List Buttons Block (WhatsApp)