Suppose you are in the middle of creating a Power Automate flow, and you need to check whether an array contains a specific value. Sounds simple, right? But looking into it, you find multiple ways to achieve this.
After some research and testing, I found three effective methods to check if an array contains a specific value:
- Using the Power Automate contains() function.
- Using the Filter array action in Power Automate.
- Using the Filter array action for exact matches in Power Automate.
In this tutorial, I will explain each of these methods step-by-step and provide examples so you can choose the one that best fits your scenario.
Check If an Array Contains Value in Power Automate
I will explain how to use Power Automate to check if an array contains a specific value. Power Automate offers multiple ways to achieve this, such as using the contains() function or the “Filter Array” action.
Check If an Array Contains Value Using the Power Automate Contains() Function
Imagine you are automating a process for a company’s inventory system. You have a SharePoint list called Inventory with a Product Name column that tracks available products. You want to check if a specific product, say, Laptop, exists in the array of product names retrieved from the list. If it does, you’ll send an email notification to the inventory manager.

Now, follow the below steps:
1. Open the Power Automate Home page and choose Instant cloud flow with the trigger. Manually trigger a flow. Click on +Add an Input to add text inputs (Product) to allow users to enter manually.

2. Then add a Get items action and provide the below parameter:
- Site Address: Select the site address where the Inventory SharePoint list is present.
- List Name: Choose the Inventory list from the drop-down.

3. Search for Initialize variable and add it. Then provide the below parameters:
- Name: ProductArray
- Type: Array
- Value: Leave blank for now (I will append it later).

4. Search for Append to array variable and add it, then provide the below parameter:
- Name: ProductArray
- Value: Select ProductName from the dynamic content (from Get items).
This step will automatically wrap in a For each loop because Get items returns multiple items.

5. Search for Compose, add it, and provide the below expression:
contains(variables('ProductArray'), triggerBody()?['text'])

6. Search for Condition and add it and provide the below:
- First box: Select the output of the Compose action from dynamic content.
- Operator: is equal to
- Second box: true.

7. In the True branch, add an action: Send an email (V2) (Outlook connector) and provide the required parameter:
- To: Enter the inventory manager’s email.
- Subject: Product Found in Inventory
- Body: The product ‘Laptop’ is available in the inventory.

Save the flow. Click Test -> Manually and run it -> Enter Product Name in the input fields.

Click Run flow and wait for execution. After the flow runs successfully, the inventory manager will receive the email below.

Check if Array Contains a Specific Value with the Filter Action using Power Automate
For example, you have a manually triggered flow where you input a simple array of colors (e.g., [“Red”, “Blue”, “Green”]). You want to check if the array contains the value “Blue” using the “Filter Array” action. To do this follow the below steps:
1. Go to Power Automate. Create an Instant cloud flow with a Manually trigger a flow trigger.

2. Add Initialize variable action and provide the below required parameter:
- Name: ColorArray
- Type: Array
- Value: [“Red”, “Blue”, “Green”]

3. Add Filter array action and provide the below parameter:
- From: variables(‘ColorArray’)
- Condition: item() “is equal to” Blue.

4. Add a Condition Action and provide the below:
- Left side: length(body(‘Filter_array’)) (use the “Expression” tab).
- Operator: is greater than.
- Right side: 0

5. In the true section, add a compose prover the value as Blue is in the array. In the same way, in the False section, add a Compose action and provide the value as Blue is not in the array.

Save and run the flow. After the flow runs successfully, you can see the true part will run.

Check if the Array Contains Match Value with the Filter Action in Power Automate
Suppose you are tracking customer feedback submissions stored as an array of comments ([“Great service”, “Needs improvement”, “Love the product”]). You want to check if any comment contains the word “service” using the “Condition” action and output a result.
To do this, follow the below steps:
1. Go to Power Automate, select Create, select Instant cloud flow, name it (Check Feedback Comments), choose Manually trigger a flow as the trigger, and click Create.

2. Add Initialize variable action and provide the below required parameter:
- Name: FeedbackComments
- Type: Array
- Value: [“Great service”, “Needs improvement”, “Love the product”]

3. Add Filter array action and provide below parameter:
- From: @{variables(‘FeedbackComments’)}
- Condition: item() “contains” service.

4. Add a Condition Action and provide the below:
- Left side: length(body(‘Filter_array’)) (use the “Expression” tab).
- Operator: is greater than.
- Right side: 0

5. In the true section, add a compose prover the value as Feedback contains ‘service’. In the same way, in the False section, add a Compose action and provide the value as Feedback does not contain ‘service’.

Save and run the flow. After the flow runs successfully, you can see the true part will run.

Conclusion
In this tutorial, I covered three methods for checking if an array contains a specific value in Power Automate. First, I explained how to use the contains() function to check if an item exists in an array, with an example of verifying product availability in an inventory system.
Next, I explained how to use the Filter array action to find an exact match within an array, using a color list as an example. Finally, I showed how to use the Filter array action to check for partial matches in an array, with a customer feedback scenario looking for specific keywords.
Moreover, you may like some more Power Apps tutorials:
- Send Birthday Wishes Using Power Automate
- Check If an Input String Is an Integer Using Power Automate
- Check If Array is Empty in Power Automate
- Check If the Body is Empty in Power Automate
- Check If the Column is Changed in Power Automate
- Rename SharePoint List Using Power Automate

Hey! I’m Bijay Kumar, founder of SPGuides.com and a Microsoft Business Applications MVP (Power Automate, Power Apps). I launched this site in 2020 because I truly enjoy working with SharePoint, Power Platform, and SharePoint Framework (SPFx), and wanted to share that passion through step-by-step tutorials, guides, and training videos. My mission is to help you learn these technologies so you can utilize SharePoint, enhance productivity, and potentially build business solutions along the way.