cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Anonymous
Not applicable

Power Automate Get File Using Path 404

I want to use SharePoint Action 'Get file metadata using path', for checking-in and moving the file in subsequent steps:

 

quoteURL is a variable with contents from a hyperlink field within a SharePoint list that references a SharePoint file.

 

e.g. quoteURL = https://company.sharepoint.com/sites/MYSite/Shared%20Documents/Requests/document.xlsx?d=a-bunch-of-r...

 

The workflow splits the URL into it’s component strings to gather path information:

 

quotePathArray = split(variables('quoteURL'), '/')

 

and the array that looks like this:

 

https

 

company.sharepoint.com

sites

MYSite

Shared%20Documents

Requests

document.xlsx?d=a-bunch-of-random-alpha-numeric-chars

 

0

1

2

3

4

5

6

7

 

The workflow uses concat to re-build the path information from the SharePoint List Item field:

 

quotePath = concat('/',variables('quotePathArray')[5],'/', variables('quotePathArray')[6],'/',outputs('Get_SharePoint_List_Item')?['body/{Name}'],'.xlsx')

 

When I run this code, I get error:

404 : Not Found

 

Troubleshooting I have completed:

  • Checked the path information, and the path exists
  • Checked the file location, and the file exists

 

Do you know what steps I can take next to resolve this issue?

 

@PowerAutomate 

1 ACCEPTED SOLUTION

Accepted Solutions
KvB1
Solution Sage
Solution Sage

First thing I noticed is that the URL replaces spaces with %20, while get file metadata using path uses spaces.

 

Can you change this and see if the problem persists?

View solution in original post

1 REPLY 1
KvB1
Solution Sage
Solution Sage

First thing I noticed is that the URL replaces spaces with %20, while get file metadata using path uses spaces.

 

Can you change this and see if the problem persists?

Helpful resources

Announcements
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

MPA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

Learn to digitize and optimize business processes and connect all your applications to share data in real time.

Power Automate Designer Feedback_carousel.jpg

Help make Flow Design easier

Are you new to designing flows? What is your biggest struggle with Power Automate Designer? Help us make it more user friendly!

Users online (2,295)