Extract Data from PDFs with Power Automate: Start Without AI

C
Collab365 TeamAuthorPublished Mar 30, 2026
1,648

At a Glance

Target Audience
Power Automate makers automating invoices, forms and other PDF documents
Problem Solved
Route born-digital, scanned and variable PDFs to an extraction method that fits the document instead of assuming every file needs AI or every desktop action is free.
Use Case
Build a representative test pack, select text/table/OCR/document-AI routes, validate fields and operate a duplicate-safe human exception queue.

You do not need AI to extract every value from every PDF.

If the files are born-digital, follow a consistent layout and contain selectable text or tables, Power Automate for desktop may be enough. If they are scanned images, vary wildly or need semantic interpretation, ordinary PDF actions are the wrong tool.

The cost-saving move is not “avoid AI at all costs.” It is to send each document down the cheapest route that can extract the required data reliably—and to keep a human exception queue.

Choose the route from the document, not the marketing label

Use this decision table with real sample files.

Document Start with Why
Born-digital PDF with selectable text Extract text from PDF Deterministic text extraction is simpler than AI
Born-digital PDF with consistent table structure Extract tables from PDF Table action can return structured rows
Scanned PDF or photographed page OCR route PDF table extraction does not use OCR
Variable invoices/forms with labelled fields AI Builder or Azure Document Intelligence pilot Layout and semantics matter
High-risk document Any suitable extractor plus human validation Automation output is not approval evidence

Microsoft's current desktop-flow PDF actions can extract text, tables and images. Microsoft also says the table action does not use optical character recognition and cannot extract non-copyable text from scanned PDFs. Read the official PDF action reference.

Step 1: build a representative test pack

Do not build from the cleanest invoice you can find.

Collect at least 20 documents covering:

  • every supplier or template family;
  • single- and multi-page examples;
  • empty optional fields;
  • wrapped descriptions;
  • negative and decimal values;
  • password-protected files, if permitted;
  • scans, rotated pages and low-quality images;
  • the largest real file;
  • a deliberately malformed or unrelated file.

For each document, record the expected values. That becomes your labelled test set.

Decide the acceptance rules before automation. For example: invoice number and total must both be present; total must be numeric; supplier must exist in the approved list; a duplicate key must not already exist.

Route A: extract text from a born-digital PDF

In Power Automate for desktop:

  1. Use Get files in folder or receive a known local file path.
  2. Add Extract text from PDF.
  3. Choose all pages or an explicit range.
  4. Store the returned text in a variable.
  5. Normalise line endings and remove predictable repeated headers/footers.
  6. Extract fields using stable labels and delimiters.
  7. Validate every required result before writing to the destination.

Text extraction gives you content, not a guaranteed document schema. A line such as:

Invoice number: INV-1042

can be handled with a label-based rule. A number floating in an unknown position cannot safely be assumed to be the invoice number.

Prefer anchors over character positions

Do not rely on “characters 150 to 160.” A longer address breaks it.

Use recognisable anchors:

  • start after Invoice number:;
  • stop at the next newline;
  • trim whitespace;
  • confirm the value matches the expected pattern.

If a field can appear more than once, define which occurrence is valid. If a label can change by supplier, route the document through a supplier-specific parser.

Route B: extract tables from a born-digital PDF

Use Extract tables from PDF when the source contains real, copyable table data.

The action returns a list of table information. Build the flow to handle:

  • no tables;
  • one table;
  • several tables across pages;
  • a header repeated on each page;
  • cells merged or split unexpectedly;
  • non-table content returned because the library is designed to minimise omission.

Microsoft explicitly notes that the action may extract extra data that is not a table. Treat the output as a candidate table, not automatically trusted rows. Check the action's current parameters and exceptions.

Map by meaning, then validate

If headers are stable, locate columns by header name rather than fixed position. Reject or quarantine the document when required headers are missing.

For money fields:

  • remove only known currency and grouping characters;
  • parse with the correct locale;
  • retain the original text for audit;
  • compare line totals, subtotal, tax and grand total where the document supplies them.

Route C: scanned PDFs need OCR

A scanned PDF contains page images rather than copyable characters. Passing it to a non-OCR table extractor cannot recover text that is not there.

