cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
haniel
Kudo Collector
Kudo Collector

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
v-xida-msft
Community Support
Community Support

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
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

M365 768x460.jpg

Microsoft 365 Collaboration Conference | December 7–9, 2021

Join us, in-person, December 7–9 in Las Vegas, for the largest gathering of the Microsoft community in the world.

Users online (3,583)