MENU

Fun & Interesting

How to Extract Data from PDF with Power Automate

Anders Jensen 264,552 3 years ago
Video Not Working? Fix It Now

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: https://klogeandersdk-my.sharepoint.com/:f:/g/personal/anders_andersjensen_org/Eg7_gniso8NJk-GiQH2TlBoBb1wO3ffyDJHUnL_q7RwTwg?e=zzRE8J 🔹 Full Power Automate Course: https://youtube.com/playlist?list=PLXXz88_TPiHqGlJoWhBDCAxZ9m1N_jsB6 FOLLOW ME: 👨‍👩‍👧‍👦 Discord: https://discord.gg/pJEXZNTCzs 💼 LinkedIn: https://www.linkedin.com/in/andersjensenorg 📸 Instagram: https://www.instagram.com/andersjensenorg 👨 Facebook: https://www.facebook.com/andersjensenorg 🐦 Twitter: https://twitter.com/andersjensenorg 💌 Email Newsletter: https://andersjensen.org/email-newsletter MY GEAR (Amazon affiliate): 🖥️ My monitor Samsung 49-inch CRG9 Curved Monitor = https://geni.us/MDpejc - If you are buying this, I can recommend the Mi Monitor Light Bar = https://geni.us/3Wwad 💡 Lights IVISII 19 inch Ring Light and Stand = https://geni.us/fVCH3IC Godox TL60 RGB Tube Light = https://geni.us/u0hxf ⌨️ Keyboard Logitech Backlit Keyboard = https://geni.us/aT0ltB 📹 Camera Sony FDRAX53-B = https://geni.us/gnAE Lenovo 500 Full HD Webcam = https://geni.us/cZS4 🎤 Microphone Rode Wireless GO II = https://geni.us/iqy0g6H Blue Yeti = https://geni.us/dDBjCB 0:00 Intro We want to extract data from PDFs with Power Automate and save it to Excel. Download the Sample Invoices: https://klogeandersdk-my.sharepoint.com/:f:/g/personal/anders_andersjensen_org/Eg7_gniso8NJk-GiQH2TlBoBb1wO3ffyDJHUnL_q7RwTwg?e=zzRE8J 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.

Comment