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 pass the file ...
Copilot Studio
Suggested Answer

Need to pass the file to power automate flow which was uploaded by the user in copilot studio

(2) ShareShare
ReportReport
Posted on by 4
I have asked user to upload a file using the "Ask question" card. The entity type I have kept as "File" and stored it in a variable called "varFile"
 
Now I have created a power automate flow which has an input of type file. When I call this flow from copilot studio and pass my variable "varFile" - it says the PA flow input is a record and my variable varFile is a blob. (Which is true indeed - it's a file) But then how do I pass it to power automate flow ?
 
I couldn't find any function to convert this blob variable into string. (Tried with Text function but didn't worked)
 
Also there is no support of function base64/uriEncoded or similar kind of functions which are available in power automate.
I have the same question (0)
  • JasonAbba Profile Picture
    51 on at
    Hello @CU11031819-0,

     
    You can convert your record to text. There is an undocumented called SetText Node in Copilot Studio. It can take any datatype as input and convert it to String. This text variable can be passed to PA and then PA can use the Base64 Conversion expressions to do what you desire.

    I have documented the use of this SetText node on my LinkedIn post, please refer to it solve your issue: https://www.linkedin.com/posts/jasonabba_copilotstudio-aibuilder-yaml-activity-7276900081876746242-lPu8?utm_source=share&utm_medium=member_desktop&rcm=ACoAAB7wv4QBRDsqilcJB_pRFiXp2GdXYP43uh8

    Microsoft Copilot Studio's Product Team should really make this feature discoverable :)

    Thanks.
  • atharva.bhagat Profile Picture
    4 on at
    Thanks @JasonAbba for your response!!
     
    Adding a node which is un-documented using the YAML code was something new which I learnt here.
     
    However that does not solve the problem.
     
    SetText Node worked fine for the record variable. However when I try it with my "varFile" which is a blob it returned me a blank string.
     
    Just wondering if there can be some un-documented node which plays with the "File" variable.
     
    Would you mind sharing from where I can explore more on these YAML codes ? Like is there any documentation for that.
     
    Appreciate your time and help !!
     
     
     
     
  • Suggested answer
    Vinoth Selvam Profile Picture
    1,592 Super User 2025 Season 1 on at
     
    There are no direct functions to convert this blob variable into string and no support of function base64/uriEncoded. 
     
    i havent tried the below, but u can check if this works.
     
    • Instead of passing varFile directly, use this format:
    {
    "Name": varFile.name,

    "Content": varFile,
    "ContentType": "application/octet-stream"
    }
    • In Power Automate: Set the input type as "File". The Power Automate trigger should be expecting a record, not just a file.​​​​​​​​​​​​​​
    • Inside Power Automate, access:
      • triggerBody()?['Name'] → File name
      • triggerBody()?['Content'] → File content
      • triggerBody()?['ContentType'] → File type
    • If your downstream system requires Base64, use base64(triggerBody()?['Content']) in Power Automate.
     
     
     
    Thanks.

    Visit my Blog 

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 March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Copilot Studio

#1
Valantis Profile Picture

Valantis 594

#2
chiaraalina Profile Picture

chiaraalina 170 Super User 2026 Season 1

#3
deepakmehta13a Profile Picture

deepakmehta13a 118

Last 30 days Overall leaderboard