Bowser Quiz

With this blog post we aim for the Go With The Flow, The Existential Risk, Mario badge and Plug N’ Play.

  • The Mario Badge for the gamification of Copilot.
  • The go with the Flow and Existensal Risk, because the use of Prompts with CHAT. One prompt to check if answers are correct or not The other prompt tells if the answer is Correct or Incorrect and will use this to send an action to power automate to populate a dataverse table.
  • The plug N´play for the use of prompt plugins in copilot.

Video of the in progress solution:

Steps:
Opening the admin center at https://aka.ms/ppac

Enabled Copilot for the Environment:

The Copilot component is ON in Canvas App:

Copilot

Found a website with Mario facts: https://kids.kiddle.co/Mario
Also uploaded a PDF with mario facts.

Conversation start

Conversation end or start again

  • Tested Generative AI inside the copilot studio, got answers, but could not check the answers with generative AI, it was good to give the answers, but not good to check if the answers is correct.
  • Made a power automate flow that generates a text with AI builder. – But it had limitations, it stopped with that you had to have an approval of text before i could process it.

So the next step i did was to try the new Prompts in Copilot studio: (It took many iterations of the prompt to make the copilot say if it was correct or incorrect).

Started making the Quiz topic that is the “game”, to test if it would work like i thought:

It works

Next STEPS:

Send correct answer to dataverse table to score a point:

Add the Copilot(chatbot) control to the canvas app:

Thievery for a good cause!

We wanted to out Mario Detection Systems cameras to be small ( -ish), to be more difficult for the Mario Bros to detect, so naturally we settled on using a Raspberry Pi to run our Mario Detection software. But can a Raspberry Pi even run this software? Can it even be done?

Well, luckily we found OpenCV, an open source computer vision library!
And even better, we found Caroline Dunn’s facial_recognition repository on GitHub, which specifically tackles facial recognition on the Raspberry Pi 4. This was a natural “Yoink!” for us.

After a little bit of tweaking, we can now detect Marios and Luigis, and upload the images to our Sharepoint with a Power Automate flow!

Most of my contribution:

Sometimes, it’s better to let someone else do most of the hard work 🙂

It begins, level 1 for plumber certification done

New aspiring plumbers can now apply do get rank 1 certification through our certificatior app.
If completed a badge will be generated on SharePoint in the users own folder!


Go with the flow clairification:
Heres the code that runs the flow (second red line) to create a user folder in sharepoint with the corresponding badge.

First updating data verse from the cansvas app – then triggering the flow in context of the authenticated user
The actual Power Automate flow

Retro badge statement:
I mean, look at the apperal used…. nothing more retro than that!

Thieving, shameless…
Using unsigned gamepad hax code component to fire up the (retro) controllers, happenly stolen from John Lius Github: GitHub – johnnliu/gamepad (Thanks John)
In addition we have stole more than a few dozens of original super mario assest from the dark corners of the internet ( dont tell anyone)!


🚀 Automagical Fairs and Shouts to Fellow Pirats using Service Slave Workers 📣

When plundering and sailing keeping track of pesky DM’s is no job for the captain or crew. This’ why we summoned the services of Power Automate and Power Apps to do our bidding: Enabling our ship to run smoothly and commands being forwarded at the correct time to the correct people.

It all starts with the Consumer of Data “Power Automate” who collects data from all our different intelligence points. Working in the shadows, this ghost can be attached to any workflow. Currently, since it thrives on human flesh for its operations, we started by attached to our crew log. Whenever Power Automate smells the fear of a new deck hand, laddie or lassie onboard it goes to work!

On a new pirate record Power Automate does two things:

  1. Creates an Adaptive Card in teams and posted it to the ships group chat
  2. Sends a welcome e-mail to the fresh pirate, explaining how they need to obey or walk the plank (all pretty standard pirate stuff).
Current Dataverse Tables the flow can write to and read from.
Power automate flows that creates and updates records, when records for pirates are updated we trigger a Teams Integration.

