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 / Created a file from th...
Power Automate
Answered

Created a file from the triger for selected item - documents are blank

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

hello,

 

I need to create item when a user add a file from the trigger for a selected item. Everyting works fine but when i want to open the document created its content is blank.

 

 

ALP1_1-1620168512668.png

For the action create file, the expression i used to obtain the name of the file i have input is 

string(triggerBody()?['file']?['name'])

and for file content is 
string(triggerBody()?['file']?['contentBytes'])
I don' t understand what i'm missing
Categories:
  • Verified answer
    Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Find the answer.

    I forgot to add base64ToBinary.

     

    base64ToBinary(triggerBody()?['file']?['contentBytes'])

     

    It works now

  • alrezac Profile Picture
    Microsoft Employee on at

    Hi,

     

    Thanks for your follow up message! I am glad that you were able to resolve your issue here. Remember to set the answer for this thread to help future users with similar issues in the future.

     

    Regards,

     

    Alex

     

    -------

     

    Community Support Team _ Alex Rezac
    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

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

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Automate

#1
11manish Profile Picture

11manish 298 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 289

#3
Henil Profile Picture

Henil 125

Last 30 days Overall leaderboard