Generate QR Codes in Documents using Power Automate

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.

  1. Make sure you have the Muhimbi PDF Converter for Power Automate full or free trial subscription installed.

  2. You will need to have the appropriate privileges to create Flows.

  3. 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:

when a file is created

  1. Insert ‘When a file is created (properties only)’ Flow action for Dropbox and select the folder location of the PDF files:

    Folder: */muhimbi documents

    folder with documents

  2. 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’.

list of file names

  1. 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.

list of file id

  1. 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

source file content

  1. 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.

test workflow

When you scan this QR Code you will notice that it reads ‘File Accessed on <<Date and Time>>.

Additional Resources

Power Automate Templates

Articles

Have a Question?
We’re Always Happy to Help.

© Muhimbi Ltd. 2008 - 2023
This website uses cookies to ensure you get the best experience. Learn more