web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Copilot Studio / File Attachment Type M...
Copilot Studio
Suggested Answer

File Attachment Type Mismatch Error After System.Activity.ChannelData Deprecation

(0) ShareShare
ReportReport
Posted on by 4

My file uploads in Copilot Studio broke after recent updates. I upload files but get a type error when passing them to my Power Automate flows. Error: "Input variable 'InputFile' is of incorrect type: Record(Content:File,ContentType:String,Name:String,Value:File)"

 

Context: The old method `System.Activity.ChannelData` worked fine but was recently deprecated as what I've read. I'm trying out `First(System.Activity.Attachments)` (naned it as FileContent variable) and it returns a Record type but my Power Automate flow expects File type.

Still, the confusing part is that in Flows I set the InputFile parameter to 'File' type, but when I go back to my Copilot Studio agent, it shows up as 'Record' type instead. When I try to change FileContent to match this InputFile type, it doesn't work!!!

 

I need a way to pass uploaded files from (UI via MSTeams) Copilot Studio to Flows for further OCR processing. Can anyone help?

I have the same question (0)
  • Suggested answer
    Michael E. Gernaey Profile Picture
    53,488 Super User 2025 Season 2 on at
     
    So technically File Type IS a record type because it looks like, which is actually a record. 
     
    file: {
        name:
        contentBytes
    }
     
    So FileContent is a record and the next line isn't because you have FileContent.Content or whatever it said I closed the picture.
     
    I do not know why yours is breaking but I will have to try it out and see if I can reproduce it.
     
    how is the file given to the Agent so I can reproduce the exact thing you have.
     
    Oh and something I just noticed (duh) I should have seen it.. is 
    The new format has the Type string in it, which the normal file type does not... hmmm..
    I am certain I can give you a fix, if you just share (per the below). but I can see why that record does not match the File record as there is an entire extra parameter. So we have to create another variable that only has the 2, then pass that. <== is what I plan to do.
     
    The more information you are willing to share (exact configuration) I will build it out and try it also.
  • CU18070145-0 Profile Picture
    4 on at
    Hi @Michael E. Gernaey

    So here's how the agent works: 
    1. Firstly there is a Question Node and it identifies a 'File' attachment as an answer to that. 
    2. Then I set a variable FileContent == First(System.Activity.Attachments) to capture that attachment
    3. Then this FileContent gets passed to the Action node (to the powerautomate flow)

    The PowerAutomate's very first trigger is when an agent calls the flow and the input is of type file.... 
     
    Let me know if you need more information pleeeease 

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Copilot Studio

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 270 Super User 2025 Season 2

#2
Romain The Low-Code Bearded Bear Profile Picture

Romain The Low-Code... 181 Super User 2025 Season 2

#3
S-Venkadesh Profile Picture

S-Venkadesh 93 Moderator

Last 30 days Overall leaderboard