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.


Do your career a big favor. Join DEV. (The website you're on right now)

It takes one minute, it's free, and is worth it for your career.

Get started

Community matters

Top comments (0)

Heroku

Build apps, not infrastructure.

Dealing with servers, hardware, and infrastructure can take up your valuable time. Discover the benefits of Heroku, the PaaS of choice for developers since 2007.

Visit Site

πŸ‘‹ Kindness is contagious

Dive into an ocean of knowledge with this thought-provoking post, revered deeply within the supportive DEV Community. Developers of all levels are welcome to join and enhance our collective intelligence.

Saying a simple "thank you" can brighten someone's day. Share your gratitude in the comments below!

On DEV, sharing ideas eases our path and fortifies our community connections. Found this helpful? Sending a quick thanks to the author can be profoundly valued.

Okay