Extract QR code data in Power Automate
This post is currently being updated
Overview
This post describes how certain Power Automate actions from Aquaforest can be used to extract data from a QR code on a PDF
The Power Automate solution
The QR code displayed in Figure 1 contains the data “123456789, John Smith”. It will be referred to in the example below
Flow – Extract data from QR code/s residing on a PDF
1.) The Aquaforest action ‘Get barcode value’ (Figure 2) extracts the data from the barcode. The data extracted from the QR code in Figure 1 being
{
“pageNumber”: “1”,
“valueExtracted”: “123456789, John Smith”,
“zoneValues”: [
“123456789, John Smith”
]
}
2.) The action ‘Apply to each’ (Figure 3) processes all QR codes found on the PDF
3.) The schema that the ‘Get barcode value’ produces is added to the action ‘Parse JSON’ (Figure 4). This allows Power Automate to be able to parse the values and use them in the remainder of the flow
4.) The value “valueExtracted”: “123456789, John Smith” that is produced by the ‘Parse JSON’ action is assigned to the variable ‘Barcode String’ (Figure 5). (Please note that there seems to be a product bug where the extracted values aren’t always available in the ‘Dynamic content’ window. In this case, it’s necessary to manually type the expression in the ‘Expression’ window.)
5.) The ‘Split’ expression (Figure 6) is then used to extract the delimited values
Client Id is assigned the value 123456789. The Split expression would be used again to extract the client name i.e. split(variables(‘Barcode string’),’,’)[1]
Appendix
Further reading
Apply OCR to a PDF in Power Automate