This is purely for informational and learning purposes as we realized that Power Automate flows are relatively new and this problem may be minor but holds significant impact. We are in the Government Servers - cloud 365 V 9.2 UCI and we created a Power Automate flow that utilizes the Get files (Properties only) component which connects to SharePoint (in this case we have SharePoint Online) and retrieves the file properties. We use this so that we can determine the total number of files within said folder within a given Library. We noticed however that if the SharePoint folder (we are trying to retrieve) List exceeds 5000 items (Which is the limit Microsoft has set to any given folder within a library) I've added images below for better descriptions**. If this occurs, then our flow returns an error (The attempted operation is prohibited because it exceeds the list view threshold.) when we execute this component. This is because the total number of items within all nested folders exceeds 5k.
To resolve this, you have to configure the include Nested Items (initially set to = true) to 'No' so that the flow can ignore the number of nested items and focus solely on the Limit entries to folder you are trying to drill down to and retrieve the properties for.
Threshold limit in SharePoint.
Limit error message in Automate Flow
Update the (Include Nested Items) option to No:
Successful outcome after updating the Limt Entries to folder to No:
Hope this helped.
Thanks.