How to Check IF SharePoint List is Empty in Power Automate?

I was recently working on a Power Automate flow where I needed to check if a SharePoint list was empty. At first, I thought it would be easy, but I quickly realized that simply using the Get items action doesn’t directly tell you if a list has no items. So, I thought I would share the steps with you in case you need to do this too.

In this tutorial, I will explain how to check if SharePoint list is empty in Power Automate and how to check if the get items are empty in Power Automate.

Check IF SharePoint List is Empty in Power Automate

Suppose you have a SharePoint list named Task Tracker. Each task has a Status column (Choice) with values like Pending, In Progress, and Completed.

Check for a null SharePoint field value in Power Automate

I want to check whether the SharePoint List (Task Tracker) is empty in Power Automate.

To do this, follow the below steps:

1. Create an Instant Cloud Flow by selecting the Manually trigger a flow trigger action.

Power Automate check List empty

2. Add the Get Items action and provide the below parameters to get all the items to the SharePoint list:

  • Site Address: Select the SharePoint site where your Task Tracker list is present.
  • List Name: Choose the Task Tracker list from the drop-down.
Check  IF SharePoint List is Empty in Power Automate

3. Add the condition action and set the values such as:

length(outputs('Get_items')?['body/value'])  Is equal to    0
Power Automate Check  IF SharePoint List is Empty

4. In this true section add a Compose action in the value provide the below expression:

The Sharepoint list has @{length(outputs('Get_items')?['body/value'])} Items.
How to check if SharePoint item already exists in Power Automate

5. In the false section add a Compose action then in the value provide the below expression:

The Sharepoint list has @{length(outputs('Get_items')?['body/value'])} Items.
Check  IF SharePoint List is Empty using Power Automate

Now, click Save and run the flow manually. After the flow runs successfully:

  • If the ‘True’ section runs, it means the list is empty.
  • If the ‘False’ section runs, it means the list is not empty.

When you click the Compose action, you can see how many items are in the SharePoint list.

How to Check IF SharePoint List is Empty in Power Automate

In this case, the list is not empty and the list has five items.

Check IF the Get Items are Empty in Power Automate

In the above example, we check if the SharePoint list (Task Tracker) is empty. After checking, we know it is not empty, so now I want to check daily for pending tasks and, if none exist, send an email to the team notifying them that all tasks are completed.

To do this, follow the below steps:

1. As per my requirement, I want the flow to run daily, so I created a Scheduled Cloud Flow. Then, I provided the following information:

  • Starting: Provide the date on which you want to run your flow.
  • At: Specify the time you want to run the flow. In my case, it’s 10:00 AM.
  • Repeat every: We want to run the flow every day.
Check If the Get Items are Empty in Power Automate

2. Then add the Get items action and provide the below parameter to get the pending tasks:

  • Site Address: Select the SharePoint site where your Task Tracker list is present.
  • List Name: Choose the Task Tracker list from the drop-down.
  • Filter Query: Provide the below query:
TaskStatus eq 'Pending'
Power Automate Check If the Get Items are Empty

3. Add the Condition action and set the values such as:

length(outputs('Get_items')?['body/value'])  Is equal to    0
Check If the Get Items are Empty using Power Automate

4. In the true section add a Send an email (V2) action and provide the below parameters:

  • To: Provide your group email address.
  • Subject: No Pending Tasks – Great Job, Team.
  • Body: Provide the below:
Hello Team,

Good news! As of @{utcNow()}, there are no pending tasks in the Task Tracker list.

Thank you for staying on top of your tasks. Keep up the great work!

Best regards,
TSINFO TECHNOLOGIES PVT LTD
Power automate IF get items is empty

5. In the False section add a Send an email (V2) action and provide the below parameters:

  • To: Provide your group email address.
  • Subject: Pending Tasks in Task Tracker – Action Required
  • Body: Provide the below:
Hello Team,

There are still pending tasks in the Task Tracker list as of @{utcNow()}. Please review and take necessary actions to complete them.

You can check the list here: [Task Tracker List].

Let’s keep pushing forward!

Best regards,
TSINFO TECHNOLOGIES PVT LTD
How to Check If the Get Items are Empty in Power Automate

Now, click Save and run the flow manually. After the flow runs successfully:

  • If the ‘True’ section runs, it means the get item is empty.
  • If the ‘False’ section runs, it means the get item is not empty.
How to Check If the Get Items are Empty using Power Automate

Then go to the Outlook group section and select the Power Automate group to check email.

Power automate check IF list is empty

Conclusion

In this tutorial, we learned how to check if a SharePoint list is empty in Power Automate using the Get items action and a length() expression. We first created an Instant Cloud Flow to check if the Task Tracker list had any items.

Then, we built a Scheduled Cloud Flow to check daily for pending tasks and send an email notification based on the result. If no pending tasks exist, the team receives a success email, and if tasks remain, they get a reminder to take action.

You may also like:

Power Apps functions free pdf

30 Power Apps Functions

This free guide walks you through the 30 most-used Power Apps functions with real business examples, exact syntax, and results you can see.

Download User registration canvas app

DOWNLOAD USER REGISTRATION POWER APPS CANVAS APP

Download a fully functional Power Apps Canvas App (with Power Automate): User Registration App