“I’m using a configuration list with approvers to optimise my approval Power Automate flow, but I’d need to include various responses for some users, can I do that?”
If you followed some of the previous articles, you probably don’t hard-code approvers directly into your approval flows. You put them in configuration lists, use the old-but-still-good SharePoint groups, maybe even put the whole process in a single approval task. But what if it’s not only various approvers, but also various response choices for each of them? How do you configure such approval action, and how do you evaluate the responses later?
The responses are just another array
Since the options can vary, you’ll have to go with custom responses. Select it from the action’s dropdown menu and you’ll see a familiar button – the input entire array one. Type in some dummy options and click the button, it’ll show you what format it expects.
Hint: it’s a simple array. That means, if you want to dynamically define the options you can input them as an array.
Add the options to the configuration list
Since you’re taking the approver information from a configuration list, you can take also the available responses from there. Add a new column, e.g. ApprovalTaskOptions, and store the options separated by a semicolon in that column.
With that you’ll get not only the approvers and their role, but also their response options. Just split them by the semicolon and use as ‘Response options’.
Evaluate the response in a ‘Switch’
The last step is to evaluate the response. It was easy when it was just Approve/Reject, or when it was the same for all approvers. With this approach it’ll need a bit more. As there’re multiple possible outcomes, you must prepare the flow for each of them. It could be a tree of ‘Conditions’ inside each other, or it can be a single ‘Switch’. I prefer the latter.
Add a ‘Switch’ and create a case for each available outcome in your configuration list. It doesn’t matter that some tasks won’t include all the options, yet be prepared for the ones that do.
Define what should happen in each of the cases and you’re done.
When you build a flow you must always find a balance between the flow itself and a configuration list. You can hard code everything in the flow, but then the flow will be massive and every change will require editing the flow. That’s why it’s a good idea to utilise configuration lists and define the moving parts in there. It can be the approvers, roles, approval paths, and as you could see in this article it can contain also various responses for the Power Automate approval flow. A one action replacement for many approval tasks that you’d have to otherwise configure and manage.