Generate Barcodes in Documents using Power Automate

In this guide you’ll learn how to add a barcode to a PDF using Power Automate. For this example we add a Codabar to a PDF in Dropbox but you can easily add a barcode to other file types (see file formats we support).

Here are some of the barcodes we support:

  • QR Code
  • Codabar
  • Code 11
  • Code 32
  • Code 39
  • Code 93
  • Code 128 (A/B/C)
  • GS1-128
  • And more

It’s also important to note that in this example we are using Power Automate to add a barcode to a PDF file in Dropbox. You can easily add barcodes to your file in another destination 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 via email.


Before we start building the workflow, ensure all prerequisites are in place. It is also assumed that the reader has some knowledge of building Workflow using MS Flow.

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

  2. Naturally, in Microsoft O365, permission to use Power Automate needs to be available to the user as well.

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

  4. You have a Dropbox account and it is connected with Flow.

Using Power Automate to add Barcode to PDF

Here’s how to add barcodes to PDF with PDF Converter for Power Automate:

create barcodes

  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

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

insert conditin flow

  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.

get file content

  1. Insert the Muhimbi ‘Add Linear Barcode watermark’ action. This workflow action can be used to apply the text to the foreground or background of one or more pages in the document with full control over the font, style, size, and color. The text stored in the content field may contain embedded field codes. MS Flow expressions are also supported, which makes it possible for dynamic barcoding, or barcode information stored in workflow variables, or in the Item’s columns, to be embedded in the barcode.

You can add the following mandatory fields to the action.

**Source file content: *‘***File Content’, which is the output of ‘Get file content’ action.
Barcode content: Enter the data to be embedded in your barcode. You can use embedded field codes, and MS Flow expressions which can use barcode information stored in workflow variables, or in the Item’s columns, to be embedded in the barcode.
Barcode type: ‘Codabar’. We will use ‘Codabar’ for this example. Muhimbi supports multiple barcode types such as Codabar, Code11, Code32, Code39, Code39Extended, Code128, Code128A, Code128B, Code128C, GS1Code128, Code93 and Code93Extended.
Disable check digit: ‘False’ This indicates if the check digit has to be calculated or not Show check digit: ‘true’ This indicates if the check digit should be displayed in the barcode label or not. Position: ‘Bottom Centre’ Select the position in the document where you want the watermark to be displayed.
Width: 100
Height: 50

add barcode watermark

  1. Insert the Dropbox ‘Create file’ action after the ‘Add Linear Barcode 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 Linear Barcode watermark’

add barcode action

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 a barcode.

Additional Resources

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