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 / Need to read the conte...
Copilot Studio
Unanswered

Need to read the content from file using copilot agent facing issue

(0) ShareShare
ReportReport
Posted on by

Hello,

I’m currently building an agent in Copilot Studio. The goal is to read files from a knowledge repository and answer user queries based solely on the selected file. Since the repository contains multiple folders and files, having Copilot scan the entire repository is not suitable for my use case.

So far, I’ve implemented the following:

  • The agent prompts the user to choose a folder.
  • Based on the input, it opens the selected folder and displays all the files.
  • The user then selects a file, and I capture the filename.

Up to this point, everything works as expected. However, I’m now stuck at the next step: I need to read the contents of the selected file (which could be a PDF, Excel, PPT, etc.) and ensure that Copilot responds only based on that file’s content. 

Could you please guide me on how to achieve this within Copilot Studio?

Note: The agent must respond accurately and provide answers strictly based on the content of the selected file.

 

Regards,

R Kamesh

I have the same question (0)
  • Michael E. Gernaey Profile Picture
    53,963 Moderator on at
     
    So in your case, the data itself is not really formatted in a way for it to answer. It doesn't know those are steps, there is probably no markdown, I have no idea what the JSON looks like, but it just looks like strings probably, so that won't tell it that the bullets are steps, the content is clear.
     
    So you can, create either an Agent Flow, or a Power Automate flow, to take the data you get back from the first Gen/node, pass it to that, format it into a proper JSON (aka Table), so that it can be read by your Gen 2 Node and be able to answer.
     
    As for seeing what it looks like now, its probably just looking just like what you wrote in the first place from the document, but just do a Send Message, sending Var2.
     
    What you want is a well formatted structured JSON that clearly defines what the values (and nodes) mean so it can be interpreted. Again you may also want to change the fact that you have a sentence the post defines what the steps are, versus pre-defines them so the Gen understands you are stating these are the steps, but make it clear its the bullet points.
     
    But when you get back an answer, and you simply turn it into a table, its probably just a table of strings, which doesn't mean much relative to it being identified as a Step, which is what your next question is.
     
     

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the April Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Copilot Studio

#1
Valantis Profile Picture

Valantis 455

#2
Vish WR Profile Picture

Vish WR 295

#3
Romain The Low-Code Bearded Bear Profile Picture

Romain The Low-Code... 212 Super User 2026 Season 1

Last 30 days Overall leaderboard