Deactivate Inactive users automatically using a Flow Design

jeffreygard1127
Tera Contributor

Hi fellow ServiceNow practitioners,

I'm an Intern and fresh from my one week boot-camp in ServiceNow. I am trying to accomplish a task where in I need to create a flow design that will deactivate inactive users if they haven't login for more than 2 weeks. But I need to use a sys property and incorporate it in the flow design.

The sys property should have a formula like this:

If Last Login date is < (Current date - value from sys_properties) = deactivate user.

 

Right now, this is what my flow looks like but I am not sure if this is right. I'm also not familiar on how to create a sys_property and how to incorporate the sys property into my flow design.

 

FLOW 1.png

 

FLOW 2.png

 

FLOW 3.png

4 REPLIES 4

Mark Roethof
Tera Patron
Tera Patron

Hi there,

 

To get the value of a System Property, you could just perform a Look Up Record. With that, you can use that value elsewhere in your Flow, for example on your condition for the X days.

 

Kind regards,

 

Mark Roethof

Independent ServiceNow Consultant

10x ServiceNow MVP

---

 

~444 Articles, Blogs, Videos, Podcasts, Share projects - Experiences from the field

LinkedIn

Hi Sir @Mark Roethof, thank you for your response. I'm actually not familiar with that since this is my 1st time to create a flow design, could you please teach me how to do it?

HrishabhKumar
Kilo Sage

Hi @jeffreygard1127 ,

You should modify your search condition in Lookup Records action, where you are searching for inactive users. 

you have to add a filter to search for user where lastlogin is before 1 days.

it should look like the below screenshot, add this condition.

HrishabhKumar_0-1718128798783.png

 

Thanks,

Hi Sir @HrishabhKumar, Thank you for your response. My task requires a sys_property for the 14 days and not just a filter on the condition. Do you have an idea how to do it? It's my first time to create a flow so I'm not familiar with this.