Power Automate get SharePoint list items count

Do you want to count SharePoint list items in Power Automate using Get Items? In this tutorial, I will explain everything on “Power Automate get SharePoint list items count.” I will show you an example of “get a count of SharePoint list rows in a Power Automate” and “Power Automate get items filter query count”.

Power Automate ‘Get items’ flow action retrieves all the items in a SharePoint list with all the columns and their values. By default, Power Automate returns 100 items from the SharePoint list. To get the items count in Power Automate flow, take length() expression. Example :length(outputs(‘Get_items’)?[‘body/value’]).

Power Automate get items count will display the output in the form of an integer.

Power Automate Get items Count

In this example, I will illustrate the Power Automate count number of items in a SharePoint list using ‘Get items’ flow action.

I have a SharePoint list with multiple columns and rows. My objective is, within this SharePoint list, I wanted to automatically get a count of list rows in this SharePoint list by Power Automate flow. I will create a Power Automate flow utilizing the ‘Get items’ flow action to accomplish this.

power automate get items count items

Example:-1

Let’s look at how to create a Power Automate flow to get items from the SharePoint list.

Follow the step-by-step method:

1. Log into Power Automate with your Microsoft credentials. Then, follow the below instructions to create a flow. Click on +Create -> Select ‘Instant cloud flow’ -> In the next window, Name the flow and choose trigger ‘Manually trigger a flow’ -> Click Create.

2. Add a Power Automate ‘Get items’ flow action next to the trigger to get the SharePoint list items. In that, Provide the Site Address and List Name.

power automate get sharepoint list items count

3. To extract the number of items in the SharePoint list, take a ‘Compose’ data operation to give the length() expression like below.

length(outputs('Get_items')?['body/value'])
power automate get items count rows

4. Now, the Power Automate flow has been created. It’s ready to Save and Test. Then, run the flow manually.

5. The flow displays a notification as ‘Your flow ran successfully.’ Open the compose outputs to check the total number of items in a SharePoint list.

power automate get sharepoint list items count

Power Automate get items filter query count

Let us see another example of “Power Automate get items filter query count”.

Example:-2

Let’s examine another example regarding Power Automate get items filter query count.

Here, I’ll be utilizing the same SharePoint list as before. Regarding the client’s specifications, we aimed to get a count of SharePoint list items where the ‘Product Availability’ status is marked as ‘Available.’

Follow the same pattern of steps as the above example, but only provide a Filter Query in the ‘Get items’ flow action.

1. Inside the ‘Power Automate Get items’ flow action, provide the filter query based on the required condition. Give the details like Site Address, List Name, and Filter Query as below:

Filter Query: ProductAvailablity eq 'Available'

Where “ProductAvailablity” refers to the internal name of a SharePoint list column.

Power Automate get items filter query count

2. After completing the flow test, examine the ‘Compose’ data operation to see the number of items in a SharePoint list marked ‘Product Availability’ as ‘Available.’

power automate get items count

This is how to count items in a SharePoint list with Power Automate ‘Get items’ flow action.

Conclusion

I hope you learned how to get a count of SharePoint list rows in Power Automate. Through this tutorial, I have taught Power Automate flow to count items in a SharePoint list with the ‘Get items’ flow action. Moreover, I have also discussed an example on Power Automate get items filter query count.

You may also like: