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 / Power Automate / Difficulty transferrin...
Power Automate
Answered

Difficulty transferring documents from SharePoint to Copilot Studio via Power Automate

(1) ShareShare
ReportReport
Posted on by 4

I am developing an automation for an Autonomous Approval Agent.

The Scenario: Whenever a new document arrives in a SharePoint library, Power Automate captures this file and needs to send it to the Agent in Copilot Studio. The goal is for the Agent to analyze the content and determine if the document should be "Approved" or "Rejected" based on business rules.

I am using the action "Sends a prompt to the specified copilot for processing". However, I am stuck on how to correctly pass the file within the attachments JSON. I have performed two main tests with different results, but neither worked:

Scenario 1: Sending File Content (Binary)
I tried passing the file content directly from the "Get file content" action (converted to base64).

  • Result: The flow fails, or Copilot returns an extensive FileValidationError in the activity log. It rejects the payload immediately. The log: "message":"Request failed with status code 400","name":"AxiosError","code":"ERR_BAD_REQUEST","config":{"transitional":{"silentJSONParsing":true,"forcedJSONParsing":true,"clarifyTimeoutError":false},"transformRequest":[null],"transformResponse":[null],"timeout":0,"xsrfCookieName":"XSRF-TOKEN","xsrfHeaderName":"X-XSRF-TOKEN","maxContentLength":-1,"maxBodyLength":-1,"env":{},"headers":{"Accept":"application/json, text/plain, */*","Content-Type":"application/json","accept-language":"en-US"

Scenario 2: Sending via URL (contentUrl)
I tried passing the direct link to the file in SharePoint using the contentUrl property.

  • JSON used: [ { "name": "file.pdf", "contentType": "application/pdf", "contentUrl": "SHAREPOINT_LINK" } ]

  • Result: Power Automate runs successfully (Status 202 Accepted). HOWEVER, the Agent cannot read the file. It receives the prompt but ignores the attachment or states it does not have access to the content to perform the analysis.

My Question:
What is the correct and documented way to pass a SharePoint file so that the Agent can actually read the content via this specific action?

Any light on how to make this file "ingestion" work via flow would be of great help.

issue 2.png
issue1.png
I have the same question (0)
  • Suggested answer
    chiaraalina Profile Picture
    2,425 Super User 2026 Season 1 on at
     
     
     
    I have spent hours without success and @Romain The Low-Code Bearded Bear has also spent hours without making it work.
     
     
    It seems it is a limitation (see answer from @Sayali).
     
  • Verified answer
    Romain The Low-Code Bearded Bear Profile Picture
    2,876 Super User 2026 Season 1 on at
    thanks @chiaraalina atm like the MSFTEE said in the related post, the send file to the copilot connector is not implemented yet.
     
    you have multiple solution : Get the document ID, Get the document URL etc and then get it inside the agent
     
    For the scenario you have, what i do at the moment as a temporary workaround.
     
    First : I connect the agent to the knowledge base where the document are drop (will explain later why) and i change the KB behavior to be only able inside topic from the advanced option of the KB
    Second :  I send the document absolute URL to the agent from the power automate trigger and then within a Topic (with advanced input configure to take the url) a use a generative answer node with a custom prompt like " your job is [blablablalblable] and compare this document [insert here with a variable the document absolute url] within this content to analyze [set of rules]"
     
    Important tips : before sending the document URL to the agent, you need to be sure that the document have been indexed by sharepoint, other way the agent will not see it.
    An easy way is to have a little loop in the power automate, just before answer to the agent, to check if the document is inside the sharepoint search index
     
     
     
    The trick is here : this variable from the search api call is equal to 0 until document is not indexed (took 20 second in mot time)
     
     a little zoom in the loop
     
     
    here is how i send the info to the agent (tips : the message is a real prompt, so you can customize it as you want)
     
    It work very well :) 
     
    then the topic
     
     
     
     
    and then you have the foundation to do whatever you want : add a doc id inside the send to copilot to prepare for an approval workflow later if you need :)
     
    I hope this quick tuto help you to solve the problem or helped you to go to the answer :)
     
    if yes, it's important to check the answer as green good answer with the checkbox, it's important for the community and more for the search engine :) truly :)

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 Launch!

Jump in, show your community spirit, and win prizes!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Valantis Profile Picture

Valantis 377

#2
11manish Profile Picture

11manish 279

#3
David_MA Profile Picture

David_MA 234 Super User 2026 Season 1

Last 30 days Overall leaderboard