If you’re looking for a way to bring energy and daily interaction into Microsoft Teams, this guide is exactly what you need. With this Daily Teams Quiz Bot Tutorial 2025, you’ll build a fully automated quiz bot using Power Automate, Adaptive Cards, and the OpenTDB API.
Whether you’re an HR manager, team lead, or just a trivia lover, this solution delivers fun and engagement β automatically, every morning at 8β―AM.
β Why Build a Daily Teams Quiz Bot?
Letβs face it β team chats can sometimes feel dull. But a fun, daily trivia game using Power Automate can totally change that. This Daily Teams Quiz Bot Tutorial 2025 helps boost morale, create friendly competition, and promote knowledge sharing without writing a single line of code.
π§ What You Need Before You Begin
To follow this Daily Teams Quiz Bot Tutorial 2025, make sure you have:
- A Microsoft 365 account with access to Microsoft Teams
- A Power Automate account: https://make.powerautomate.com
- An active Teams channel to post the quiz
- Basic understanding of Power Automate and JSON
β Step-by-Step Guide: Daily Teams Quiz Bot Tutorial 2025
π Step 1: Create a Scheduled Flow (8β―AM Daily)
- Go to make.powerautomate.com
- Select Create > Scheduled Cloud Flow
- Name the flow:
Daily Teams Quiz Bot
- Set the schedule to every day at 8:00β―AM

π’ This trigger starts your daily quiz flow automatically each morning.
π Step 2: Add HTTP Action to Fetch Questions
Add an HTTP action to fetch quiz data from OpenTDB.

This fetches 20 medium-difficulty general knowledge questions.
Note: You can customize the API by visiting https://opentdb.com/api_config.php to change the number of questions, category, and other settings as needed.
π€ Step 3: Parse JSON Response
- Add a Parse JSON action to your flow.
- In the Content field:
- Click inside the field.
- Then click on the lightning bolt icon (β‘) to open the dynamic content list.
- Select the Body output from the HTTP action.
- Next, click on βUse sample payload to generate schema.β
- A pop-up window will appear.
- Paste the JSON sample (provided below).
{
"results": [
{
"question": "Where did the pineapple plant originate?",
"correct_answer": "South America",
"incorrect_answers": [
"Hawaii",
"Europe",
"Asia"
]
}
]
}
- Click Done to automatically generate the schema.
- The schema will now appear in the text area below the Content field.

βοΈ Step 4: Initialize Variables
Create two variables:
- Answers β Array (to hold multiple choice options)
- Random number β Integer (to randomize answer position)

π Step 5: Loop Through Each Question
Use a For each loop on the results
array from the parsed JSON.
In the βSelect an output from previous stepsβ field, choose results from the dynamic content list.
Inside this loop:
- Add Set Variable action to set Random number to a random index:
rand(0,3)
- Add another Set Variable action to Re-initialize the Answers array to empty

π§© Step 6: Add Incorrect and Correct Answers
Inside the same loop:
- Use another For each to iterate through
incorrect_answers
- use expression
- Click on the fx icon, then type the following expression into the text area
items('For_each')?['incorrect_answers']
- Alternatively, you can copy and paste it directly using the
@
symbol and curly brackets:@{items('For_each')?['incorrect_answers']}
- Click on the fx icon, then type the following expression into the text area
- use expression
- Inside the For each action
- Add an Append to array variable action.
- In the Name field, select the
Answers
variable. - In the Value field, copy and paste the following JSON using an expression:
{
"title": "@{items('For_each_1')}",
"value": "@{items('For_each_1')}"
}
- After the
For each
loop completes:- Add another Append to array variable action.
- In the Name field, select the same
Answers
variable. - In the Value field, copy and paste this expression to add the correct answer:
{
"title": "@{items('For_each_1')}",
"value": "@{items('For_each_1')}"
}

Important Note: If your flow uses “Apply to each” instead of “For each”, make sure to replace For_each
with Apply_to_each
in your expressions. These names match the exact action names in your flow, but with spaces replaced by underscores.
If you donβt update the name accordingly, the expression will not work correctly.
π Step 7: Shuffle the Answers
Use a Compose action to shuffle the answers
array based on the random number:
@{union(
skip(variables('Answers'), variables('Random number')),
take(variables('Answers'), variables('Random number'))
)}

