cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
haniel
Level 8

How to easily store email attachments in SharePoint Online and extract data using Parserr

One of my past time hobbies is renovating my home.  I find it quite relaxing to be able to step away from the screen and engage in an activity that lets me use my mind and hands in a creative way.  This is all good, except when it comes time to submit all my receipts for my annual tax return.  Dealing with all the receipts is a daunting task.

A while back, I created my own personal digital record solution on SharePoint Online, where I’m tracking receipts, invoices, tax documents, and general statements separately (I’ll be discussing the details of this solution in another article shortly).  Each of these documents is defined by a different content type with its own metadata site columns.  For this example, I’m interested in the Total amount paid on the receipt.  As I do most of my shopping at Home Depot and there is the option to have the receipt sent to me electronically, I figured why not automate the addition of the document into my records library.  And so, I did, using Flow and Parserr.  The process is broken down into two separate flows as described below.

 

Flow 1:  Copy the document into the Records Library

 

In my case, I’m using Gmail to receive these emails.  The emails that are sent from Home Depot have two common identifiers:

Using this information, I’m able to set up a trigger that will kick-off the flow whenever I completed a purchase at Home Depot.

 

Parserr1.PNG 

 

Next, I extract the attachment, save it to the records library.  It’s important to capture the ID of the file that was created in SharePoint as that ID will be used a couple of time to update the document.  The first time I use the Id is to set the content type to be of type “Record”. 

 

 Parserr2.PNG

 

Once that’s done, I’m sending the same email I got from Home Depot to Parserr.  I’m including the file ID in the first line of the body of the email.

 

Parserr3.PNG

 

 

Flow 2:  Extract the Total from the Receipt and update the File’s metadata

 

Before using Parserr to extract the total amount, I had to set up the service using instructions on Extracting Text from PDF Files.  Once that was done, all I needed to do was to register the Parserr service with Microsoft Flow, setup the “When an email is received” trigger, and then update the file properties with the correct amount.  As you can see in the image below, I’m explicitly converting the document ID to an integer and the amount to a floating number to ensure that they don’t cause errors.

 

Parserr4.png

 

Further Enhancements

This solution can help you cut down time in processing many receipts that are coming from the same source.  As there may be errors in the processing of files (for example, the OCR is picking up the wrong text), it would be good to set up an action that should fire off an email with the link to the document if conversion fails.

Of course, you can set up this type of service for any source of digital receipts and even extract multiple pieces of information in a single flow.

 

 

 

1 REPLY 1
Community Support Team
Community Support Team

Re: How to easily store email attachments in SharePoint Online and extract data using Parserr

Hi @haniel,

 

Thanks for your sharing, your thought inspire me a lot. I would also share the thought that you provided with my colleagues in my team. If you have any questions about Microsoft Flow, please reply here or open a new thread in Flow Community.

 

In addition, if you would like this some new features to be added in Microsoft Flow, please consider take a try to submit an idea to Flow Ideas Forum:

https://powerusers.microsoft.com/t5/Flow-Ideas/idb-p/FlowIdeas

 

Best regards,

Kris

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

firstImage

Incoming: New and improved badges!

We've given our badges an overhaul and also added some brand new ones!

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

sixthImage

Power Platform World Tour

Find out where you can attend!

seventhimage

Webinars & Video Gallery

Watch & learn from the Power Automate Community Video Gallery!

Users Online
Currently online: 296 members 4,751 guests
Please welcome our newest community members: