SharePoint Document Issues

Fix Power Automate Get Files Not Returning Nested SharePoint Items

Adam DavisAdam Davis Nov 2, 2026 870 views

Question details

A Power Automate workflow using the SharePoint connector retrieves top-level folders but fails to return any files located inside nested folders.

How to Fix Power Automate Get Files Not Returning Nested SharePoint Items
Product
Power Automate
Device & OS
not provided
Scenario
Automating document retrieval across a SharePoint document library where files are organized into multiple subfolders.
Observed behavior
When the 'Include Nested Items' option is disabled, the flow correctly counts top-level folders (e.g., 56). When enabled, it unexpectedly returns 0 items instead of the nested files.
Before you start

Ensure you have the correct SharePoint site URL, the exact library name, and sufficient site collection privileges to access all nested subfolders without permission blocks.

Solution 1Recommended

Use a Compose Action to Debug and Verify Connector Configuration

Validate the actual array output of the 'Get files' action to verify if the query scope is restricted to the top-level folder.

The most effective way to troubleshoot missing nested items is to systematically count the exact array output while toggling the action's built-in settings. Often, the action context is restricted by an incorrect folder path or blocked by broken permission inheritance deeper in the SharePoint library.

1
Add a Compose Action

Insert a 'Compose' action immediately after your 'Get files (properties only)' action within the flow.

2
Enter the Length Expression

In the Compose input field, type the expression length(outputs('Get_files_')?['body/value']) to count the exact number of items being returned.

3
Toggle Nested Settings

Run a test with 'Include Nested Items' set to 'Yes', and then run another test with it set to 'No'. Compare the retrieved results.

4
Verify Library Scopes and Permissions

If the nested output remains 0, double-check the 'Library Name' and the 'Limit Entries to Folder' fields. Ensure your connection account has explicit read access to the nested subfolders, as unique permissions can hide items from the flow.

Use a Compose Action to Debug and Verify Connector Configuration
Action Name Syntax: Make sure to replace 'Get_files_' in the expression with the exact name of your SharePoint action, replacing any spaces with underscores.
Free Microsoft Office alternative

Need a Reliable Alternative for Office Documents? Try WPS Office

If you are managing complex nested folders of Word, Excel, or PowerPoint files and want to avoid complicated cloud workflows, WPS Office offers a powerful, lightweight, and completely free alternative to Microsoft Office. It provides robust local file management and seamless cloud compatibility.

  1. 1. Download WPS Office: Visit the official WPS website and download the free installation package for your Windows, Mac, or Linux operating system.
  2. 2. Install the Software: Run the installer and follow the simple on-screen instructions to complete the setup in minutes.
  3. 3. Open and Edit Files: Launch WPS Office and directly open your existing Microsoft Office files from your local drive or synced cloud folders without losing any formatting.
Fully compatible with Microsoft Word, Excel, and PowerPoint file formatsFree, lightweight, and fast installationAll-in-one suite for documents, spreadsheets, presentations, and PDFsFamiliar tabbed interface requiring no learning curve
microsoft office alternative - wps office

Frequently Asked Questions

Why does Power Automate return 0 nested items in SharePoint?

This commonly occurs if the 'Limit Entries to Folder' path is incorrect, subfolder permissions are restricted for the account running the flow, or SharePoint view limitations prevent the API from fetching deeper items.

How can I retrieve only files and skip folders in Power Automate?

You can use an OData Filter Query in the 'Get files (properties only)' action. Enter 'FSObjType eq 0' in the Filter Query field to ensure only files are returned, filtering out all folder objects.

Are there limits to how many nested items the Get Files action can retrieve?

Yes, the default pagination limit is 100 items. If your nested folders contain more files, you must enable Pagination in the action's Settings and increase the threshold up to 100,000 to retrieve all nested items.