Remember last week’s posts about getting all files in a folder in SharePoint? I used the Send an http request to SharePoint action avoiding the odata filter options in the get files action.
I mentioned the Get files (properties only) action as shown below.
Get files
Well today the Get files (properties only) action has some new options available.
Folder Filter options
The options now available are Limit Entries to Folder and Include Nested Items.
In the Limit Entries to folder option you can supply the folder location. In the Include Nested Items you can say yes or no to include sub folders or not.
Get Items Action
Even though in lists it is less common to include folders. It is not impossible to have folders, hence the options mentioned above have been included in the get items action as well.
When I choose “Include Nested Items” I get no results (only {
“@odata.nextLink”: “https://flow-apim-europe-001-francecentral-01.azure-…..”,
“value”: []
}
Set on No, I get only the items in the folder (like expected)
Tested in multiple tentants.
Is this familiar ?
It seems this occurs when the document library contains thousands of documents. According to this forum post, the zero-results bug occurs when the Include Nested Items is set to Yes and the library contains more than 5000 files, regardless if you are targeting a sub-folder with only a few of those files in it. https://powerusers.microsoft.com/t5/I-Found-A-Bug/Power-Automate-Sharepoint-Get-Files-Properties-Only-Include/m-p/786578#M8567
I have the same issue! This was driving me nuts. This new option is clearly broken.
What is interesting is that “Include Nested Items” works on the first 15 or so folders in the library, but as soon as I “Limit Entries to Folder” and specify the 16th or later folder, then the result is empty – but if I turn off “Include Nested Items” then it works.
I can only conclude that “Include Nested Items” is mostly incompatible with “Limit Entries to Folder”, and this is a BUG.