“The request should go for approval to various number of approvers depending on its details, what’s the easiest way to do it in Power Automate?”
When you build an approval flow in Power Automate, you don’t want an extra branch for each approval path. Such flow would be big, complicated, and you’d get easily lost in it. You should avoid repeating actions whenever it’s possible using configuration lists. And it doesn’t apply only to flows with a single approval step. You can use a configuration list for a whole approval path too!
That’s what this post is about: how to use configuration list for a whole approval path with various number of approvers?
Use configuration list in SharePoint
To build a configuration list for a whole approval path it’ll have to be a bit bigger. You’ll need at least 3 columns – the approval path, the approver, and his order. These 3 columns are a must, but you can add a few more extra if you’d like, e.g. the role of each approver.
The configuration above contains 3 approval paths with various number of approvers. The Path1 goes to Manager, CFO and CEO in this order. Path2 goes to HR assistant and HR Lead. And Path3 goes only to a single approver, the Team leader.
Build the approval flow
Once you have the configuration list, you can start with the flow. The first step is to decide which path should the approval go, let’s say it’ll depend on the request value.
Initialise a string variable, e.g. var_path, and decide which path should the request go, e.g. with ‘Condition’ actions.
Now, when you’ve got the path in the variable, you can do a lookup to the configuration list. Make sure that you also sort the outcome using the order column in ascending order. The result will be all the items from the configuration list for the given path.
And since it’s an array with multiple items, you can process them one by one in an ‘Apply to each’ loop. Take each of the configuration items, and assign an approval task to the currently processed approver.
That’s why it’s important to sort the ‘Get items’ result, to assign the tasks in the correct order.
End the loop on rejection
But because you’re using a loop, it would create approval task for each of the approvers even if it’s rejected. To avoid that you’ll need one more variable and a ‘Condition’.
Initialise another variable, e.g. var_rejected and set it to ‘false’. This variable will tell the flow to stop creating tasks if somebody rejects.
Go back to the ‘Apply to each’ and add a ‘Condition’ to check if the variable is equal to ‘false’. If it’s ‘false’, create the approval task. If it’s not ‘false’, do nothing.
All that’s left is to set the variable to ‘true’ if somebody rejects their approval task: Outcome contains ‘Reject’.
If the variable is still ‘false’ at the end of the loop, it means that everyone approved.
The full flow diagram
As you can see in this article, you can build a simple approval flow in Power Automate even if you’ve got multiple approval paths with various number of approvers. Instead of building a fixed flow for each approval you can store the moving parts in a configuration list and use them dynamically when needed.
The flow above is a very simple approval flow to explain a concept and there’s a lot of space for improvements. You should store and display the approval history, you might need to avoid infinite trigger loop, add task reminders, send information emails, etc.
8 thoughts on “Build approval flow for various number of approvers in Power Automate”
The article is very helpful — thanks. For context, I don’t have any experience with Power Automate and only limited experience with SharePoint. I am, however, a BA with vast experience in workflow management and, having read the article, am confident I have the technical skills to work with Power Automate if necessary. My immediate goal is to determine if Power Automate can satisfy what my organization’s needs. I’ll describe the scenario as simply as possible and would welcome your opinion. I’m not looking for instructions on how to implement this, only an opinion on whether it can be implemented and, if so, the expected level of complexity.
Our desired approval process:
A Writer is assigned a task to create a Word document.
Once ready, the document is sent to one or more staff for Review. Each Reviewer may Approve, Reject or Skip (= decline to review) the document. The order of reviewers does not matter and should not be imposed (if I understand your article correctly, this is one potentially significant difference to what you have done).
If a Reviewer rejects the document, the Writer (or perhaps another Reviewer) will need to resolve any issues noted. That Reviewer would then be asked again to Approve the document.
Once all Reviewers have either Approved or Skipped the document, the document is sent to one or more staff for Approval. Approval happens in two steps. First, a group of one or more Approvers must either Approve or Reject the document: there is no Skip option, but the order of Approvers at this step does not matter. Once these Approvers have all Approved the document, it goes to the final stage of approval, which is Sign-off. This is another group of one or more approvers, but here the order is important: for example, the chief legal counsel may be required to sign-off, then the CEO, then a senior editor to perform one last check for typos etc.
Thanks in advance for your advice, and I hope I haven’t wasted your time!
you can implement the process, but probably not exactly as you described. Right now I can see a few potential problems/comments:
1. the ‘Start and wait for an approval’ action will allow you to accept either 1st response or wait for all responses, even if somebody rejects it’ll wait for the others. The workaround might be to have tasks in a separate list, but then they’re harder to work with for the users.
2. it’s problematic to let approve again only the user who rejected and skip the ones who approved/skipped
3. one flow can run only for 30 days so you probably can’t do everything in a single flow since there’re so many approval steps
4. you should consider how to do reminders depending on point 1 as with ‘Start and wait for an approval’ you don’t get ‘real-time’ responses
5. you don’t mention any permissions management on the document
6. you’ll need some custom logs/approval history as the flow run history is lost after 30 days
7. there’ll be a difference whether you work with users/SP groups/M365 groups
In summary, I think it could be implemented, but there’re some decisions to be made and it might need minor changes to fit the technical possibilities of Power Automate.
I’m trying something similar, but on there seems to be an issue on the “Apply to each” widget as it only sends the request to the 1st item of the list and locks up until it receives a reply to it. When reply the next approver receives X requests, where X is the number of times the flow has run.
the approval task will wait until the task is completed before it continues. If your flow creates multiple tasks then you probably have some loop in place that shouldn’t be there.
This has worked great for me. Although, with the configuration lists opposed to simple paths, how and where does the “Set Content Approval” status go? Thank you!
the ‘Set Content Approval’ should go into their respective branches after the process is finished – either all approved or somebody rejected.
What would you recommend doing in the event someone is out of office or neglects to respond to an approval? Any tips? Thank you!
not much, that’s something that’s really missing in the Approvals feature. For out of office you’re out of luck, for neglecting tasks I build reminder flows, e.g. https://tomriha.com/how-to-build-basic-reminder-flow-using-power-automate-and-sharepoint/