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 / Power Automate / Upload a file or Image...
Power Automate
Unanswered

Upload a file or Image Dataverse Action - File is empty

(0) ShareShare
ReportReport
Posted on by 169

Hello,

 

I am using Upload a file or Image Dataverse Action to create a file in dataverse.

Here are the ways I've used to fill in the Content field:

 

 

{
"$content-type": "application/pdf;base64", // also tried without "base64" 
"$content": "JVBERi0xLjMNCjEgMCBvYmoNClsvUERGIC9UZXh0IC9JbWFnZUIgL0ltYWdlQyAvSW1hZ2VJXQ0KZW5kb2JqDQo0IDAgb2JqDQo8PCAvTGVuZ...=" // also tried without using quotes
}

 

 

 

{
"$content-type": "application/pdf;base64", // also tried without "base64"
"$content": "@{base64ToBinary(JVBERi0xLjMNCjEgMCBvYmoNClsvUERGIC9UZXh0IC9JbWFnZUIgL0ltYWdlQyAvSW1hZ2VJXQ0KZW5kb2JqDQo0IDAgb2JqDQo8PCAvTGVuZ...=)}"
}

 


The pdf is always empty.

I've checked the base64 string in an online base64 to PDF convertor and it is correct, it produces a pdf file.

 

Any help would be much appreciated.

Categories:
I have the same question (0)
  • Rodrigo Hentz Profile Picture
    on at

    Hi @Iro_ how are you?

     

    @Iro_ could you please provide an image from your flow? What actions are using? Where the file comes from?

     

    I did a small sample here creating the column and also an instant flow passing a file as argument, and it worked

     

    rohentz_0-1663765690969.png

     

    rohentz_1-1663765715562.png

     

    Best regards

     

    Rodrigo Hentz

    Microsoft Power Platform Support Engineer

     

     

     

     

  • Morgan78 Profile Picture
    169 on at

    Hello @rohentz 

     

    Here is an image from the flow:

     

    Iro__0-1663766485154.png

     

    The file is in base64 string format and I get it from a child flow.

     

    Thank you

  • Rodrigo Hentz Profile Picture
    on at

    Thnkas @Iro_ 

     

    Did you already try to add the text directly? At my test below it worked

     

    rohentz_0-1663766933853.png

     

    Best regards

     

    Rodrigo Hentz

    Microsoft Power Platform Support Engineer

     

  • Morgan78 Profile Picture
    169 on at

    Yes, I've already tried to add the text directly.

    In that case, the file does not even open:

     

    Iro__0-1663768745559.png

     

    Thank you

  • Rodrigo Hentz Profile Picture
    on at

    Hum let me check this @Iro_ 

     

    Best regards

     

    Rodrigo Hentz

    Microsoft Power Platform Support Engineer

  • Verified answer
    Rodrigo Hentz Profile Picture
    on at

    Hi @Iro_ now it worked and the file opened with no issues.

     

    Add a compose and use the base64ToBinary function. As parameter pass the file content that you have 

    JVBER .....

     

    Add the output from compose to the content parameter

     

    rohentz_0-1663770409755.png

     

    Best regards

     

    Rodrigo Hentz

    Microsoft Power Platform Support Engineer

     

  • Morgan78 Profile Picture
    169 on at

    It worked like a charm, 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

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 > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 538 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 405 Moderator

#3
abm abm Profile Picture

abm abm 252 Most Valuable Professional

Last 30 days Overall leaderboard