Do you process your invoices with Microsoft Flow and DocParser?

Every organisation will receive invoices and all of these invoices need to be paid. Or actually should they be paid? Are you sure?

I understand that not everybody has a financial background therefore I will start by explaining the process a bit.

Quite often the purchase process starts with a quote. This quote looks good and you decide to place an order. This is done by sending a Purchase Order (PO) to the other organisation. This is the start of you committing to the purchase. 

Then when it is time to pay for your purchase you will receive an invoice. This invoice could look like the one shown in this post.

A few of the important elements here are:

  • Invoice number
  • PO number
  • To (Who is the Invoice sent to)
  • From (Who sent the PO)
  • Invoice lines

These invoices could come in by email as a PDF or maybe they arrive as a paper copy. I’m going to look at the process of handling the invoice from the point that I have a PDF.

The end aim of this is to update the financial system and my invoice is paid. But only if, it needs to be paid. Therefore we will need to put some approvals in place.

The following approvals are needed:

  • Have the good/services been delivered. This is an approval by the person receiving the goods or services.
  • Is the amount correct?
  • Is the total amount within the budget set by the original quote?

Today I created an invoice handling system for the virtual company Juniper Telecoms using Microsoft Flow and DocParser. With the DocParser connector it is easy to process your invoices or any other document like Bank Statements, Purchase Orders or Contracts.

Just by selecting the right elements on the page the PDF is turned into data within no time.

Time to start looking at Flow.

The DocParser connector has 1 trigger and 2 actions that can be used.

To implement a process as described I decided to create two flows in Microsoft Flow.

  • Submit documents to DocParser
  • Collect data from DocParser

The submit documents flow used the Upload a document to DocParser action to send the document to the queue. This flow triggers by a document being uploaded in a SharePoint library.

Pretty simple isn’t it? Ok, I’ve not included my standard error handling as described in my Try, Catch and Finally Template. But even if I did do that it would still be quite simple.

The next part of the process is to collect the data from DocParser. Starting with the New parsed document data is available trigger.

 

The trigger will return the data for the invoice.

Now with a simple Add a row into a table action I’m adding my data into an Excel spreadsheet table, however you could also add data to a SQL database or whatever you need to update your financial system.

 

Ok, we’ve got the base system ready now.

All we now need to do is add some approval steps using the Approval connector and the process is ready to go into production. Did anybody say that Microsoft Flow isn’t made for Business Processes?

 

 

 

Share
Pieter Veenstra

Business Applications Microsoft MVP working as the Head of Power Platform at Vantage 365. You can contact me using contact@sharepains.com

View Comments

  • Hi Pieter,

    I'm trying to create this flow however I'm having a problem with handling the data coming from DocParser

    The data comes in several separate tables and when I try to add a new row in an excel it loops for each automatically,

    I have 5 pages of invoices - all the same format - and 6 extracts points per page, so when I add the data to excel it gives me 750 rows instead of the 5 rows

    I've tried to format the data either on DocParser and on Flow but Flow always add the apply to each, also tied to create a table (CSV and HTML) from flow but it gives me the same result.

    Strangely when I download the data directly from DocParser to excel it gives me the correct 5 rows per parser

    Can you think a way to overcome this??

    Thanks for your help
    Jose

    • Hi Jose,

      What kind of format would you like the invoices to appear? Are you looking at adding each table of invoice lines as a line in your excel file?

      Are you able to email the example data to me at contact@veenstra.me.uk? Feel free to sanitize the data

Recent Posts

Introducing 8 AI Functions for Dataverse in Power Apps

Recently Microsoft added AI Functions to Dataverse that can be used in Power Apps. In…

15 hours ago

Copy and paste Scope steps in the new Power Automate Designer

One of the outstanding issues with the new Power Automate Designer is Copy and Paste…

1 week ago

Receive the available storage within your SharePoint Online tenant

Within the SharePoint admin centre there is that little detailed overview, telling you the available…

4 weeks ago

Options for Documenting Your Power Apps: Comments, Code, and Controls

Within Power Apps there are various ways to document your app. In this post I'm…

1 month ago

2 ways to duplicate SharePoint Lists to support your Power Apps

Recently I've been asked quite a few times to duplicate SharePoint lists as part of…

1 month ago

Update a Hyperlink Column in SharePoint with Power Automate

Today, I was asked about how to create a lookup to a document or item…

1 month ago