November 20, 2024

How to use AI to extract data from PDFs in Power Automate

Kavian Braanaas
Reading time: 5 min.

Start by creating an AI model in Cradl AI

Before we begin, make sure you've created a free Cradl AI account - it's free to start!

Once logged in, create an AI model from scratch or clone a template model. I’m cloning the Invoice model to keep this tutorial brief, but either way will get you started quickly.

Add or remove data fields from your AI model according to your needs. In my example, I ditched the IBAN and Line Item fields because I don’t need those in my spreadsheet.

Create an empty spreadsheet

With my AI model set up, it's time to create an empty spreadsheet which will receive the extracted data!

Make sure you host the spreadsheet in a file manager that integrates with Power Automate, such as Microsoft's OneDrive or Google's Drive.

Add headers that correspond to the fields you want to extract from your documents. If you're using Excel, select your columns and format them as a table.

Connect Power Automate to your Sheet

Now, let's hook up Power Automate with your new Excel file.

Start by creating an Instant Cloud Flow in Power Automate and set it to trigger whenever an HTTP request is received.

Since I want my extracted data to land in my sheet as rows, I’m going with the “Add a Row to an Excel table” action.

Connect Power Automate to your AI model

Let’s get Cradl AI talking to Power Automate so your data flows into Excel every time Cradl AI successfully extracts it.

In Cradl AI, pick Power Automate as your output destination. It’ll auto-generate a JSON schema based on your fields—just copy and paste that right into Power Automate.

Next, grab the Webhook URL from Power Automate, paste it into Cradl AI, and set the "Who Can Trigger The Flow" option to "Anyone."

Finally, choose the “Add a Row to an Excel table” action and match up the headers with the Cradl AI fields.

Run your flow!

Hit "Run" in Cradl AI, upload your documents, and let the magic happen.

Once the processing is done, open the documents in Validator and fix any errors the AI flagged. Then, just click "Validate," and boom—the whole flow from Cradl AI to Excel is triggered. Done!

Voilá! You’ve just nailed the easiest way to extract data from tons of documents straight into Power Automate.

If you would like a version of this tutorial that does into more detail, this video has got you covered.

Start today for free

We’ll help get you started with your document automation journey.

Schedule a demo with our team today!