Skip to main content
Community site session details

Community site session details

Session Id :
Power Automate - Building Flows
Unanswered

Not able to create file in OneDrive

(0) ShareShare
ReportReport
Posted on by 53

Hey Guys,

I have created two Power Automate one is for Uploading the file from Manually trigger and then Added a HTTP request using POST method and in URL section there is of another Power Automate i.e "When a HTTP request is received" and then trying to add the file into OneDrive but it is not letting me create it says that you need to convert it into base64Binary() and when I try to convert it's content then it says that it needs to have first String and then when I try to convert it into String and then convert it into base64Binary() then it is able to create the file in OneDrive but it does not open it says that It appears to be corrupted.

Note:-

When I try to call that second flow which has a trigger i.e "When a HTTP request is received" from POST Man then everything works fine and I am able to open the file as well and it does not say that it appears to be corrupted.
1st Power Automate1st Power Automate2nd Power Automate2nd Power AutomateIf I call from POSTMAN then everything works fineIf I call from POSTMAN then everything works fine

  • Jabbar CRM Profile Picture
    53 on at
    Re: Not able to create file in OneDrive

    1st Power Automate to select and send the file1st Power Automate to select and send the file2nd Power Automate to receive that sent file and trying to store it into One Drive2nd Power Automate to receive that sent file and trying to store it into One Drive

     

     

    When I try to upload the file from POST MAN then everything works fine but if I trigger it from other power automate from where I am uploading the file then it becomes failed like this.

    Could you please build two Power automate which will give the file to another power automate ?

  • v-bacao-msft Profile Picture
    on at
    Re: Not able to create file in OneDrive

     

    Hi @JabbarCRM ,

     

    From the error details you provided, the file content you got is Null, so this kind of problem will appear.

     

    Have you output the contentBytes contained in the second Flow separately and see if it is as expected?

     

    Best Regards,

  • Jabbar CRM Profile Picture
    53 on at
    Re: Not able to create file in OneDrive

    Glad to hear from you @manuelstgomes  but that file is going to be generated by external source so let me know that whenever the file gets generated by external system I want that file to be dispatched to this URL of power automate so that it can be stored in OneDrive. that's what I want.

    Please do let me know that which way will be suitable for me ..!!

  • manuelstgomes Profile Picture
    6,625 on at
    Re: Not able to create file in OneDrive

    HI @JabbarCRM 

     

    This is tricky, indeed. If you want to give users or other people the ability to upload files and then save them to a OneDrive, why don't you use a Form to do that? Provide the form to your users and, when a new response is submitted, grab the file and save it to your one drive. It's a lot cleaner, and you don't need to deal with messy HTTP posts and base64 conversions.

     

    I know I'm not addressing your issue directly, but what you're trying to do is parsing the file multiple times to be able to send it through the "pipe" and getting corrupted files on the other side.

     

    Let Flow do all the work for you; it's my suggestion.

     

    If I have answered your question, please mark your post as Solved.
    If you like my response, please give it a Thumbs Up.
    ​
    Cheers
    Manuel

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

Paul Stork – Community Spotlight

We are honored to recognize Paul Stork as our July 2025 Community…

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 497 Super User 2025 Season 1

#2
David_MA Profile Picture

David_MA 436 Super User 2025 Season 1

#3
Riyaz_riz11 Profile Picture

Riyaz_riz11 244 Super User 2025 Season 1