Mar 12, 2026
How to Extract Data from PDFs in Power Automate
How to Extract Data from PDFs in Power Automate

Ståle Zerener

This guide shows how to extract information from PDFs in Power Automate using an AI model. You’ll end up with JSON output and variables that you can use to for example write the extracted data to Excel, Dataverse, SQL, or SharePoint. We’ll also set up a human-in-the-loop for uncertain predictions.
Examples of use cases: invoices, bank statements, purchase orders, order confirmation notes, bills of lading, receipts and contracts. For invoices, you can refer to a specifi guide on invoice data extraction here with a clonable flow.
TL;DR
In this guide, we’ll walk you through how to set up an document processing workflow in Power Automate using Cradl AI from scratch. If you’d rather skip ahead, head over to PDF Data Extraction in Power Automate to download the complete workflow and get started right away.
If you're interested in extracting data from invoices, I recommend checking out this article, which specifically covers invoice processing.
Before we start
You'll need:
A Microsoft account with a Power Automate license
A Cradl AI account
Step 1: Setup your AI agent
In Cradl AI, choose Custom in the onboarding dialog. This simply gives you a starting point with a set of pre-defined fields based on a sample document you upload. In this example, I'll use You can easily customize the fields to fit your exact requirements at any time. For now, we’ll stick with the auto-generated ones to keep things simple.

Configuring your AI agent.
Next, go to the Workflow tab and add both a Power Automate trigger and a Power Automate export. When you’re done, your workflow should look something like this:

Screenshot of Cradl AI workflow.
Step 2: Create a Connection
Next, head over to Power Automate and either open an existing flow or create a new one.
In this example, we’ll assume our PDFs are fetched from a OneDrive folder and that we want to write the extracted data to a Dataverse table. To connect Cradl AI to your Power Automate flow, add a new action and search for “Extract data from document.” Select it, then create a new connection to your Cradl AI account:


Copying Client Credentials from Cradl AI to Power Automate.
In Cradl AI, go to Workflows, click Export to Power Automate, and copy the Client Credentials. Then paste those credentials into the Client Credentials field in Power Automate.
Next, configure the Extract data from document action. Select your newly created Custom agent from the dropdown. For the Document field, choose the Content Bytes variable from the Download the email attachment step.

Configuring the Power Automate action.
Step 3: Build the Power Automate flow
Now let’s put everything together by building a Power Automate flow that:
Retrieves PDFs from a OneDrive folder
Sends the PDF to Cradl AI for processing
Writes the extracted data to a Dataverse table
When we’re done, your flow will look like the diagram below. If you’d rather skip ahead, you can download the complete Power Automate solution here and start using it right away.

The Power Automate workflow.
Here’s how to configure each action:
When a file is created: In the trigger, select the folder you want to monitor.
Extract Data from Document: Select the agent you created earlier and map the file from the previous step as the document input. For the Document input, select the Body variable from the previous step.
Add a new row: Finally, append the extracted data as a new row to your to your Dataverse table by mapping the extracted fields to the right columns.
Step 4: Take it for a spin!
Now you’re ready to test the flow. Because we set it up to process documents received by email, send a sample document to the email address you configured and make sure everything runs as expected:

Human-in-the-loop.
Since this is the first document being processed, the AI will be conservative about what it approves automatically. In this case, you might be asked to confirm that the invoice date was interpreted correctly. After you’ve validated a few documents, the AI will become more confident over time. You can also adjust the automation thresholds manually if you want more, or less, automatic approval.
Wrapping up
That’s it, that’s all you need to build a basic document processing pipeline in Power Automate using Cradl AI.
The next step is to add more advanced processing and validation logic. For example, you can match master data from a SQL database or even a SharePoint list. This helps you build a more robust and reliable process, with fewer manual checks and fewer surprises downstream.