Power Automate for desktop includes Windows OCR and Tesseract OCR actions. Microsoft says these engines run locally; language packs or Tesseract language files may be required. OCR can read an image on disk, the screen or a selected UI area. Review the OCR action reference.

A practical scanned-document route is:

  1. detect that ordinary text extraction returned no usable text;
  2. render or obtain the page as an image through an approved process;
  3. run the chosen OCR engine with the correct language;
  4. apply the same field and validation rules;
  5. send low-confidence or structurally invalid results to review.

Do not describe OCR as exact. Fonts, skew, compression, handwriting and scan quality affect results. A visually plausible 8 instead of 3 can change a payment amount.

Route D: use document AI when rules become the expensive option

Rule-based extraction becomes brittle when suppliers use many layouts, labels move, documents mix handwriting and print, or the desired value depends on context.

AI Builder document processing can be called from Power Automate and is designed for structured field extraction. It requires Dataverse access for model work and consumes environment capacity. Microsoft advises checking the live licensing/capacity model; AI Builder is a premium feature and its credit model is changing. See AI Builder in Power Automate and current capacity guidance.

Azure AI Document Intelligence is another governed route for prebuilt or custom document models. It should be evaluated with the same test pack, security review, regional/data-processing decision and cost model—not assumed superior because it contains AI.

A sensible hybrid

  1. Run low-cost deterministic checks first.
  2. Use rules for known layouts.
  3. Route unknown or failed layouts to a document model.
  4. Send low-confidence or high-value cases to a person.
  5. Feed approved corrections into test cases, not directly into production logic.

Build the exception path before the happy path

For every document, record:

  • source file ID and location;
  • parser/model version;
  • extraction route used;
  • extracted values plus original strings;
  • validation results;
  • processing time and UTC timestamp;
  • final state: accepted, duplicate, needs review or failed.

Move or tag the source only after the destination write succeeds. Use a stable business key such as supplier + invoice number to stop retries creating duplicates.

An exception record should explain the failure: no selectable text, required header missing, total failed numeric parse, duplicate key, password required, or unsupported scan.

Licensing: “runs locally” does not mean “free automation”

Desktop actions may run on a local machine, but the end-to-end solution may need Premium capabilities for cloud triggering, organisational management, sharing, attended RPA or unattended capacity. Microsoft lists these separately, and unattended desktop execution requires the appropriate Process plan and machine/session setup. Review Premium RPA features and unattended execution.

Price the architecture you will operate:

  • licence and AI capacity;
  • Windows machine or hosted runtime;
  • support and monitoring;
  • human review time;
  • failure cost;
  • supplier/layout maintenance.

A deterministic desktop flow may be inexpensive for 200 consistent PDFs and costly for 20,000 variable scans. Measure with your documents.

Production acceptance test

Do not release until the flow can demonstrate:

  • required-field accuracy on the labelled test pack;
  • zero silent acceptance of the unrelated/malformed document;
  • duplicate-safe retry after a forced destination failure;
  • correct treatment of scans and password-protected files;
  • no document content in ordinary logs beyond policy;
  • a visible review queue with an owner;
  • a rollback route that leaves the source intact.

Measure field-level results, not “documents processed.” A flow that finishes every run while accepting wrong totals is not reliable.

Frequently asked questions

Can Power Automate extract tables from scanned PDFs?

Not with the ordinary PDF table action. Microsoft says it does not use OCR and cannot extract non-copyable text. Use an OCR or document-processing route.

Is Power Automate for desktop PDF extraction free?

Do not assume the full business process is free. Licensing depends on local versus organisational use, cloud triggering, attended/unattended execution, sharing, connectors and AI capacity.

When should I use AI Builder?

Pilot it when layouts vary enough that deterministic rules are expensive or unreliable. Compare field accuracy, exception rate, capacity consumption and review effort on a representative test pack.

Can I trust extracted invoice totals automatically?

No. Parse with the correct locale, compare document arithmetic where possible and require human review for invalid, low-confidence or high-risk cases.

How do I stop a retry creating duplicate records?

Create a stable business key, check it before writing, and store a processing record with the source file ID and final state. Do not move the source until the destination commit succeeds.

For more reliable automation designs with honest licensing and exception handling, join the Power Automate Mastery Space.