cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
elagabriec
New Member

Get file content using path error - Bad request 400

Hi,

I've built a flow that will take answers from a Microsoft Forms submission that may include an attachment - the answers get uploaded to a spreadsheet that gets updated with certain information depending on answers in the form. 

My flow started having issues when I wanted a url link to be created from the Microsoft Forms "Uploaded Attachment" and placed into the spreadsheet where all the information is going. Since the Microsoft Form creates a weird string with the name/location of the uploaded file I had to Parse JSON to create a url link. Then that link gets uploaded to the desired spreadsheet.

My issue is that an attachment is not always uploaded so I branched off my flow to condition for when an attachment was/was not uploaded. Previously when I didn't have this condition, the flow would fail because there would be nothing to Parse (when no attachment was uploaded) when it reached the Parsing JSON action.

After branching my flow with the condition it fails at "Get file content using path' with a Bad Request - Error 400. Not sure why this is occurring. I used "Get file content using path' before branching and it worked fine.

 

Annotation 2020-03-18 165435.png

Here is a high level of the main flow:

1 ACCEPTED SOLUTION

Accepted Solutions

Hi @elagabriec ,

 

You should add an Apply to each outside the Get file content using path action, the screenshot of the flow should as below:

1.png

 

Best Regards,

Alice

 

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

View solution in original post

6 REPLIES 6
elagabriec
New Member

Flow images didn't get attached in original post.

 

See below

Part 1

2.png

Part 2

3.png

Hi @elagabriec ,

 

You should add an Apply to each outside the Get file content using path action, the screenshot of the flow should as below:

1.png

 

Best Regards,

Alice

 

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

View solution in original post

Taggarwal
New Member

I'm receiving the same error. In my case, i don't see dynamic content populating for Parse JSON such as "name", etc. 

Please advise.

aniebel
Frequent Visitor

I am also getting the same error by attempting to pull form results from a form created within a Sharepoint group/site. The path is correct since I am able to copy the input and paste in a browser which shows me the attached file in the OneDrive for this group/site. I have also tried to manually type the path in and use the "name" output which did not work either. sharpoint_issue.png

I'm running into the same issue as @aniebel. My Get File Content Using Path control is inside an Apply To Each, but the flow run still fails with the same status 400 Invalid Request error. The Inputs link for File Path works when I copy and test in my browser. Has anyone figured this out?

I did some more digging and finally figured it out thanks to dm_elementwa's comment on this thread about adding an attachment to Planner. I was putting the entire OneDrive URL (https://...) in my Get File Content Using Path step, and using %20 in place of spaces. The missing pieces for me were to remove everything before /Apps/ (that works - it's not just masked in screenshots for security as I'd expected), and to replace the %20 in my File Path with spaces. As soon as I changed those two things, the 400 error stopped occurring. Hope this helps save someone else the digging I had to do!

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Welcome Super Users.jpg

Super User Season 2

Congratulations, the new Super User Season 2 for 2021 has started!

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

Top Solution Authors
Users online (1,932)