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 / User Input As Files, E...
Copilot Studio
Suggested Answer

User Input As Files, Error With Create Generative Answers

(0) ShareShare
ReportReport
Posted on by 27

Issue: Copilot Studio file uploads are forced as Record and result in null file content in Power Automate

 

I’m having trouble handling file uploads from a Copilot Studio agent into a Power Automate flow.

 

Scenario

  • A Copilot Studio agent asks the user to upload a PDF.
  • The agent calls a Power Automate flow using “When an agent calls the flow.”
  • Copilot Studio automatically defines the uploaded file as a Record (there is no option to change it to File).
  • I want to save the PDF to OneDrive and/or extract text from it for Create Generative Answers which requires the text.
What Copilot Studio generates

Copilot forces an input like:

UploadedPDF (Record)
 

and auto-populates something similar to:


{
"name": "",
"contentBytes": Topic.UserInput
}
 
Power Automate setup

In Create file (OneDrive), I map:

 
File Content:
triggerBody()?['UploadedPDF']?['contentBytes']
 

Observed behavior


  • The flow trigger shows the UploadedPDF record is present.

  • contentBytes resolves to null or empty.

  • The created file is empty, and downstream PDF-to-text / AI steps fail.

  • Mapping Topic.UserInput into contentBytes does not produce real file bytes.

  •  

Key confusion

 

  • Copilot Studio forces uploaded files to be Records.

  • The Record structure suggests file data is available, but it does not behave like a real file payload.

  • This leads to silent failures (empty files, missing content for AI).

  •  

Questions


  1. Is it expected that Copilot Studio does not pass raw file bytes directly?

  2. Is the intended pattern to always use Get file content in Power Automate to resolve the file reference?

  3. If so, which field from the Record should be used as the file identifier (name, id, path, etc.)?

  4. Is there any supported way to receive a true File object directly from Copilot Studio?

  5.  

Any guidance on the expected or supported approach would be appreciated.

Categories:
I have the same question (0)
  • Suggested answer
    Sayali Profile Picture
    Microsoft Employee on at
    Hello,

    In Microsoft Copilot Studio, uploaded files are not automatically passed as raw file bytes when an agent calls a Microsoft Power Automate flow. Instead, the platform passes file references, so the contentBytes field remains null unless developers explicitly construct it. The record object shown in Copilot Studio ({ name, contentBytes }) is only a schema placeholder, meaning automatic mappings like Topic.UserInput → contentBytes will always produce empty files.

    The supported approach is to capture the file using a File entity with metadata enabled, then manually construct a file payload in Power FX when calling the flow, mapping name and contentBytes from the captured file variable. This constructed object can then be passed to a File input in Power Automate, allowing the flow to correctly receive the file for actions such as saving to OneDrive, processing with AI Builder, or extracting text from PDFs.

    In short, this behavior is expected platform design, not a configuration issue: Copilot Studio cannot automatically deliver a true File object to flows, so developers must manually build { name, contentBytes } in Power FX to pass usable file data.

     
     
     
  • MU-26031012-0 Profile Picture
    10 on at
    Okay, thanks !
    Would it be possible to get a demo or a Microsoft tutorial on how to do this, or at least an image of the diagram that can be done in Copilot Studio? 
    It's not very intuitive.
  • Suggested answer
    frago Profile Picture
    226 on at

    Hi,
    There is no ready-made, end-to-end example or visual diagram provided by Microsoft for this scenario. The official documentation only explains the concept and required mappings, without a full walkthrough. You can find partial guidance here:

    https://learn.microsoft.com/en-us/microsoft-copilot-studio/guidance/pass-files-to-connectors

     

    In practice, the easiest way is to work step by step with Copilot itself, which can guide you through the correct setup and Power Fx mappings more effectively than the docs alone.

     
     
     
    ------------------------------------------------------------
    If this solved your issue, please mark it as ✅ Accepted Answer.
    If it helped, feel free to give it a 🩷 Like!
     
    Best regards,
    Piotr
     
     

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 813

#2
Vish WR Profile Picture

Vish WR 313

#3
Haque Profile Picture

Haque 271

Last 30 days Overall leaderboard