Power Automate: Filter Array to Exclude First Approver from List of Approvers
Introduction
In Power Automate, there are scenarios where a specific item needs to be excluded from an array to exclude. This blog post will guide you through the process of filtering an array to exclude the first approver from a list of approvers. This can be particularly useful in approval workflows where same person does not approve multiple stages.
Step-by-Step Guide
- Add
Filter Array
Action
This action will allow filtering out the first approver from the list of approvers.
- From:
variables('approvers')
- Condition :
item()
is not equal
totoLower(outputs('Wait_for_an_approval')?['body/responses']?[0]?['responder/email'])
This configuration ensures that the array is filtered to exclude the email of the first responder.
Use a
Compose
action` for the filtered list of approvers excluding the first approver.Use a
Join Array
action to concatenate the array into a single string.
The concatenated string can be used into any subsequent action, e.g. starting another approval flow.