Power to the developer, and MAGIC!

When a pro-code developer creates magical code, we low-code developers need to assist where we can to speed up the work. We have created a good solution based on Azure AI Services, where we send data from Dataverse via Power Automate to a Python Flask app that translates everything we send into a message delivered to our Howler. Given the time we had, this would not have been possible.

The physical Howler integration is approaching, and the Arduino is working hard. It’s put together by paper, tape and glue. And much love! Here we have an example of what we have in store:

An example of translation and delivery of message follows:
“I don’t like you anymore. You have proven to be untrustful!” -> “Dear Sirius,

Oh, how the tides have turned! I find myself in a whirlwind of emotions, and I must confess, I don’t like you anymore. Your betrayal stings like a Cruciatus curse, and it’s clear you’ve proven to be utterly untrustworthy!

How could you, of all people, turn your back on family? It’s as if you’ve taken a page from the Marauder’s playbook, but this time, it’s not a prank—it’s a dagger to the heart!

Desperation claws at me, and I can’t help but feel the madness creeping in, like a Dementor’s chill. You’ve left me no choice but to sever the ties that bind us.

Goodbye, Sirius. May you find your way back to the light, though I fear it may be too late for you.

Yours in fury,  
Bellatrix”

Our architecture

Nasty Fabricated Data from Faruk

Here comes another update from Fabricator,..

You know the moment when everything is ready with your application, and you need some data for proper testing?
You could search the internet for a dataset, or you could write meaningless strings as data.

However, if your solution includes Power BI reports, you need accurate data so the reports display meaningful visuals.

We used AI to create historical data.
First, we generated real data, then asked the AI to expand it using similar values.

We worked with the following tables:

  • Students
  • Grades
  • Courses
  • Activities
  • Results
  • Feedback

After expanding the student table, we asked the AI to generate the other tables one by one.
In each prompt, we included the previously generated data so the AI would create new rows with matching IDs and related information.
We also asked the AI to generate this data in a lore-friendly way. As a result, our data became very realistic:
For example, Ravenclaw has the best grades overall, and brave students have the highest number of activities.

Fabric And data.

A first time for everything. I want to learn new spells and want to try fabric and power BI for the first time.

Testing import data to Power BI desktop – With both data import and Direct Query.

Setting the Data source credentials to get the queried data to the Power Bi Service.

Test is working – Now lets wave the wand and build!

Fabric

HACK:

Got help from a team in the same house – HUFFLEPUFF POWER.

We can not get the trial to work in our tenant that we have for ACDC, so i had to create a service principal user in the ACDC tenant – and make it available multitenant. And then use this service principal in fabric in my work tenant to get the data in there.

We want to make a lakehouse with fabric, so after the data is clean, we can use it in Power BI and also share the data with other instances that needs to use the data.

Made a new Lakehouse: WizardData

Made the connection to the ACDC tenant

Cleaned the data:

Did this for all 7 tables.

I could not get compliant with the Power BI for my work tenant. So i decided to use Power BI desktop direct query to get the data from Dataverse and build a dashboard.

Start of dashboard: To be continued.

One last comment – We helped another team with the HACK to get the ACDC data into another tenant. COMMUNITY! – SHARING IS CARING!

Nasty Hacks and Magical Shortcuts: A Creative Solution for Spell Management

The Problem: Too Many Spells, Too Little Time

In the bustling chaos of the ACDC Hackathon, we faced a peculiar challenge. Our project needed to process data from a Harry Potter API containing spell names and add them as products in Microsoft Finance and Operations (FO). However, before creating new products, we had to ensure that duplicates weren’t accidentally added.

A traditional solution would involve filtering existing records in FO—a task that’s as slow and resource-heavy as brewing Polyjuice Potion without instructions. With limited time and resources, we knew there had to be a faster, more creative way.


The Hack: Dataverse as a “Logical Trap”

Instead of overloading FO with complex filtering operations, we turned to Dataverse and found a unique, “dirty” shortcut to handle this problem efficiently.

