Recently, I worked on a Power Automate flow that required sending a report to a manager on a monthly basis. The report should only include items with the status “New” from a SharePoint list. To do this, I used the Filter Array action in Power Automate.
The Filter Array action in Power Automate is particularly useful when working with large sets of data. It helps to select only the items that match a certain condition and ignore the rest. You can use this action to filter values from SharePoint, arrays, Excel, or other data sources in Power Automate.
In this tutorial, I will explain how to use the Filter Array action in Power Automate step by step. You will learn:
- What is the Filter Array action in Power Automate
- How to filter an array variable in Power Automate
- How to filter SharePoint list items in Power Automate
Filter Array in Power Automate
- The filter array action in Power Automate is a type of data operation that works on the entire array or a collection.
- The filter array is specially used to filter an array of records based on a condition. We can also filter based on multiple conditions using the Advanced Mode Editor option.
- The filter array will function in such a way that it filters and reduces the number of objects present in the array based on the provided filter condition, and returns the objects that match the condition.
Parameters:
- From: Provide the array input here.
- Filter Query: You can provide the condition.
Note
- We can not use the filter array action to change the shape of objects in array.
- The filtering is based on the case sensitive.

Check out Filter Array in Power Automate Examples
Filter Items in an Array Variable Using Power Automate
For this example, you have an array of customer records with different country names.
[
{
"Name": "Thomas Edison",
"Country": "USA"
},
{
"Name": "Priya Shah",
"Country": "India"
},
{
"Name": "Leila Bouazizi",
"Country": "Tunisia"
},
{
"Name": "Johan vander",
"Country": "USA,India"
},
{
"Name": "Johan vander",
"Country": "Africa"
}
]You want to filter this array in Power Automate only to retrieve customers from India or the USA.
To do this, follow the steps below:
- Open the Power Automate Home page, click on +Create -> Select Instant cloud flow -> Provide a flow name, choose to add Manually trigger a flow, and click on the Create button.
- After that, add an “Initialize variable” action to set the array value. Provide the parameters, such as Name, Type (set to Array), and Value, with an array of objects, as shown in the screenshot below.

- Add a “Compose” action and set the Inputs value to the strings [USA, India], as I want to filter the array items that contain these values. You can also rename the action. I have renamed it to VarCountries.

Now, let’s filter the array based on this condition.
- To filter the array values, add a “Filter Array” action. Set the required properties:
- From: Select Initialize variable [VarCustomerRecords] from dynamic content
- Filter Query: Map the below values.
| Choose value | Operator | Choose value |
| @{outputs(‘Compose’)} | contains | @{item()?[‘Country’]} |

Now, the flow is ready. Save and test it manually.
- Once the flow runs successfully, you can open the Filter array outputs to see the result. The output array shows only the items that contain the Country value as ‘USA’ or ‘India’.
Output:

This way, you can use the Filter Array action in Power Automate to extract only the items that meet your condition from an array.
Filter Array Based on a SharePoint List Item in Power Automate
To explain this, I will take one of the SharePoint lists named ‘Project Timeline’. This list has various types of records with Project status values. I want to filter the SharePoint list items that have a Project status value of New.

Check out the steps below:
- Create a Power Automate Instant cloud flow that can be triggered by a single button click.
- Next, add an “Initialize variable” action to store the empty value. Provide a name for the variable and set the type to Array.

- To fetch the SharePoint list items, add a “Get items” action. Provide the site address and list name.

- To filter the SharePoint list items that have Project Status as New, add a “Filter Array” action. Set the parameters:
- From: Provide body/value of get items from dynamic content.
- Filter Query: Insert the code below.
@{item()?['ProjectStatus/Value']} is equal to NewIf you have a different column name, you can replace the expression with your SharePoint column.

- Then, add Apply to each loop, and select an output from previous steps to: body(‘Filter_array’).

- Inside the loop, add the “Append to array variable” action. This is because it will add items with a Project Status of ‘New’ to a variable.
- Name: Select Initialize Array variable [varNewProjects] from the drop-down.
- Value: Insert the below values.
{
"Project Title": "@{item()?['Title']}",
"Project Status": "@{item()?['ProjectStatus/Value']}",
"Project Start Date": "@{item()?['ProjectStartDate']}",
"Project End Date": "@{item()?['ProjectEndDate']}"
}
- To view the retrieved output, take a “Compose” action. In the Inputs parameter, select the Initialize variable.

Now that the flow is ready, save and test it by clicking the Test icon.
Output:
- Open the Compose Outputs. As you can see, the array of SharePoint items has a Project Status of New.

This is how to work with the Filter array action in Power Automate.
You can use the Filter array & Get Items action to filter the SharePoint list of records or objects based on specific criteria. I have used both in many Power Automate flows.
Do let me know if you have any questions or suggestions in the comments section.
Also, you may read the following tutorials:
- Power Automate Merge Arrays
- Power Automate Array Variable
- Reverse an Array in Power Automate
- Power Automate Remove Item from Array

After working for more than 18 years in Microsoft technologies like SharePoint, Microsoft 365, and Power Platform (Power Apps, Power Automate, and Power BI), I thought will share my SharePoint expertise knowledge with the world. Our audiences are from the United States, Canada, the United Kingdom, Australia, New Zealand, etc. For my expertise knowledge and SharePoint tutorials, Microsoft has been awarded a Microsoft SharePoint MVP (12 times). I have also worked in companies like HP, TCS, KPIT, etc.
Hello Bijay,
this
@and(equals(item().Department, ‘Finance’),equals(item().Age, ’38’))
didn’t work for me.
This
@and(equals(item()?[‘Department’], ‘Finance’),equals(item()?[‘Age’], 38))
was much better 🙂