Recently, I was working on a project where I got a requirement to remove items from an array within the Power Automate.
In this tutorial, I will explain how to remove the first element from an array in Power Automate and then move on to removing the last item.
Next, I will discuss how to eliminate an array’s specific element and empty element with the help of Power Automate.
Power Automate Remove First Item from an Array
Now, I will show you an example of how to remove the first element from an array using Power Automate.
Example
| Input | Output |
| [“Alaska”, “Arkansas”, “California”, “Colorado”, “Florida”] | [“Arkansas”, “California”, “Colorado”, “Florida”] |
Follow the given steps:
1. Create a Power Automate Instant cloud flow. Navigate to the Power Automate Home page and click + Create -> select Instant Cloud Flow. Give flow name, and select trigger Manually trigger a flow-> Tap Create button.
2. Initialize the array values by taking an ‘Initialize variable‘ flow action. Set the required details:
- Name – Enter the variable name
- Type – Choose the variable type as array
- Value – In the value section, pass the below array of values
["Alaska", "Arkansas", "California", "Colorado", "Florida"]
3. Add a Compose flow action to remove the first item from an array using the Power Automate skip() function.
Inputs: Click Expression -> Insert the code below.
skip(variables('United States'),1)
4. Once the flow is ready, Click on Save. Then, Test the flow. In the Runflow window, select the Manually radio button. Click on Runflow.
5. The image below will show the output after removing the first item from an array.

How to Remove the Last Item of an Array in Power Automate
Now, let’s check the second example of removing the last element from an array with Power Automate.
Change the expression in the Compose flow action to remove the last item from an array.
Example
| Input | Output |
| [“Alaska”, “Arkansas”, “California”, “Colorado”, “Florida”] | [“Alaska”, “Arkansas”, “California”, “Colorado”] |
1. In the Compose Inputs, add the below given expression:
reverse(skip(reverse(variables('United States')),1))
Then, save and run the flow manually.
2. The output displays the removal of the last element from an array, as shown below:

This is how to remove the last item from an array by using the reverse() and skip() functions in Power Automate.
Removing Specific Element from an Array in Power Automate
Here, we will see how to remove a specific item from an array variable using Power Automate.
I will follow the same example with the same variable values.
Example:
In the array below, I am required to remove 3rd item [“California”] from the list.
| Input | Output |
| [“Alaska”, “Arkansas”, “California”, “Colorado”, “Florida”] | [“Alaska”, “Arkansas”, “Colorado”, “Florida”] |
1. Add a ‘Filter array‘ flow action under the Initialize variable. Configure the details below:
- From: Apply filter on initialize variable. Take the variable from dynamic content.
- Filter Query: Add the expression as given in the code below.
California is not equal to item()| Item Value | Operator | Item |
| California | is not equal to | item() |

2. To view the result, add a Compose flow action.
- Inputs: Take the Body of the filter array from dynamic content.

Output:

This is how to remove a specific element from an array using Power Automate.
Power Automate Remove Empty Item from an Array
In the same way, I will demonstrate an example of how to remove an empty element from an array using Power Automate.
Example
| Input | Output |
| [“Alaska”, “Arkansas”, “”, “Colorado”, “Florida”] | [“Alaska”, “Arkansas”, “Colorado”, “Florida”] |
Follow all the above-mentioned instructions.
1. In the Filter array flow action, change the filter query condition as shown below:
- From: Take the initialized variable from the dynamic content.
- Filter Query: Give the below code.
@equals(@{empty(item())},false)
Output:


Conclusion
You can easily remove an item from an array using the Power Automate skip() function. I hope you understand how to remove elements from an array using Power Automate.
Here, I have covered different examples:
- Removing the first element from an array
- How to remove the last item from an array
- How to eliminate the specific item of an array
- Removing an empty item from an array
You may also like the following tutorials:
- Power Automate Split String into Array
- Sort Array in Power Automate
- Reverse an Array in Power Automate
- Convert an Array to a String in Power Automate
- Get Unique Values from an Array in Power Automate

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.