Sending email to new user accounts with Flow Designer

Antti Luusua
Kilo Guru
Hello Servicenow community, hopefully this is the correct place to ask.

I am looking for ideas here. Currently we are using Flow Designer to send e-mails whenever a new user is registered in our organization. Users can be registered from multiple different HR and user management systems and the information is then fed to Servicenow by scheduled imports. Number of new users per day can vary greatly, even hundreds per day and sometimes zero.

Right now our Flow works as follows

Using Lookup Records, it finds any user accounts created today, which are active and have an e-mail address. Then it sends e-mail to those users. We also have set up a maximum records and using Flow logic to make sure we don't accidentally send e-mail to everyone in our organization.

Now, the problem with our current system is whenever a user, who has previously worked or has been part of our organization, already has user account. For example, lets say that user Sarah has worked for us and her contract ended in 2023-06-30 and her account is locked and disabled. We do not delete user accounts very hastily in Servicenow, so her account is just in disabled state.

Now she comes back in 2023-09-01 to work again and her account in Servicenow is reactivated. But, she does not receive the e-mail because Flow Designers rule obviously does not match her situation, it is not a new account created today.

Is it possible to create Flow logic that would seek user accounts that have been activated today or something similar? Or how could I make a logic that would also send message to Sarah when her account is reactivated?
1 ACCEPTED SOLUTION

btlindsay
Tera Expert

I'm not entirely sure that you can do this in a Lookup Records action, as there's no way to configure it to detect changes to the record.

 

Another option that might do what you're after is to change the Flow trigger to created or updated on the User table, and set the conditions up so that the flow only triggers when you have a new user created today OR the active flag changes to active. I've included a screenshot of an example.

 

btlindsay_0-1693293768647.png

 

Hope that helps!

View solution in original post

1 REPLY 1

btlindsay
Tera Expert

I'm not entirely sure that you can do this in a Lookup Records action, as there's no way to configure it to detect changes to the record.

 

Another option that might do what you're after is to change the Flow trigger to created or updated on the User table, and set the conditions up so that the flow only triggers when you have a new user created today OR the active flag changes to active. I've included a screenshot of an example.

 

btlindsay_0-1693293768647.png

 

Hope that helps!