Extract Selected Invoice Fields with an Existing Document Parser Template in Power Automate
Use an existing PDF.co Document Parser template to extract selected fields from a scanned invoice in Power Automate. The template defines which values to return, producing structured JSON, CSV, or XML data.
For full-text extraction instead, choose PDF To Text (with layout and ocr). The similarly named PDF To Text (without layout and ocr) action does not perform OCR on scanned pages. These actions are listed in the official PDFco connector reference.
Before You Start
You’ll need:
- A PDF.co account and API key.
- Access to Power Automate with permission to use the PDFco connector.
- A scanned invoice and an existing Document Parser template matching its layout.
- A source PDF URL that PDF.co can retrieve.
Microsoft lists PDFco as a Premium connector for Power Automate. Confirm that your environment permits its use. You can select the official connector directly; importing a custom connector is not required.
Step 1: Create a Manually Triggered Flow
In Power Automate, create an Instant cloud flow.
Name it Extract Invoice Fields, select Manually trigger a flow, and create the flow.
This provides a simple way to test the existing invoice and template before adding another trigger.
Step 2: Add Document Parser
Add an action, search for PDFco, and select Document Parser from the official connector.
Create its connection using your PDF.co API key.
Step 3: Configure the Extraction
Configure Document Parser:
- URL: Enter the direct URL of your scanned invoice.
- Template Id: Enter the existing template’s ID. The template contains extraction rules—not the extracted result.
- Output Format: Select
JSON. - Inline: No, so the result is returned through an output file URL.
- Async: No for the initial small-file test.
- Password: Supply the PDF’s opening password if required.
- Profiles: Leave blank unless your template requires additional processing settings.
The template must match the invoice’s layout and contain rules for the fields you want to extract.
Check source access using the Power Automate file-source guidance. A browser preview link requiring sign-in is not necessarily accessible to PDF.co.
Step 4: Add an Email Notification
Add your preferred email-sending action after Document Parser.
Set:
- Recipient: Your own email address during testing.
- Subject:
Invoice extraction result. - Body: Include the URL output from Document Parser.
The email contains a link to the extracted data file, not a permanent attachment or stored copy.
Step 5: Test and Check the Extracted Fields
Save the flow and run a manual test.
Open the output URL from the flow’s results or notification email. Compare each returned field with the scanned invoice.
Confirm that:
- Required fields are present.
- Invoice numbers, dates, and amounts were recognized correctly.
- Tables contain the expected rows and values.
- The output matches the selected template’s rules.
A successful response does not prove that every expected value was found or recognized accurately. Download and save the result before its temporary URL expires.
For longer documents, enable Async and use Background Jobs Check with the returned Job Id. Check again while the status is working; continue to retrieval and notification only after success. Stop and inspect any failed or aborted result.
Keep the existing template and validate its returned fields against the invoice before using the extracted data in another system.
The integration of PDF.co’s Document Parser module with Power Automate allows you to automate the process of extracting text from scanned PDFs, saving you valuable time and effort. With the help of advanced AI and OCR technology, the Document Parser can intelligently analyze complex PDF layouts and accurately extract specific information.
By configuring the settings and providing the necessary input, you can create automated workflows that handle the extraction process for you. You can even set up email notifications to receive the extracted text conveniently.
Overall, PDF.co and Power Automate provide a seamless and efficient way to extract text from scanned PDFs, making your tasks easier and more productive.
Related Tutorials

