cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
MS2
Level: Powered On

List Sharepoint folder

Hi,

 

What's the "right way" to get the contents of a Sharepoint folder when you have the path as a string in a variable? The List folder action takes the folder id, not the folder path and the Get files doesn't take a path either (I have the folder path as text in two variables).

 

As mentioned here https://powerusers.microsoft.com/t5/Using-Flows/List-folder-sharepoint-using-Microsoft-Flow/td-p/302... I can replace(concat(string1, string2), '/', '%252f') but that's an ugly hack:

  • Unmaintainable if the Flow team decides to change the internal format of the Folder Id
  • Begs the question: are there any other characters apart from '/' that needs to be encoded? Which ones?

Thanks,

MS

2 REPLIES 2
Community Support Team
Community Support Team

Re: List Sharepoint folder

Hi @MS2,

 

Could you please share a screenshot of your flow's configuration?

Could you please show a bit more about your two variables that you mentioned?

 

Thanks for your feedback, I could not find any document about encoding the special character (such as, '/', '_','-', etc.) within File Identifier or Folder Identifier currently. If I find the document related to it, I would reply here.

 

Best regards,

Kris

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Highlighted
MS2
Level: Powered On

Re: List Sharepoint folder

Hi Kris, I have adopted the replace(concat(string1, string2), '/', '%252f') until I find some other solution. Is there somewhere I could read about which variable formats that are planned as persistent between flow generations. If the official stance is that the Folder Id/File identifier will forever be the encoded path then the above approach is ok (but still ugly). So there are no other encodings apart from the /?

 

Screenshot.jpg

 

The full expression above goes 

replace(concat('/contact/', string(items('Apply_to_each')?['ATSDocumentsFolder'])),'/','%252f')

 

Best regards,

MS

Helpful resources

Announcements
thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

firstImage

Incoming: New and improved badges!

We've given our badges an overhaul and also added some brand new ones!

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

sixthImage

Power Platform World Tour

Find out where you can attend!

seventhimage

Webinars & Video Gallery

Watch & learn from the Power Automate Community Video Gallery!

Top Kudoed Authors
Users Online
Currently online: 329 members 5,455 guests
Please welcome our newest community members: