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 / Execute Agent and wait...
Copilot Studio
Answered

Execute Agent and wait : Managing Attachment to send to an agent

(0) ShareShare
ReportReport
Posted on by 2,876 Super User 2026 Season 1
Hello team,
 
I struggle with something not well documented, in the execute agent and wait you have by default "send a message" to an agent (wich work well) but you have this option : 
 
 
Does anybody manage to make it work ? I spend the last 6H to make it work with the help of many AI and forum (Official documentation is weak, the link on screen only list some "auto technical doc" without any information) - always stuck to FileValidationError returned by the agent.
 
I suppose it don't like "content" and try many way : base64, Binary, create array like this one (and many other test during this night) : 
 
Nothing 🙂 any help could be much appreciated 🙂
 
Why i m doing this : 
 
Use case : 
  • Some one drop a document into a sharepoint library
  • I want to get the document and ask agent to look if have some problem with it's actual KB on another sharepoint doc lib : 
    • Idea is to provide a summary / analysis before uploading (or not) the document to the final library
  • This work perfectly fine from a drag n drop directly inside an agent but the final User Experience is not great, since end user would need an app to approve later all the document after reading the analysis. 
    • Workaround could be to store document after analyze from the agent. But it's a workarround and ask user to use
      • Agent to upload document
      • Then go to another app.
        • Bad user experience
    • Why it's important to test from power automate/agent flow
      • Autonomous agent use case
        • Starting from mail, document lib, etc etc
 
So to sumarize, i totally know how to work with document and attachment from the agent. The purpose here is to send document with power automate to the agent to analyze.
 
i also tried to make an ai builder prompt to read document and get content, and then send it to the agent : bad workarround : break very fast the token limit and lose a lot of information since it's transform into pure text the content
 
Thank you 🙂 for any help
 
Regards, Romain
Categories:
I have the same question (0)
  • Verified answer
    Sayali-MSFT Profile Picture
    Microsoft Employee on at
    Hello,
    You currently cannot reliably send binary files or attachments from Power Automate to a Copilot Studio agent using “Execute agent and wait → Attachments.” Although the attachments field appears in the UI, it is not fully supported end-to-end for Copilot Studio agents. It works for Bot Framework or custom bots, but not for Copilot Studio knowledge ingestion or file handling. That’s why file uploads succeed when you drag and drop them directly inside the agent UI, but consistently fail with a FileValidationError when sent through Power Automate. This is a platform limitation (not yet implemented), not a formatting or configuration issue on your side.
  • Romain The Low-Code Bearded Bear Profile Picture
    2,876 Super User 2026 Season 1 on at
    ooo thank you very much for this very clear answer, i appreciate :) thanks a lot, it's clear :)
  • AS-11030538-0 Profile Picture
    14 on at
    Hello All,

    I have been testing a similar approach using REST APIs through Postman. We are sending JSON payloads that include the prompt along with the attachment binaries (Base64 encoded). The API endpoint we are using is:

    https://directline.botframework.com/v3/directline/conversations

    After multiple attempts and trying different payload structures, our observation is that the APIs work as expected when using simple prompts. However, when attachments are included in the payload, the agent does not seem to process them correctly. We observed the same behavior when testing through Cloud Flows as well.

    Hi @Sayali, since you are from the Microsoft team, could you please confirm if this observation is expected behavior, or if we might be missing something in the request format or configuration?

    @Romain The Low-Code Bearded Bear if you have any progress on the same please share.

    Below are some of the scenarios we tested and the outcomes we observed:

    Scenario Outcome
    Simple agent with one tool to retrieve an account record Working as expected
    Agent to read a document and update values in Dataverse Returns a response stating that the attachment was not provided, even though the attachment is included in the payload
    Agent to read a document without updating Dataverse Returns generated/made-up values and presents them as if they were read from the document

    Additional notes:

    • Attachments are passed in the payload as Base64 encoded content.

    • The same behavior is seen both when calling the API directly via Postman and when triggering the agent through Cloud Flow.

    • The issue only appears when attachments are involved. All other prompt-only scenarios work correctly.

    We also tried a few other combinations and payload structures, but they work only when attachments are not included in the request.

    If there are any specific requirements for sending attachments through the Direct Line API, or if there is a recommended format for document processing scenarios, it would be very helpful to know.

    Any guidance would be greatly appreciated.

    Thank you.

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 > Copilot Studio

#1
Valantis Profile Picture

Valantis 291

#2
Vish WR Profile Picture

Vish WR 175

#3
Romain The Low-Code Bearded Bear Profile Picture

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

Last 30 days Overall leaderboard