I have a customer case where the client needs to automatically generate a QR code for rows created in Dataverse for device management purposes.
The internet is full of examples showing how to generate QR codes using Power Automate with paid Power Automate connectors, such as Encodian. These are great services, but they often slow down development because you first need to sell the customer on the idea of purchasing an additional paid add-on. This time, I decided to explore free alternatives for generating QR codes.
At first, I thought about creating an Azure Function App to handle the task. However, setting up an Azure Function App for this Proof-of-Concept case seemed like overkill, so I looked into free APIs for QR code generation. I found a service called quickchart.io (https://quickchart.io/documentation/qr-codes/), which appeared straightforward to use.
Here’s an example of the implementation:
-
I first created an image-type field in the Dataverse table, where the QR code is supposed to be generated automatically.
-
I set up a Power Automate Flow that triggers when a new record is created.
-
A simple GET request is made to the QuickChart API. I formatted the URL as a parameter to be generated dynamically, ensuring that the QR code links to the same record. The customer’s requirement is to print QR codes for devices so that users can easily access the device details in the Model-Driven App via their phone.
Full Flow example:
URL format:
quickchart.io/qr?text=https://customerenvironment.crm4.dynamics.com/main.aspx?appid=12312412412124%26pagetype=entityrecord%26etn=xx_entityname%26id=RECORDID&format=base64&size=800
And here we have it:
The implementation is quite simple. I haven’t yet explored the limitations of QuickChart’s free version, but it seems to work well for this PoC. In a real-world scenario, I might still opt for a Function App, but this is a great starting point!