Count Number of Files in SharePoint folder

This blog explains how to Count No of files in SharePoint folder using Power Automate

Steps to be followed:

  1. Select “Send an HTTP request to SharePoint” from Actions.
  1.  Enter below details:

Site Address: Select the site address from the list. 

Method: GET

Uri:_api/web/GetFolderByServerRelativeUrl(‘LibraryTitle/foldername’)/ItemCount

Example: _api/web/GetFolderByServerRelativeUrl(‘account/CFS Organization_584732FD1267E911A997000D3AA2C8D1‘)/ItemCount

 It will count the no of files in “CFS Organization_584732FD1267E911A997000D3AA2C8D1” folder.

Output of above request: 

Accessing value of ItemCount:

Accessing value of ItemCount:

  1. Add Compose Action.
  2. Add below expression in Inputs:
body('Send_an_HTTP_request_to_SharePoint')['d']['ItemCount']

Leave a Reply

Your email address will not be published. Required fields are marked *