Need Assistance Automating Assignment Group Cleanup in ServiceNow
New article articles in ServiceNow Community
·
Feb 16, 2026
·
article
Hi Team,
I’m looking for guidance on implementing an automated cleanup process for Assignment Groups in ServiceNow. Below are the conditions we need to validate as part of the cleanup activity (to be run quarterly):
Cleanup Conditions Required:
- Groups with no members or only inactive members
- No tickets (INC, SR, PRB, CHG) assigned in the last 12 months
- Groups where associated user records have empty usernames and no last login date
- Remove members who have been inactive for more than 12 months
- Groups with no members AND no ticket activity in the last 12 months
- Additionally, before cleanup, check whether the group is linked to any Application Service based on CMDB/CI records
- Retain groups explicitly identified as SUP or APR (these should not be deleted)
Goal:
To build a script or Flow Designer automation that can evaluate the above conditions and help with quarterly assignment group cleanup.
Request:
Has anyone implemented similar logic or automated cleanup?
Looking for suggestions on:
- Best practices
- Query logic
- Scripted approach (Business Rule/Scheduled Script)
- Potential risks
- Sample scripts or pseudocode
IF POSSIBLE, PLEASE ATTACH SCREENSHOTS OF CONFIGURATION FOR BETTER UNDERSTANDING .
Thanks in advance!
View original source
https://www.servicenow.com/community/developer-forum/need-assistance-automating-assignment-group-cleanup-in/m-p/3489522#M1247386