This video tutorial shows how to use the AI Builder in Microsoft Power Automate to extract PDF data and save it to Excel. In the example, we use PDF invoices, but it could be any PDF sample type.
📁 Download the Sample Invoices:
🔹 Full Power Automate Course:
FOLLOW ME:
👨👩👧👦 Discord:
💼 LinkedIn:
📸 Instagram:
👨 Facebook:
🐦 Twitter:
💌 Email Newsletter:
MY GEAR (Amazon affiliate):
🖥️ My monitor
Samsung 49-inch CRG9 Curved Monitor =
– If you are buying this, I can recommend the Mi Monitor Light Bar =
💡 Lights
IVISII 19 inch Ring Light and Stand =
Godox TL60 RGB Tube Light =
⌨️ Keyboard
Logitech Backlit Keyboard =
📹 Camera
Sony FDRAX53-B =
Lenovo 500 Full HD Webcam =
🎤 Microphone
Rode Wireless GO II =
Blue Yeti =
0:00 Intro
We want to extract data from PDFs with Power Automate and save it to Excel. Download the Sample Invoices: Inspect the PDF data before you start building.
2:44 Create a model with AI Builder
We create a model in AI Builder. Because it’s structured data we use Forms Processing. We can extract both fields and tables from the PDF. Our model will also work with JPGs and PNGs. Create a collection of 5 sample PDFs. Tag the PDF documents (= tell Power Automate where our structured data is). Train, test, and publish the AI Model.
11:28 Use the AI Model in Power Automate
We’ll create an automated cloud flow, where each time we receive an email with a PDF (invoice) attachment, we’ll extract the data out of the PDF. Chose an Apply to Each and loop through the attachments of each email (there can be more). We save the data from the PDF to Excel Online (OneDriv) – remember to format the table in Excel as a table (important). Use the ‘Extract information from forms’ activity to use our created AI Model. Finalize it by using the ‘Add a row into a table’ that will add the data into our Excel database.
22:00 JSON Parse a PDF Table with Power Automate
Our table comes with all the entries and their info. That’s a JSON structure. JSON is an efficient way of transferring data and it’s very easy to make it pretty, so we can use/store the data. We’ll write a simple function….(read more)
Convert Word 2 PDF: Word to PDF Converter
Convert PowerPoint 2 PDF: PPT to PDF Converter
Convert Excel 2 PDF: Excel to PDF Converter
Convert an Image 2 PDF: Image to PDF Converter
Convert HTML 2 PDF: HTML to PDF Converter
More Tools: PDF Converter
How to reconcile the extracted data and make the system to get auto trained on errors and exeception.. Like in Abbyy we have verification stations
I want to use this to extract data from multiple clinical records, NLP, (multiple pdf files) and organize it into an SQL/Excel file, with the variables I choose. Is it possible?
Superbly explained 🙂 I just want you know if the Trigger mode can be changed from "New email received" to files added to a folder and the data are extracted ?
My work group adds all working files (PDF, Excel, Word, emails…) for each company division into a single PDF file as attachments. I can't convince them that is stupid and inefficient, they think it looks organized. So, that leaves me with trying to figure out how to automatically copy one Excel file out of each PDF binder back to SharePoint folder so my Power Query/Power Automate can work. Not sure if there's a way to automatically copy that Excel out of each PDF binder…
Great resource. Thank you Anders for sharing this.
Great video! I'm considering using Power Automate to extract data from a large PDF file that consists of different kinds of reports. Within the file, there may be multiple instances of the same report for different objects/parts. Additionally, there are some irrelevant pages that it should ignore. It's kinda a big investment, so do you think I can use it for this purpose?
Hi Anders Thank you for making this video,
i wanted to ask how can i extract the multiple same types of data from the same page !
for example:
my single page pdf has 10 mulitpule choice question,
i trained the model ,
now my question is how to extract all 10 questions and answers (trained model datas) from same page??
Thank you!
Hi Anders, I'm trying to create an exact model with the same flow, however the PDF I need to extract data from has multiple pages (and the number of pages vary from week to week). I currently leave the page range blank under "Extract information from documents" and the data imported into excel is only a very small portion of the multiple pages in my pdf. Is there a solution to this? Thank you for your time
Anders, this is a most excellent video! Thank you for putting it together. I'm going to give it a try myself. The Payables staff will love me… 😉
I have issue to get value that is negative into excel when extracting info from PDF, sample 123.90-, it just put nothing in field?
17:33 Extract Information from forms is no longer exist. it's change to Extract Information from documents
It goes really fast after 24:00. Without any experience with JSON or the formula syntax, it's daunting. I was lost there.
There are few greater wastes of human brain power, intellect, gray matter, whatever you want to call it… than data entry. I despise it. It must be eliminated. This a good step forward. Thanks for this excellent tutorial.
Does anyone know how many AI Builder service credits per page this method consumes? The Microsoft Power Platform Licensing guide claims it is 32 per page for invoice processing if the operation type is "prebuilt," but how do we know if this is prebuilt or not? Also, aside from the AI builder credits, does this method need the attended RPA power automate license or is the regular non-RPA power automate per user license OK?
Quick question; when testing OurItem either doesn't populate or it populates with the raw code again. What do I do?
You have the best Video on this Topic ,even Microsoft would envy this !
Great video Anders.
Love this capability within Flow but sometimes I don't get the "File Content" option to populate the Form field. Tried various triggers with success but the one i need to use is "When a File is created in a Folder" (I'm using Document Sets). Do you know how i can get the File Content option please?
Thanks. good video. Hey, I'm looking to insert image from PDF attachment while sending emails (using power Automate) How can i use AI builder
do you have a video for unstructured data?