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 / Create file on Sharepo...
Power Automate
Suggested Answer

Create file on Sharepoint - Bad request

(1) ShareShare
ReportReport
Posted on by 2
I am creating a number of PDF files in a Sharepoint library in an Apply to Each. Intermittently (i.e. some files will work and others not) I will get a Bad Request error on the Create File action itself.
The detail of the error is: 
 
Status: 400
Message: Cannot open file <name of file that was created>
 
The file is created successfully by the step. I can navigate to the file using the account which is used by Power automate, and open the file fine.
If I re-run the Flow, the error may re-occur, but on different files to those affected on the first run.
Categories:
I have the same question (0)
  • Suggested answer
    Michael E. Gernaey Profile Picture
    53,433 Super User 2025 Season 2 on at
    HI
     
    Its always best to share your flow, otherwise we have to ask more questions and it takes too long and we dont feel like answering them if we have to ask for stuff that should just be here.
     
    I cannot tell you an answer, and I am not even sure the error is on the Create or how it gets it data, or its path or file name etc etc
     
    But for a flow that fails, you should go to your flow run and resubmit that one and see if it fails every time. If so then its going to be easier to debug.
     
    For all I know you have a Loop and that loop is causing collision with the names and thats why it says it cannot open it as it sounds like a race condition.

    PLease share the whole flow and we can get you all fixed up!
     
  • BH-14081526-0 Profile Picture
    2 on at
    Hi,

    I was wondering if there was ever a generic solution to this. I am experiencing the same issue where the status is 400, but my file is successfully created. I noticed how the first time in a while the flow fails due to the 400 status code but if I were to re-run the same flow I do not see the error and my flow runs fine. It seems to be a hit/miss when I get the 400 status code but my files always get created. 
     
     

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 525 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 324 Moderator

#3
abm abm Profile Picture

abm abm 232 Most Valuable Professional

Last 30 days Overall leaderboard