Forum Discussion

AngelTse1's avatar
AngelTse1
Copper Contributor
Sep 12, 2026

Custom Agent can’t read scanned PDF/Image received from Flows

I'm trying to build a Flow in Copilot Studio that triggers when a PDF/image is uploaded to SharePoint/OneDrive, passes it to a Custom Agent, which is able to extract text from the PDF/image to generate a standardized filename.

The Custom Agent works well standalone (drag-and-dropping scanned PDF/image directly into the Copilot chat box works fine!) But passing the file to the Custom Agent via Flow fails.

 

What I tried

  • Approach A (Base64): Used Get file content, converted it to Base64 via base64(...), and sent a JSON payload (fileName, mimeType, documentBase64) to the Agent.
  • Approach B (SharePoint Link): Used Create share link and passed the file's webUrl to the Agent instead of raw file content 

The issues

  • Issue with Base64: The Agent receives the payload, but fails on scanned/image-based PDFs, replying: "The uploaded file content is a base64 stream for a PDF and contains no extractable text... requires manual verification."
  • Issue with SharePoint Link: The Agent can't open/read the link, replying: "Since I cannot read SharePoint content directly from just the path, please upload the PDF file here." (even after added a SharePoint MCP tool for the Agent).

Questions

How can I pass a scanned PDF/Image via Flow so the Custom Agent can read & extract the text (just like it does on direct chat upload)?

 

Thanks for any help!

 

No RepliesBe the first to reply