In this guide you’ll learn how to create a QR Code in a document using Power Automate. For this example we add a QR Code to a PDF in Dropbox but you can easily add a QR Code to other file types (see file formats we support).
QR Codes are two-dimensional barcodes that are often used by mobile devices to scan and quickly access information. You can also use QR codes to store all meta-data such as a Document ID, last update time, author, and more.
It’s also important to note that in this example we are using Power Automate to add a QR code to a PDF in Dropbox. You can easily add QR Codes to PDFs in other destinations like SharePoint, Google Drive, OneDrive, or any platform supported by Power Automate. You can also extend our example by adding additional automation like sending your file as email.
Prerequisites
Before we start building the workflow, ensure all prerequisites are in place. It is also assumed that the reader has some knowledge of building Workflows using Power Automate.
Make sure the Muhimbi PDF Converter Services Online full, free or trial subscription is installed.
Naturally, in the Microsoft O365, permission to use Power Automate needs to be available to the user as well.
You will need to have the appropriate privileges to create Flows.
You have a Dropbox account and it is connected with Flow.
Using Power Automate to add QR Codes to PDF Documents
From a high level the workflow will look as follows:
Insert ‘When a file is created (properties only)’ Flow action for Dropbox and select the folder location of the PDF files:
Folder: */muhimbi documents
Insert ‘Condition’ Flow action and set the condition as follows:
‘List of File Names’, which is the output of ‘When a file is created (properties only)’ action, ends with ‘,pdf’.
If the step above evaluates to true, add the ‘Get file content’ for Dropbox action in the ‘If yes’ box. Enter the following:
**File: *‘***List of File Id’, which is the output of ‘When a file is created (properties only)’ action.
Insert the ‘Muhimbi Add QR Code watermark’ action and add the following mandatory fields to the action.
**Source file content: *‘***File Content’, which is the output of ‘Get file content’ action.
Content: Enter the detail you want to be captured in the QR.
Version: Auto.
Input mode: Binary
Error correction level: Low
Position: Top Center
Width: 100
Height: 50
- Insert the Dropbox ‘Create file’ action after the ‘Add QR Code watermark’ action.
The action has three main parameters
Folder Path: The Path of your destination Folder.
File name: ‘**List of Files Name’, which is the output of ‘When a file is created (properties only)’ action..
File Content: ‘Processed file content’ is the output of action ‘Add QR Code watermark’
You can test this workflow by uploading a PDF document to the Dropbox location. This will trigger the Flow after a minute and create a new document with QR Code as per screenshot below.
When you scan this QR Code you will notice that it reads ‘File Accessed on <<Date and Time>>.