Surveys

Quiz bot with result output to the user

General Logic The scheme implements a simple sequential quiz in a Telegram bot: The user receives a welcome message with a start button. After pressing the start button, a pre-created quiz poll runs....

Use template

General Logic

The scheme implements a simple sequential quiz in a Telegram bot:

  1. The user receives a welcome message with a start button.
  2. After pressing the start button, a pre-created quiz poll runs.
  3. The user answers two questions.
  4. After completing the quiz, the bot automatically shows the final result:
    • the score earned;
    • the total number of questions;
    • the number of correct answers;
    • the number of incorrect answers.

The scheme is designed for completing one quiz followed by displaying statistics. Comments also indicate the possibility of expanding the logic, for example, directing users with certain results to a private group or channel.

Structure and Logic of Blocks

Quiz Start Group

The scenario starts with the bot's system launch, after which the user receives a text message inviting them to start the quiz.

The message contains an inline button to start the process. Clicking it directs the user to the quiz display block.

Thus, the start block serves only a navigational function: it contains no questions and does not process answers but offers the user to proceed to the test itself.

Quiz Display Group

The next block launches the pre-created poll or quiz.

Block settings:

  • a poll selected in the system by campaign ID is used;
  • poll type — quiz with correct and incorrect answers;
  • number of questions — two;
  • after completing the poll, the result is saved into the variable pollResult;
  • upon completion, the user is automatically directed to the results block;
  • state reset on restart is disabled, so repeated attempts depend on platform settings and the user’s current state.

A comment in the block notes that before use, you must create a poll or quiz and then select it from the available list. That is, questions and answer options are not set directly in this scheme — they are configured separately in the poll editor.

Results Display Group

After completing the quiz, the bot sends a final message using data saved in the result variable.

The message inserts the following indicators:

  • the user's final score;
  • the total number of questions;
  • the number of correct answers;
  • the number of incorrect answers.

The result is generated dynamically: values are taken from the object returned by the quiz block upon completion.

The comment provides for further scenario development. Instead of just displaying the result, you can add conditional transitions:

  • provide additional material to users with a high score;
  • send the user to a private group or channel;
  • show different messages depending on the number of correct answers;
  • offer a retake to those who did not reach the minimum score.

These conditions and additional transitions are not implemented in the current scheme.

Visual Frame with Description

The scheme contains a separate visual frame explaining the scenario’s purpose. It is only for grouping and documenting blocks and does not perform autonomous actions in the bot’s logic.

The frame describes the overall idea: the user answers questions sequentially and then receives a summary result with the number of correct and incorrect answers. The possibility of expanding the scenario by checking the minimum score and granting access to restricted resources is also noted.

Variables and Transitions Used

The variable pollResult is used to transfer the quiz results.

Extracted from it are:

  • score — final score;
  • total — total number of questions;
  • correct — correct answers;
  • incorrect — incorrect answers.

Connections between blocks are organized in two ways:

  • transition to the quiz is performed via an inline button in the start message;
  • transition to the results occurs automatically after the poll completion event.

Integrations and API Requests

The scheme uses the platform’s built-in functionality to run the poll or quiz and obtain its results.

No external integrations, third-party APIs, payment services, or web requests are involved. To work, you need to:

  • create and configure the quiz within the platform;
  • specify the correct answers;
  • select the desired poll in the corresponding block;
  • ensure the quiz is set up with the required number of questions.

API keys, balance top-ups, and additional verification are not required for the described logic.

Quick Setup

How to use the 'Quiz bot with result output to the user' template in 6 easy steps

Step-by-step guide: from signing up to launching your AI assistant across Telegram, Web, and WhatsApp.

01
Sign up free

Create your free Botconsole account in 30 seconds. No credit card required.

02
Create a bot

Click "Create bot" in your dashboard to initiate a new automation project.

03
Connect a channel

Link your Telegram bot token from @BotFather, embed the Web Widget, or connect WhatsApp.

04
Apply the template

Open the visual flow builder and apply the ready-made "Quiz bot with result output to the user" scenario in 1 click.

05
Customize to your brand

Edit messages, buttons, product catalogs, lead capture forms, or AI prompt instructions.

06
Publish & go live

Hit "Publish" — your automated chatbot assistant is live and ready to convert customers!

Use this template for free

Create a chatbot in Botconsole

Attract twice as many clients and generate sales on autopilot through messengers with Botconsole.