Code-based Actions: Build a bot quiz for WhatsApp

Using the Flow functionalities, you can build a bot quiz for WhatsApp, Messenger, and web users.

Create your quiz chatbots and engage with your users on WhatsApp, Messenger, Web, or other channels. You can also download the qubot template. Quizzes are a great way to engage with your users as a good quiz increases the customer journey. You can also use quizzes for product recommendations.

If you are looking for a way to create a quiz bot or a way to use the input of a user for a follow-up workflow then this article will help you to create a bot to implement quizzes. Quizzes can be created for the following:

  • Ask question
  • Check answers
  • Save answers
  • Quiz chatbot Template

Two Flow concepts that we will be using here are capturing or extracting user input and conditions.

Asking questions

The first step is to onboard your users. Read more about WhatsApp click-to-chat links. You can also invite the users with scannable QR codes. When using Messenger or Web you can directly trigger events within Flow.

Text Replies can be used to ask a question. You can use Any Text Trigger to extract the user’s answers and save them as a parameter. You can use the following three types of questions:

  • Open questions
  • True/False questions
  • Multiple choice questions

Open Questions

Use a Text Reply to ask a question and an Any text Trigger to extract the answer.

True/ False Questions

When designing a flow for Web, Messenger, or Telegram you could add Quick Replies to improve the customer experience.


Note: Quick Replies or Button are not supported in the WhatsApp channel.

Multiple Choice Questions

These types of questions are created by using Webviews. You can use multiple choice at WhatsApp, Web, Messenger, and Telegram.

Checking answers

To check if the answer is correct we can use Conditions.

What are the conditions? These components are if/ else statements and allow you to check if the answer is correct. If the answer is true, then we proceed with the correct branch. Else, we proceed with the incorrect branch.

Read more about looping flows.

Store answers

You can store the answers to create reports for future reference. For product recommendations and interacting with other services, you can use Actions to connect with your APIs or you can use the existing Zapier integration to fill a Google Spreadsheet.

Quizbot Template

To create a Quizbot, access the login page. Create a new project and add the Quiz Chatbot from the available templates. Ensure that the Flow brain is set to English (Project settings -> Brains).