How to Read Barcodes in Power Automate with AI

You can read barcodes from documents in Power Automate using Encodian Flowr’s Barcode – Read (AI) action.

In this tutorial, we’ll create a flow that runs when a delivery note file is added to a SharePoint document library. The flow reads barcodes from the document, finds matching records in a ‘Deliveries Tracker’ SharePoint list, and sets each record’s Status column to Complete. If no barcode is detected, the flow sends a notification email.  

Try Flowr for Free More tutorials

You will learn

Using Flowr actions

Configure the Barcode – Read (AI) action in Power Automate

Data processing

Read and process the barcode values returned by the action

Downstream automation

Use the extracted barcode data in subsequent flow actions

Error Handling

Handle cases where no barcode is detected

Prerequisites for this tutorial

  1. A test delivery note / file containing at least one barcode 

  2. A SharePoint list that tracks deliveries with Delivery Number and Status columns

  3. An active Encodian Flowr subscription or trial
    Not got a Flowr subscription? Start your free Flowr trial today →

Flow structure

When a delivery note is uploaded to SharePoint, the flow retrieves the file, extracts its barcode values, checks whether any barcodes were detected, finds the corresponding delivery records and updates their status.

When a file is created

Get file content

Flowr Logos

Barcode – Read (AI)

Return barcode array

Use returned data

How to read barcodes with Power Automate

1

Create a new SharePoint document library

Add new document library

This is where you will upload the files you want to scan for barcodes. The flow will run automatically when a new file is added to this library.

2

Create a new automated cloud flow

Create new automated cloud flow
3

Configure the trigger

Configuration of the 'When a file is created in SharePoint' trigger action

These settings trigger the flow automatically when a file is added to the Delivery Notes document library.

4

Get the file content from SharePoint

Configuration of the 'Get File Content' action

Encodian Flowr’s Barcode – Read (AI) action requires the file’s binary content as input.

SharePoint’s Get file content action retrieves the File Content object for the new file.

5

Read the barcode using Encodian's 'Barcode - Read (AI)' action

Configuration of Barcode - Read (AI) action

Encodian Flowr’s Barcode – Read (AI) action analyzes the file’s content, identifies any barcodes, and returns their values.

OPTIONAL: Set the advanced parameters to include or exclude specific pages, process the request using a specific culture, or remove control characters from the barcode values.

  • Start Page: Sets the first page to read.
  • End Page: Sets the last page to read.
  • Remove Control Characters: Specifies whether recognized control characters should be removed from the returned values.
  • Culture Name: Change the thread culture used to process the request.
6

Understanding the 'Barcode – Read (AI)' output

Output of Barcode - Read (AI) action when provided with a document containing 0 barcodes

"barcodes": [],

Output of Barcode - Read (AI) action when provided with a document containing 1 barcode

"barcodes": [
"value1"
],

Output of Barcode - Read (AI) action when provided with a document containing 2 barcodes

"barcodes": [
"value1",
"value2"
],

Encodian’s Barcode – Read (AI) returns the barcode values in the Barcodes array, even when the file contains only one barcode.
These examples show the output when a file contains no barcode, one barcode, and multiple barcodes.

The Barcodes output is then available as dynamic content for use in subsequent actions.

7

Check whether a barcode was detected in the document

Condition expression that checks whether the length of returned array is greater than 0

This confirms that the Barcode – Read (AI) action has returned at least one value.

8

Process each returned barcode value

Get items action with the Filter Query set to DeliveryNumber eq '@{items('For_each_barcode')}'

In this example, SharePoint’s Get Items finds matching delivery records in a SharePoint list.

For each loop with Barcodes array as input

When you select the Barcodes output, Power Automate automatically adds a For each loop, since the output is an array. The loop runs through the enclosed actions once for every returned barcode, even when the array contains only one value.

Update Item action with Status column set to 'Complete'

SharePoint’s Update Item action sets their Status value to Complete to update each matching record.

9

Handle the case where no barcodes are detected

Send an email (V2) action with the subject and body notifying the chosen user that no barcode was detected.

When the Barcodes array is empty in this example, the flow sends an email to notify a user that it could not update any delivery records from the supplied file.

10

Test the final result

Final flow that reads and processes barcodes

The final flow will look like this.

barcodes output from Barcode - Read (AI) action

Encodian Flowr’s Barcode – Read (AI) action reads the barcode from the delivery note:

"barcodes": [
"DEL-2026-123"
],

Get Items action output

The flow retrieves related delivery records in the Deliveries Tracker SharePoint list.

List item updated with Status column equal to 'Complete'

Records whose Delivery Number matches the returned barcode value are updated so that their Status equals Complete:

"$filter": "DeliveryNumber eq 'DEL-2026-123'"

FAQs

?

Can Power Automate read barcodes from documents?

Yes. You can use Encodian Flowr’s Barcode – Read (AI) action in Power Automate to detect barcodes in a document and return the barcode values for use in subsequent flow actions.

?

Can Power Automate read multiple barcodes from one document?

Yes. The Barcode – Read (AI) action returns detected barcode values in the Barcodes array. If multiple barcodes are detected, Power Automate can process each returned value individually using a For each loop.

?

What happens if no barcode is detected?

If no barcode is detected, the Barcodes array returned by Barcode – Read (AI) will be empty. You can use a Power Automate Condition to check whether the array contains any values and define what should happen when none are found.

In this tutorial, the flow sends an email notification when no barcode is detected.

?

How do I use a barcode value in Power Automate?

The barcode values returned by Barcode – Read (AI) are available as dynamic content and can be passed to subsequent Power Automate actions.

For example, you could use a barcode value to find a matching SharePoint record, update an item, route a document, rename a file or trigger another process.

?

Can I choose which pages Power Automate scans for barcodes?

Yes. The Start Page and End Page parameters in Barcode – Read (AI) can be used to specify which pages of a document should be processed. This is useful when you know where the relevant barcode appears and don’t need to process the entire document.

Troubleshooting

Below are solutions to common issues you may come across when building your flow.

Still struggling with your flow? Our Support Team would be happy to help!
Click the link below to raise a ticket on our support site.

Contact Support

Next steps

Now that you can read and process barcode values in Power Automate, you can use the extracted data to build more advanced document automation workflows.

  1. Process documents based on barcode values

    Use the returned barcode data to automatically identify, categorize or route documents. For example, move delivery notes to the correct SharePoint folder, associate documents with existing records, or trigger different processes based on the barcode value.

  2. Extract more data from your documents with AI

    Barcodes are often only one part of the information you need from a document. Combine barcode reading with Encodian Flowr’s AI document processing actions to extract additional information from invoices, delivery notes, forms and other business documents.

  3. Build end-to-end document workflows

    Continue the automation after the barcode has been identified. You could rename or convert the document, update SharePoint records, generate new documents, send files for approval or signature, and archive the completed documents automatically.

More tutorials

Ready to automate barcodes with AI?

Start your free trial of Encodian Flowr for Power Automate to unlock over 250 actions for document automation.