How to add action that will check if user is inactive for 60 days?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-27-2025 07:33 AM - edited 01-27-2025 07:33 AM
Hi everyone!
Good day!
It's my 1st time to create a flow design from scratch and I need help cause I can't execute the logic.
I need to create a flow that will trigger the deactivation tasks for (2) department. Each dept has their own deactivation tasks and we already have the subflow for it. But these subflow will only be triggered after checking in the sys_user table that users are already inactive for 60 days.
I know how to do the trigger, but I don't know how to do the ACTION part, can someone please help me?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-27-2025 07:52 AM
Hi @jeffreygard1127 ,
As suggested by @Ankur Bawiskar you need to add that filter to target the correct user record.
Now you need to call sub flow for 2 department.
-------------------------------------------------------------------------
If you found my response helpful, please consider selecting "Accept as Solution" and marking it as "Helpful." This not only supports me but also benefits the community.
Regards
Runjay Patel - ServiceNow Solution Architect
YouTube: https://www.youtube.com/@RunjayP
LinkedIn: https://www.linkedin.com/in/runjay
-------------------------------------------------------------------------
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-27-2025 09:02 AM
Hi @Runjay Patel, good day! Appreciate your response on my question. However, I'm confused on why on his filter, it says ACTIVE is true? Can you elaborate on this?
Also, I had to change my initial trigger from ACTIVE is FALSE to ACTIVE CHANGES TO FALSE because this flow should only run once the system detected that a user becomes INACTIVE, is this correct?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-27-2025 10:28 AM - edited 01-27-2025 10:29 AM
Your trigger condition is correct.
Ankur's filter will give list of users who are active but has not logged into Servicenow for last 60 days.
Mark it helpful if this helps you to understand. Accept solution if this give you the answer you're looking for
Kind Regards,
Rohila V
2022-25 ServiceNow Community MVP
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-27-2025 12:11 PM
Hi @Voona Rohila thanks for responding but I'm confused. So what we need is for this flow to ONLY run once a user changes from ACTIVE to INACTIVE. 2nd, once we have identified those users that becomes inactive, we need to wait for 60 days and check again if they are still active. If after 60 days and they becomes active, the flow should end. But if after 60 days and they remain inactive, the flow will continue. Sorry, I'm new to creating flow design.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-27-2025 08:02 PM
Hi @jeffreygard1127 ,
Sorry for confusion, follow below steps.
1. Setup trigger condition like below.
2. Add below flow logic with 1440 hours
3. Add you subflow.
-------------------------------------------------------------------------
If you found my response helpful, please consider selecting "Accept as Solution" and marking it as "Helpful." This not only supports me but also benefits the community.
Regards
Runjay Patel - ServiceNow Solution Architect
YouTube: https://www.youtube.com/@RunjayP
LinkedIn: https://www.linkedin.com/in/runjay
-------------------------------------------------------------------------