Making the Captain’s work Screen Agnostic

We further improve the Captain’s life with Power Apps connected to the Power Flows. The Power App sits on the users phone, implemented via Teams or as a standalone app, and enables the Captain to administrate the crew roster, so any stowaway can be added to the crew and receive the required e-mail package with plank rules and NDA’s. This mobile approach lets the captain be in full control even when venturing away from his cabin and the desktop computer therein.

Screen snippet showing Power Automate triggering Teams Adaptive Card on new shipmate record.

The convenience of having the Power Apps in teams means the captain can manipulate his Ship, The Raids and roster from any surface, be it mobile, desktop og even tablet!

Screen snippet showing the Power App integrated into a Teams. Notice the responsive nature of teams adapting to any viewport.

Using Power Apps means we can also simulate raids adding new test data on the fly, without it needing to come from our Power Automate flow.

User generated Raids in the raid table, created directly within Power App.

In Summary, for Sleepy Pirates:

  • The Power App enables our users to directly manipulate our data storage.
  • The Power Automate allow other sources and application to remotely access our data.

Capture new pirates

When we need new pirates on our crew we have an app where we can take their picture, and the app send the picture to a server that uses AI to piratefy your face.

The app is a Canvas App with a camera control on the first screen

When user click the camera control they navigate to the next screen where they will see their picture.

They can go back and take a new picture if they are not happy, or move on to “Piratefy me”.

If user click the “Pratefy me” button a power automate flow is triggered. We pass the image base64 value as a value and store the reply value in a variable.

The flow is “Me as a Pirate”

The trigger is a power apps trigger.

First we initiate reusable variables

We grab the image value from the Power Automate

Passing the image over to the CLIP service powered by Stable Diffusion at the Frogner/Oslo datacenter we annotate images to mostly correct the gender or non-gender of the person in the photo. This is our responsible way to ensure the pirate representation of the person is not turning the most beautiful guy and girl into something they definitely don’t identify with.

We parse the response we get

Next we pass in the captured photo, and overlay it with some serious pirate’y prompting to ensure our new crew mates meats the bar (and also the real bar when port-side).

We need to modify the image string to make it the right format for the Ai to handle.

We trigger a child flow (documented further down)

We gather the reponse and send it back to the Power App.

The flow triggered as a Child flow is called “get Crew Member Data – PirateGDP”

The core API in out solution is PirateGPT, a large language model fully capable assigning awesome pirate names and corresponding ships, with the identifiable traits of the pirate. Which we as a responsible HR ship keep fully secure and up to date as needed. When you have seven John’s on one ship, it’s quite important to distinguish them by traits such as red beard or cock farmer.

We PARSE the results we get for get the right format

Respond with the values to the “parent” flow

The Power App

Back in the Canvas App the user will see the newly created name and their picture Piratified:

It also navigate to the next screen where they will see the pirate name they are given and their picture Piratified.

If this isnt glossy and extreme business value, I don’t know what is?

Imagine this being a manager taking pictures of new employees. We all know that Gen Z are used to looking at themselves with prettifying filters. This way the old middle manager can take pictures of their new employees and let Open AI add the familiar filters so that when the Gen Z employee see their own new profile picture they will actually recognize themselves.

Badges

Glossy Pixels – because pirates are beautiful.

Go with the Flow – because it’s all flowing left and right

The Existential Risk – Who knew LLM could be used to generate schematized JSON data structures, and who knew all those crazy internet pics would be the basis for pirate faces of 2023?

ACDC Craftman – All API’s are tested and documented in a shared Postman collection, all is ran over https (not from the beginning) to avoid photo snooping, and API keys are used as the extra layer. No one wants to be the next TMZ victim!

Mates Upcoming Raid…

Eyyrr mates!!! 

Captain Black Bart, is planning a big raid, Oslo is the target and according to ChatGPT the loot potential is #awsome.

Invitation is sent to all chosen crewmates using top of the art “Power Automate flows”. 
Crewmates are free to Accept or Decline the raid invitation.   

