web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Copilot Studio / Handling scanned and l...
Copilot Studio
Suggested Answer

Handling scanned and large PDFs passed from a flow to a Copilot Studio agent for extraction

(0) ShareShare
ReportReport
Posted on by 1,089 Super User 2026 Season 1
Looking for input from anyone running document extraction through an agent rather than a pure flow.
 
Our setup: a Power Automate flow picks up PDFs from a SharePoint document library, passes the file content to a Copilot Studio agent, and the agent returns structured JSON that the flow parses and writes into a workbook. Field extraction quality from the agent has been good, so we want to keep the agent in the loop rather than move to a fully deterministic parser.
 
Two problems we hit.
  • First, scanned documents. Image only PDFs with no text layer return nothing usable. We tried an AI Builder prompt with a GPT vision model, but the raw PDF bytes never bound to the image input. The prompt kept coming back with an images count of zero and a response saying no document was provided. We did not find a supported way to hand a multi page PDF to a vision prompt as an image sequence without splitting and converting it first.
  • Second, digital PDFs scale badly. Anything under roughly 100 pages is fine and extraction is reliable. Past that we start seeing truncated content, incomplete field coverage toward the end of the document, and occasional timeouts on the agent call. It is not a hard cliff, it degrades, which makes it harder to detect than an outright failure.
The approach we landed on: we stopped passing the file to the agent at all. The flow now calls Azure Document Intelligence, prebuilt read model, through a small custom endpoint, and gets back page labeled plain text. One call handles both scanned and digital files, so we do not have to branch on document type. The flow pre extracts the text for every document in a loop and passes the text to the agent as a variable, rather than exposing the extraction as a tool the agent calls when it decides it needs it. Making it a flow step instead of an agent tool removed a lot of nondeterminism, and cost has been reasonable per page.
That works, but it is an external dependency, so before we harden it I want to know what others are doing.
 
 
Questions:
  • Has anyone got a Copilot Studio agent reading scanned or image only PDFs without an external OCR step? If so, how is the file getting into the agent?
  • For large digital PDFs, is there a documented or practical page or content ceiling on what an agent will process in a single turn? We have only found the limit empirically.
  • If you chunk, what pattern works best? Chunk by page range and call the agent once per chunk then merge, or keep one call and reduce what you send?
  • If you pre extract text, do you pass it inline to the agent or stage it and have the agent retrieve it? We are watching context size closely against the instruction limits.
 
Categories:
  • Suggested answer
    sannavajjala87 Profile Picture
    1,109 Super User 2026 Season 2 on at
    Hi,
     
    What you landed on is probably the most production-safe pattern. Use Document Intelligence for OCR and text extraction, then let the agent handle interpretation and structured JSON output.

    I would not rely on a fixed page limit, since the practical limit varies with document density and extracted text size. Chunking by logical section, or by a controlled page range when sections are unavailable, is more reliable than one large call. Pass each chunk inline, merge the results in the flow, and add checks for missing pages, invalid JSON, and duplicate fields.

    Why this works better: It separates deterministic document reading from AI-based interpretation, reduces silent truncation, and makes retries and validation much easier.
     
    Thanks & Regards,
    Manoj Annavajjala

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Copilot Studio

#1
Mohsin Ali Profile Picture

Mohsin Ali 298

#2
Valantis Profile Picture

Valantis 160 Super User 2026 Season 2

#3
sannavajjala87 Profile Picture

sannavajjala87 150 Super User 2026 Season 2

Last 30 days Overall leaderboard