π¬ Step 8: Post Adaptive Card to Teams
Use Post adaptive card and wait for a response to show the question.
- In ‘Post as‘, select the Flow bot.
- In ‘Post in‘, select Channel.
- In ‘Message‘, add the following Adaptive Card JSON.
- In ‘Team‘, select the team’s name.
- In ‘Channel‘, select the channel’s name.
- In ‘Update Message‘, add the message that will appear in the channel after the user submits their response.
{
"type": "AdaptiveCard",
"body": [
{
"type": "TextBlock",
"text": "Question: @{items('For_each')?['question']}",
"wrap": true
},
{
"type": "Input.ChoiceSet",
"id": "answer",
"style": "expanded",
"choices": @{outputs('Compose')}
}
],
"actions": [
{
"type": "Action.Submit",
"title": "Submit"
}
],
"$schema": "http://adaptivecards.io/schemas/adaptive-card.json",
"version": "1.2"
}

β Step 9: Check the User’s Answer
Add a Condition to compare the userβs response:
- In the ‘Choose a Value’ field, add the following:
body('Post_adaptive_card_and_wait_for_a_response')?['data/answer']
- select “is equal to”
- In the second ‘Choose a Value’ field, add the following:
items('For_each')?['correct_answer']

π Step 10: Update Adaptive Card Based on Result
After checking the condition, add the ‘Update an adaptive card in a chat or channel‘ action to both the True and False branches. This will update the adaptive card in the team’s channel after the user submits their response.
- If the answer is correct (True branch), the card will be updated with a message indicating the answer is correct.
- In the False branch, update the red highlighted text in the JSON (shown below) to indicate that the answer is incorrect. Make sure to replace the red text with a message that clearly informs the user their answer was incorrect.
{
"type": "AdaptiveCard",
"body": [
{
"type": "TextBlock",
"text": "π This question has been answered correctly by @{body('Post_adaptive_card_and_wait_for_a_response')?['responder/displayName']}!",
"wrap": true
},
{
"type": "TextBlock",
"text": "Question: @{items('For_each')?['question']}",
"wrap": true
},
{
"type": "TextBlock",
"text": "Correct answer: @{body('Post_adaptive_card_and_wait_for_a_response')?['data/answer']}",
"wrap": true
}
],
"$schema": "http://adaptivecards.io/schemas/adaptive-card.json",
"version": "1.2"
}

π Key Flow Components Explained
- Trigger: Starts the flow daily at 8:00 AM using the Recurrence trigger to deliver the quiz consistently every morning.
- HTTP: Fetches fresh trivia questions from the Open Trivia Database (OpenTDB) API.
- Parse JSON: Extracts question details and answers from the API response for use in the flow.
- Apply to each: Processes each quiz question individually to generate adaptive cards and handle user responses.
- Adaptive Card: Sends an interactive card to Teams displaying the question and answer choices.
- Condition: Checks if the userβs answer is correct and branches the flow accordingly.
- Update Card: Updates the adaptive card in Teams to show whether the userβs answer was right or wrong, providing immediate feedback.
π Final Thoughts on Your Daily Teams Quiz Bot Tutorial 2025
Using this Daily Teams Quiz Bot Tutorial 2025, you’ve created an engaging, automated trivia system that runs itself every day. It’s a low-maintenance, high-reward tool for team culture, learning, and fun.
You can enhance this bot further by:
- Storing results in SharePoint
- Creating a leaderboard
- Adding categories and score tracking
π Want to Use Excel for Questions and Answers? β Daily Teams Quiz Bot Tutorial 2025
Would you prefer to manage your quiz questions and answers using an Excel file instead of the OpenTDB API? Using Excel makes it easy to update your quiz content without coding, and you can also save winners directly in the Excel sheet π to announce the overall winner at the end of the quiz.
Plus, using Excel does not require a premium license in Power Automate π«π³, unlike the HTTP action that fetches trivia from OpenTDB, which is a premium connector βοΈ.
If youβre interested in a version like this, please let me know in the comments below! π¬ Iβll create a Tutorial Version 2 using the same flow but with Excel integration if thereβs enough demand.
π‘ Bonus Resources
- π Effortlessly Save Email Attachments to SharePoint in 5 Easy Steps
- π Master 7 Power Automate Data Operations Fast and Improve Workflows
- π Master 6 Power Automate Control Actions Easily and Improve Workflow
- Boost Productivity Instantly with SharePoint to Teams Notification (Beginnerβs Guide 2025)
- Effortlessly Create Your First Power Automate Flow from 0