Showing results for 
Search instead for 
Did you mean: 
Regular Visitor

List Sharepoint folder



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 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?



Community Support
Community Support

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,


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.
Regular Visitor

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 /?




The full expression above goes 

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


Best regards,


Helpful resources


Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021


Join the new Power Virtual Agents Community!

We are excited to announce the launch of Power Virtual Agents Community. Check it out now!


New & Improved Power Automate Community Cookbook

We've updated and improved the layout and uploading format of the Power Automate Cookbook!


Power Automate Community User Group Member Badge

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

Top Solution Authors
Top Kudoed Authors
Users online (10,205)