Here’s how it works:

  1. The Spell Log Table:
    We created a custom log table in Dataverse, where each row represents a spell. The table’s key field is the spell name.
  2. The Power Automate Flow:
    • The flow periodically retrieves spell data from the Harry Potter API.
    • For each spell, it attempts to add a new row to the Dataverse log table.
  3. The Logical Trap:
    • If adding the row fails (due to the spell name already existing as a key), we know the spell is a duplicate and skip further processing.
    • If the row is successfully created, the spell is new, and the flow proceeds to create a product in FO.

This clever use of error handling as a control mechanism allowed us to avoid the inefficiencies of traditional filtering.

To better visualize the process, here’s a snapshot of the Power Automate flow at work:


Why This is a NaSTY Hack

This approach bends conventional methods in favor of speed and efficiency:

  • Creative Use of Errors: We transformed API errors (failed row creation) into a functional feature of our workflow.
  • Unorthodox Logic: Instead of directly querying FO for existing records, we let Dataverse act as a “pre-check” system, cutting down on processing time.
  • Quick and Effective: While not the cleanest or most standard solution, it’s perfect for a fast-paced hackathon setting.

Benefits of This Approach

  • Efficiency: Avoids resource-heavy FO filtering, keeping workflows lightweight.
  • Rapid Implementation: Leverages Dataverse’s existing capabilities, saving development time.
  • Hackathon-Ready: Delivers results quickly, aligning with the fast-paced nature of the event.

Challenges and Caveats

Of course, no hack is without its downsides:

  • Not “Best Practice”: Feels a little like cheating and may confuse future developers unfamiliar with the context.
  • Potential Fragility: Relying on error handling for functionality might lead to issues in more complex scenarios.

The Verdict

This nasty hack is a testament to the power of creativity under pressure. By thinking outside the box, we turned a potential bottleneck into an efficient, elegant workflow.

And isn’t that what hackathons are all about—solving problems with a mix of ingenuity, magic, and just a hint of chaos?

#ACDC2025 #DirtyHack #DataverseMagic #PotionProductionPlatform

The Rise of the Nasty Hacker

In the world of technology, there are many paths to greatness, but sometimes, the route isn’t as straightforward as following the rules. Enter the Nasty Hacker: a rebellious tech wizard, crafting super dirty hacks to achieve what others might deem impossible!
These aren’t your typical, squeaky-clean tricks—these are the hacks that bend the system, challenge the norm, and most importantly, achieve pure awesomeness.

In this case, our Nasty Hacker decided to hack… Sorting Hat! He is the wizard who crafts super dirty hacks to manipulate the sorting process and create their own path to greatness. He is the one deciding about your destiny! With a deep knowledge of ancient enchantments, magic, and coding, he aims to rewrite your future with a few clever tricks! But he is busted now! Hands up, Simon!

Let me reveal the secret how he did it. He hacked the Sorting Hat using speech-to-text (Whisper), AI-based language processing (Azure OpenAI), and text-to-speech synthesis (Eleven Labs) to create a more interactive and personalized sorting experience.

But you will forgive him because this is all for creating the most awesome Sorting Hat that you will fall in love with!

Let’s trust Artificial Intelligence with our whole body – an experience

why a flow fails successfully

Prerequisites: When using the response value of the action “Create a text with GPT using a prompt” human approval is required to move on with the flow

https://learn.microsoft.com/en-us/ai-builder/use-a-custom-prompt-in-flow#incorporate-human-review

But let us start from the beginning. What do we want to achieve?

Based on the location of a student, we would like the AI to decide if it’s safe to send out one of our precious, well-cared Owls.

We don’t want to send her out to the terrible snowstorms of Oslo but for sure let them have an enjoyable flight to Paris.

Because we trust the AI with our heart, head, and full body, we obviously just want to proceed with the result.

But: Power Automate just blocks our innovative spirit.

With the usage of the beloved “Create text with GPT using a prompt” action a content approval needs to be added.

Our flow besides that looks quite cheap and straightforward:

It gets triggered once a database row for Student gets added or modified for the city (location)           

We initialize the Location as a new variable and hand it over to a custom prompt we previously created

Based on the answer, we update the preferred contact method of the student:

  • Owl
  • E-Mail
  • SMS

Of course, we only send the owl to nice destinations. In bad weather conditions, we prefer to proceed via Email or SMS.