When it’s time for the raid, we requires all crew members who have accepted the raid to check in, using their RFID card or phone. 

If the crewmate have accepted more than one raid, he/she can choose to check in using our Raid Planning App 

With the help of Midjourney AI, https://docs.midjourney.com/,  we generated the app design component by asking the AI to provide us witht the latest & greates piracy themes.  
 

The RFID data for all potential crewmates is stored in Azure AD using the “Postal Code” field, pretty “Nasty Hack” according to our “bosun”. 

This data is imported to Dataverse “AAD User” virtual table for our app. 

Let’s raid mates. 

Kraken’s Masterpiece

As we have mentioned before, our ship data comes from Kystverket. We expect high data quality and in the early days of pirating this was achieved by importing excel lists where the pirates had used much time to track down the ships in order to maintain accurate positions. Now this work poorly as the amount of ships has increased and the time used to maintain the lists resulted in ships sailing to the next city before we could even detect it. In other words, the ship had sailed. Therefore, we had to make a more efficient way to load the same data and keep it consistent with Kystverket. By using power automate we created a flow that contacts their api and fetches data from premade bounding boxes around the Norwegian coast. It deletes ships out of range and updates the location of those who remains. If new ships occur in our areas, they are created in Dynamics 365 and we will know!

By making the data collecting process more efficient for our pirates using data from other sources, we hereby claim the Go With The Flow and Dataminer badge!! Argh 🙂

New Pirate Registration – Flow and 3rd party data

Pirates and singers are alike. They need a great stage name for people to remember who they are. When a new pirate arrives at the harbor master looking for work, the first thing they need to do is find a good name.

Just imagine what EMINEM would be if his artist name was Marshall Bruce Mathers III !!

The Harbor Master enters the new pirate to the system, and lets the AI tool decide what type of name suits the new pirate the best.

On the save, a Power Automate fires off a querry to OpenAI via a custom connector with the querry “Give me a pirate name for *Full Name*”. The return is then entered on the contact card.

Flows just makes everyones day better!

Our Pirates are not happy that all the tasks they get assigned in F&O only are available there. Why should they need to log in to F&O to see them or get an email notification that they have been assigned a new task? We all know that there are more than enough emails going around, so let’s make it easier for everyone. This flow automatically includes the tasks that are assigned to you for Onboarding or Offboarding processes in F&O directly to you Microsoft To-Do list through Planner. Then they pop stright up in you list, and you can handle it from there. Pretty cool, right?

The Jackpot App :: Pirates fleet enlisting

The reason we are calling this the jackpot app because we believe that it’s hitting multiple score-points!

The idea of this app is to enlist pirates’ fleet without a single character punch!!! Aided and infused by AI Builder, external API’s and Power Automate Flows; this Power Apps canvas app is state of the art geekiness!

Although, registered vehicles are the last of our worries (as pirates), but hey we thought of doing it anyways 🙂 The app starts by taking a picture of the registration plate of the vehicle. the app will send the picture to the AI Builder through a power automate flow that process the image and read the registration plate and show it on the app for confirmation.

Once the you are satisfied with the result, you can check the vehicle against the national registry and search for more registration information. This indeed does check the car against the Norwegian car registry (Statens vegvesen) show if the vehicle is approved for going on the European roads (EU-godskjenning). Also least of our concerns!

Actual data from Statens Vegvesen
Crawling and datamining data from external sources

Now, after confirming and inserting car data into our system. We need to identify the vehicle type and compare with our collected data in our backend system. However, identify the care is a simple process that doesn’t need any text input from the user. One picture will do while the AI Builder will take care of identifying the type of the vehicle and insert it into our backend system.

Vehicle plate identification flow (calls another flow through HTTP)
AI Builder made as an endpoint (all AI Builder models and flow are on separate environment, as AI Builder
can’t be included in a solution for deployment)

We are using a mix of built-in and custom AI models to achieve efficiency and productivity in an innovative way.

AI Builder model