using a List Collector in Flow Designer to set Approvals
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
I've looked at sever posts like this one on how get the values from a List Collector and use them going forward to populate tasks, tickets, etc.. Very Helpful
Now, with my use case, I'm trying to use a List Collector to assign Badge Access request for different locations.
Typically, users should be only selecting their primary location, so creating 1 approval record was easy.
The issue I'm facing is when different locations are selected (E.G. a traveling IT Tech) and multiple approvers are needed. How would you suggest creating Multiple Approval records at the same time using Flow?
With the flow I currently have and using the OOB approval activity, its creating them one at a time and wont create the second until the first is approved/rejected.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago - last edited 3 weeks ago
Hi @EricG2
You can achieve parallel approvals for multiple locations selected in a List Collector by creating a custom Flow Designer Action that dynamically builds an approval rule based on the selected locations and their associated approvers.
Solution Overview
- Create a Custom Flow Action
- Input: List Collector field containing the selected location sys_ids (comma-separated).
- Output:
approvers_list(String).
- Determine Approvers
- In the Action Script, call a Script Include method (e.g.,
getApproversList()) that:- Accepts the selected location sys_ids.
- Returns all applicable approval groups and individual approvers for those locations.
- Returns a JSON response containing:
- In the Action Script, call a Script Include method (e.g.,
- Build the Approval Rule Dynamically
- Generate an approval rule string that can be consumed by the Approval Coordinator.
- This allows ServiceNow to create all approval records simultaneously rather than sequentially.
- use the data pill to map the approvers that comes from the custom action.
please refer the below scriptshots of the flow designer . this will work for you please modify according to your requirement i giving you the reference how we build the solution of it and if anything required please let me know.
If my answer has helped with your question, please mark my answer as accepted solution and give a thumb up.
Thank You
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
Hi @EricG2
If my response helped, please mark it as correct and close the thread this helps future readers find the solution faster!
Thank you!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
Also please refer the below custom action script logic
makesure write the logic as per your requirement in your script include i giving you reference .
Also makesure the generated approval rule would look similar to:
in my senerio i was handling the the single users approver as well group approvals.
If my answer has helped with your question, please mark my answer as accepted solution and give a thumb up.
Thank You
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
you want parallel approval or sequential?
if parallel approval and want to wait till approval is done for each List Collector value then check this
when you use "Do the following in parallel" flow logic and use multiple "Ask for Approval" then Decision from 1st approval is being applied to all the approvals
see these blogs and the KB from ServiceNow with a workaround
Parallel Approvals in Flow Designer
Parallel Approvals in Flow Designer
💡 If my response helped, please mark it as correct ✅ and close the thread 🔒— this helps future readers find the solution faster! 🙏
Ankur
✨ Certified Technical Architect || ✨ 10x ServiceNow MVP || ✨ ServiceNow Community Leader