So. Based on Power Automate, we have to add an approval action that requires human interaction to approve the response from the AI.

How can we skip this? And be fully commited to the Age of Artificial Intelligence?

Step 1: We of course add a “Start and wait for an approval of text” action as desired by Power Automate

We hand over the text response from the AI prompt and send it to Professor McGonagall – a real, mature human being – for approval.

But with a tweak.

Step 2: Adding an Action timeout of 1 second to the Approval action:

As mentioned – we don’t want to wait for human approval. We just want to proceed with the flow. Therefore we set the Action timeout to 1 second, which equals “PT1S”.

Reference to ISO 8601: https://en.wikipedia.org/wiki/ISO_8601#Durations

This will cause the action to time out before Minerva is able to approve or decline it.
Even with all the witchcraft in the world and the elder wand.

Step 3: Creation of a parallel branch after the Approval action

The action will timeout anyway, still we require a happy path for receiving an answer (which is actually just empty in our case) and a path to handle the timeout.

Step 4: Timeout condition

The approval will time out in any case. Therefore a time-out-related action is required.
In our scenario, a condition is whether we can send an owl or not.

Therefore, we set the “Run after” setting to “Has timed out” and proceed with the update of the Student data accordingly to the mighty AI.

Please don’t get confused. The Flow will timeout. That means the flow will fail but still proceed with the update:

The flow times out but still proceeds to update the record as we have planned initially:

Real-time Dataverse data for real-time business overview

What is it good that you can have improved customer communication with chatbots and forums, if the plumbers can’t get notified in realtime of relevant cases? Moreover, Mario and Luigi as CEO and CTO respectively want real-time data for improving decision support (e.g. plumber allocation) and PlumbQuest trends for further analysis.

Dataverse Webhook on Incident reports

To extract real time data, we created a Web hook using the plugin tool box for Dataverse, which calls our Azure Function whenever a new PlumbQuest is made.

XRMToolbox to add a Web hook to Dataverse for real time PlumbQuest analysis

To ensure safe access, function level authentication is applied, where the toolbox allows for HTTP Query parameters, safely accessing our Function which uses a traditional HTTP-trigger:

However – Here is the hacky part. The Web hook payload is too large, which makes the traditional JSON-payload corrupted with highly dynamic lengths and content of each PlumbQuest. Therefore we had to do some custom string manipulation to extract the values of most business and de-corrupt the JSON and preparing it for analysis – Almost a Complete ETL-pipeline (*cough*)!

But to access this real-time data in an Analytics environment – Fabric is the way to go (as by Microsoft huge Hype-wave). We created a Custom app Source for an Event Stream in Fabric with an EventHub output binding, which then can map to many different destinations, including a Lakehouse for historisation and trend analysis, as well as Data Factory Reflexes for reactive actions in real-time.

With Data Activator’s Reflexes directly on the stream, one can e.g. trigger additional flows for highly acute PlumbQuest from members in distress, or highlight plumbers who did not provide proper service according to the PlumbQuest review.

Our Fabric Event Stream with the Custom app as Source and the Lakehouse for historisation and down-the-line processing and analysis

In addition, we set up a Dataverse Shortcut (Link) to Fabric, allowing for direct access to Dataverse without ETL or ingestion, providing ease of access and down-the-line deeper analysis on key business metrics, trends and community engagement.

Our PlumbQuests in Fabric Lakehouse using a Dataverse Connection for e.g. a more complete 365 customer view using Fabric items

Reproducible deployment

Although we are nasty hackers, we are reproducible hackers. As these were the only Azure resources used (directly), we deployed them using bicep and the Azure CLI. Sensitive variables are marked as secure and not included in the scripts, but parameterised.

The main bicep deployment definitions for our Azure Function app and related resources, the resource group naturally had a separate BICEP definition.

So if you want to do it hacky, at least make it traceable.

Nasty Hack

While working with the tiles in the game we kept getting an error message due to Delegation. We didn’t have time to solve this error message, but the game was still working all of the time.

Having to redesign the whole structure just to be in line with a delegation warning was not something we wanted to do, so we found a brilliant way of going onwards.

