• Skip to main content
  • Skip to primary sidebar
  • Skip to footer
  • Home
  • Blog
  • Power Platform
    • Power Apps
    • Power Automate
    • Power BI
    • Power Virtual Agents
  • Dynamics 365
  • Azure
  • About Me
Joe Gill Logo

Joe Gill

Microsoft MVP - Power Platform Consultant

Home » Power Platform » Power Automate Desktop – Document Automation

Power Automate Desktop – Document Automation

9th June 2021 by Joe Gill

At Ignite this year Microsoft announced that anybody running Windows 10 can now use Power Automate Desktop for free. Power Automate Desktop empowers users to automate repetitive tasks they run on their Windows desktops. In this post I wanted to demonstrate some of its extensive capabilities by using Power Automate Desktop for Document Automation extracting the contents of invoice received as emailed PDFs, and using RPA, Robotic Process Automation, to enter the details into a legacy application.

I previously did a post where I used Forms Processing in AI Builder in combination with Power Automate Desktop for document automation. This scenario requires paid license to run and here I wanted to see if I could accomplish something similar using the free version of Power Automate Desktop.

Power Automate Desktop supports the automation of a range of tasks including

  • Send and receive emails
  • Extract data from websites
  • Connect to databases and run SQL queries
  • Write, copy files and folders
  • Robotic Process Automation

Getting started with Power Automate Desktop

To get started with PAD you download it from here. Once installed, configure it to run under your account. If you are using a work or school account the PDA flows you created will be stored in your organisation’s default Dataverse environment.  In this example I using a regular Microsoft account so my PDA flows will be stored under the apps folder on OneDrive. Click the New Flow option to create a new Flow and give it a name.

Power Automate Desktop - Document Automation - Joe Gill

The Power Autoname Desktop designer will open and you can begin to add actions to your Flow.

Power Automate Desktop - Document Automation - Joe Gill

Document Automation Flow

The first actions in my Document Automation Flow are to launch Outlook and retrieve emails with invoices attached. For the retrieve emails action, I have specified the outlook account to use and that only unread emails are to be processed. The email’s attachments are saved into the c:\invoices folder.

Power Automate Desktop - Document Automation - Joe Gill

The next action is to get all the files in the c:\invoices folder. I used a *.PDF filter to avoid picking up any email signature graphics. A for each loop is then used to process each file.

Power Automate Desktop - Document Automation - Joe Gill

Within the loop I used an “Extract Text from PDF” action to extract the text from the invoice PDF creating a variable with the text below

Power Automate Desktop - Document Automation - Joe Gill

The Extract Text from PDF action is very good at extracting text from structured documents like invoices. The results resemble a named value pair list.

ABC Limited
No 1 Patrick Street 
Cork
A1 2AA
Ireland
Number: 1
Date: 6th Nov ’20
Due By: 4th Dec ’20
Account: ABC
Purchase Order: PO 2020198391
Sales Invoice
Net: €5,000.00
VAT @ 21%: €1,050.00
TOTAL: €6,050.00
Qty Descrip on Rate Total
1 Consultancy 5,000.00 5,000.00
666
Contoso
Cork
Ireland VAT Number: A5340439

Now use Parse Text actions with a regular expression to extract the required data values from the extracted PDF text. I have used three Parse Text actions to get the invoice number, purchase order number, and total amount.

Power Automate Desktop - Document Automation - Joe Gill

It is good practice to rename the variable where the match is stored as it makes it easier to follow when you use it later in the flow.

RPA – Robotic Process Automation

Now that we have extracted the required data from the invoice PDF we can utilize the RPA capabilities of Power Automate Desktop to enter these details into a legacy application. Power Automate Desktop allows you to record your mouse movements and data entry and use it in your Flow. Here I am calling a Win Forms application and in these scenarios I usually add the action to start the application manually before I begin recording.

Power Automate Desktop - Document Automation - Joe Gill

To begin recording click the desktop recording option from the op of the designer.

Power Automate Desktop - Document Automation - Joe Gill

Once the recorder opens start recording and the actions you carry out will be recordered

Power Automate Desktop - Document Automation - Joe Gill

Once you click finish the recorded actions are added to your Flow. You should now edit the actions replacing the text in the recorded actions with the variables from the Parse Text actions.

Power Automate Desktop - Document Automation - Joe Gill

The final step within the loop is to delete any files from the c:\invoices. Once the Flow process an email it is marked as read and so won’t be picked up the next time the Power Automate Desktop flow runs.

Summary

Hopefully, this post has demonstrated the power of Power Automate Desktop, pardon the pun. To summarise, I was able to create a flow to download invoices received via email as PDFs , extract the invoice data and use this to replicate a user entering it into a legacy application. I have only scratched the surface of what can be accomplished with Power Automate Desktop. There are a ton of other capabilities you can use for free and I would encourage you to give it a go.

Share This On Social:
  • Tweet
  • Power Automate Desktop - Document Automation - Joe Gill

Filed Under: Power Platform

Primary Sidebar

Popular Categories

  • Power Platform
    • Power Apps
    • Power Automate
    • Power Virtual Agents
  • Azure
    • Logic Apps
  • Dynamics 365
  • .NET
  • AI
  • SQL

More to See

Power Platform Requests – Base Request Capacity

17th December 2020 By Joe Gill

Power Automate Desktop

Power Automate Desktop – UI Flow

26th November 2020 By Joe Gill

Synapse Link for Dataverse – Metadata

5th July 2022 By Joe Gill

extract table from pdf and write as csv file using Power Automate Desktop

Extract Tables from a PDF using Power Automate Desktop

23rd May 2022 By Joe Gill

Tweets

Footer

Joe Gill

Microsoft Business Applications MVP – Power Platform, Dynamics 365 and Azure.

An architect with over twenty years experience designing and developing technology solutions. Specializing in the Microsoft technology stack including Power Platform, Dynamics 365 and Azure. Microsoft MVP Profile

Connect on Social

Useful Links

  • Home
  • Blog
  • About Joe Gill
  • Power Platform
  • Dynamics 365
  • Azure

Featured Posts

Power Platform Requests – Base Request Capacity

Power Automate Desktop – UI Flow

Power Fx Formula Columns in Dataverse

Synapse Link for Dataverse – Metadata

Extract Tables from a PDF using Power Automate Desktop

Dataverse Anonymization

© 2022 · Joe Gill