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 / OneDrive for Business ...
Power Automate
Unanswered

OneDrive for Business - Create File - Invalid Request - Status Code 400

(0) ShareShare
ReportReport
Posted on by 10

Hello,

I am creating a flow to automatically save emails to a folder in OneDrive. It worked once and I didn't get the results I wanted so the next time I tweaked it, it stopped working and even when I reset it to the way it was, it refuses to work at all.
I'm getting the following output in the OneDrive for Business - Create File connector.

{ "status": 400,

"message": "Invalid request",

"source": "api.connectorp.svc.ms" }

I have also attached a few screenshots of the flow.
Thank you in advance for your help.!

Flow DetailsFlow DetailsFlow ErrorFlow Error

Categories:
I have the same question (0)
  • Pstork1 Profile Picture
    68,707 Most Valuable Professional on at

    When you Test the flow are you sending a new email with a different subject?  The OneDrive create file action will fail if you try to overwrite an existing file.  Also, make sure that the full root of the folder path exists.  The action can create a folder, but only if the parent folder already exists.  Since you are nesting your folder inside a From folder make sure the From folder is valid.

  • Verified answer
    yoyo5795 Profile Picture
    10 on at

    I solved it with a compromise of not creating a folder for each email and only saving the .eml file. I don't know if there is another solution but for now I am going with this. Thanks for your help anyways

  • SF-23041453-0 Profile Picture
    4 on at
    @Pstork1 I have the same issue. The parent folder eg. C:\one-drive\parent exists.
     
    I've tested it a lot this morning and: 
    • Works: 
      • Hard coding the new path C:\one-drive\parent\subject it creates the file even though that folder does not exist. 
    • Fails
      • Using the dyanamic content as shown above
      • Composing the dynamic portion of the path using substring() and passing the outputs(compose) to the path. 
        • C:\one-drive\parent\outputs(compose)
      • Creating the folder C:\one-drive\parent\subject and using any combination of the above dynamic content in the path to determine the folder path
    So it seems to be related to the email V3 dynamic output. What is automate expecting for the path? A string? If yes shouldn't compose have worked? 
  • Suggested answer
    SF-23041453-0 Profile Picture
    4 on at
    Of course right after I post my research I find the solution. 
     
    It will not work if you copy the folder path which looks like this: 
    C:\Users\name\OneDrive\Documents\Parent
    Instead I navigated to the folder path in automate and copied the text it gave me which was this: 
    /Documents/Parent
    So the path line will look like: 
    /Documents/Parent/[Dynamic]/[filename].eml

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

#2
Tomac Profile Picture

Tomac 364 Moderator

#3
abm abm Profile Picture

abm abm 243 Most Valuable Professional

Last 30 days Overall leaderboard