We simply created our own message over this message in the onload of the game 😉

As stated before, the game still works as it should, but now the user is informed that the map is ready.

Crashing the Azure AI Studio and Copilot

Badges to claim:

  • Nasty Hacker – for retrieving data from 3rd party services and syncing it to the blob storage to connect to Azure AI Studio
  • Data miner – for retrieving the case information from dataverse and calculating the average score using AI.
  • Embedding numbnut – for embedded copilot in Model-driven app
  • Stairway to heaven – for using Azure AI Studio, Copilot, Blob storage, and in previous articles also Azure Function, WebApp

Our solution includes the latest features of the PowerPlatform and Azure connection the Low and Pro code approaches together, to allows you to boost the performance of resolving the cases by using some insights from the Copilot. 

  • The business use case is about complicated cases when we need external consultancy and assistant, so task is to find the suitable Marios-consultants according to the customer request, by searching the professionals on the Indeed, comparing their background and experience and finding the best matches. (to find the suitable Marios according to the request.) 
  • The business use case is about simplify the KYC(Know Your Customer) process by using unified workspace for all operations.  From Indeed we can understand the company background,do semantic analysis of the comments to have insights on how technicians can approach customer (princess) (simplify the KYC(Know Your Customer) process by using unified workspace for all operations.) 
  • The business use case is about analyzing current princess (customer) and her needs based on the Indeed. The data that we were able to retrieve contains open job postings, company in for, recent news and personal profile info. Based on this information, we can suggest more other services and provide information to sales and marketing departments. (analyze current princess and her needs based on the Indeed profile and suggest more other services.) 

We deployed GPT-4 model to our personal instance using AI Studio, then fine-tuned it with company’s internal data and data from open sources like Indeed, Glassdor or proff.no. 

Than using Retrieval Augmented Generation (RAG) technic to inject generative responses from big LLM into answer of Copilot. 

With RAG, the external data used to augment your prompts can come from multiple data sources, such as a document repositories, databases, or APIs. The first step is to convert your documents and any user queries into a compatible format to perform relevancy search. To make the formats compatible, a document collection, or knowledge library, and user-submitted queries are converted to numerical representations using embedding language models. Embedding is the process by which text is given numerical representation in a vector space.  

AI Studio has seamless integrated feature use Azure Blob Indexer to implement search functionality search for AI. It bring the possibility to simplify the access to the Datalake from LLM side.   

By implementing multiple connectors to the third-party services and data sources, together with Dynamic chaining feature of the Copilot it gives cleaner user experience for the user using only one tool for analyses. 

How it works:

Piping our way through the Azure Cloud

To make our amazing service Tubi work, a lot of cloud is needed. We aim to make the plumber’s job easier by recommending the best layout for where the pipes should go, and for that, we need AI. We have trained a model in Custom Vision to recognize all components in a bathroom that need water. So, when the plumber uploads a floor plan to our Static Web App, the image is sent to our Azure Function App backend in C# Asp.net through our own API. But both the image and the equipment list must be stored somewhere. Therefore, we have also connected to Azure Blob Storage. Then last but not at all least. The people working in the back office have instant interactive reports available to help them with filing and billing through Power BI and alerting the using an automated flow (Badges: Feature Bombing)

Sometimes it works, and that’s plenty

Databases are good, but sometimes it’s easier to just dump everything in one place until you need it again. Yes, it might not be very scalable or very normalized. SQL became too heavy, and we already needed a Blob storage to store the images, so we also dump the order data in the same blob storage as JSON files. It’s old fashioned way of serverstorage, and a bit dirty, but it works! (Badges: Nasty hacker, Retro badge)

Power the backoffice

As the final list of components are decided, they still have to be approved from the accounting team in the office. To make sure they have all the information they require, we have developed a Power BI dashboard to crawl through our registered data and make sure the orders are handled properly (Badges: Crawler, Dash it Out, Dataminer). And to make sure the orders are handled easy and fast, the dashboard is embedded into teams and an alert is automated by using a logic app to make sure the workers can receive and cooperate in realtime (Badges: Embedding Numbnuts, Go with the flow, Pug N’ Play, Power user love, Right Now, Stairway to heaven).