DEV Community

El Bruno for Microsoft Azure

Posted on • Originally published at elbruno.com on

#PowerAutomate – Flow to use Open Trivia Database questions in a Microsoft Teams bot πŸ€– 1/N

Hi !

A couple of days ago, I found a super cool connector in the Power Platform that allows us to get trivia questions from the Open Trivia Database.

I started to play around with the API, and hey, I created a bot that ask questions and present the options for the answers. Here is a couple of samples.

Q: In the first Left 4 Dead, you can play as either of these four characters.

trivia question sample in teams

Q: Which one of the following rhythm games was made by Harmonix?

Open Triviata Database API

OK, so let’s take a look at the API and the implementation. To get started using the Open Triviata Database API, use this URL:


https://www.otriviata.com/api.php?amount=2

Enter fullscreen mode Exit fullscreen mode

This will return an amazing JSON with 2 questions, correct and incorrect answers, categories and more.

JSON API response with 2 questions, correct and incorrect answers, categories and more.


{"results":[{"category":"Entertainment: Television","type":"multiple","difficulty":"easy","question":"In the cartoon 'SpongeBob SquarePants', what did the acronym E.V.I.L stand for?","id":"1086","correct_answer":"Every Villain Is Lemons","incorrect_answers":["Every Villain Is Lemonade","Every Villain Is Limes","Each Villain Is Lemonade"]},{"category":"Sports","type":"multiple","difficulty":"easy","question":"Which city did the former NHL team "The Nordiques" originiate from?","id":"2779","correct_answer":"Quebec City","incorrect_answers":["Houston","Montreal","New York"]}]}

Enter fullscreen mode Exit fullscreen mode

This is super cool, and also is a great starting point for a Power Automate Flow. In next posts, I’ll explain how I created this.

Power Automate to use Open Trivia Database questions in a teams bot

And important: Join me in this 2-week FREE program @msftreactor

and we will learn together about Microsoft Power Pages.

We will also cover fundamentals of Power Pages architecture, components, features, and tooling.

https://aka.ms/DecPowerPagesBootcamp

Starting on Dec 05 πŸ˜€

Happy coding!

Greetings

El Bruno

More posts in my blog ElBruno.com.


Top comments (0)