How to Access and Extract Text from Uploaded Files (PDF, DOCX, etc.) in Custom Copilot Agent (Copilot Studio)?

Nurul Akter Towhid 0 Reputation points
2025-03-27T09:21:13.32+00:00

Hi everyone,

I'm building a custom copilot agent using Copilot Studio and currently facing an issue with accessing and extracting text from user-uploaded files (PDF, DOCX, etc.).

From what I’ve gathered, there doesn’t seem to be a straightforward method to handle this. Some forum responses suggest uploading the files to OneDrive, but they don’t explain how to read or extract the file content once uploaded. Also, those solutions seem to only handle the first uploaded file, not multiple attachments.

Is there any recommended or reliable approach to:

  • Access all uploaded files (not just the first one)?
  • Extract the text/content from each file (PDF, DOCX, etc.)?
  • Include that text/content as part prompt (as context)?

Any guidance or examples would be greatly appreciated.

Thanks!

Microsoft Copilot
Microsoft Copilot
Microsoft terminology for a universal copilot interface.
807 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Virgil Parbhoo 0 Reputation points
    2025-04-09T10:40:22.21+00:00

    I think i've figured out what needs to be done. I ended up using the question feature to ask a user to upload file & changed the response type to "File" - i could then access the file that was uploaded (it was a base64 string data:application/pdf; jv.....)

    also have a look at some of the options given here https://learn.microsoft.com/en-us/answers/questions/2145101/how-to-access-user-uploaded-files-in-copilot-studi

    good luck

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.