Work-around for Inbound Action Skipped for Inactive User
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-25-2023 10:29 AM
Hi,
Problem:
We have a case where some users (vendor types with AD accounts) send emails to trigger an Inbound Action to create an incident. These users don't typically login to the Portal due to some workflow complications on their end so when their AD account is disabled per a 90-day no-use AD policy, the User's SN account becomes inactive via Azure sync. The Users still need to send an email to our SN Instance Email address to create an Incident, but the Inbound Action isn't triggered because the SN User Account is inactive and the sent email gets flagged as "received-ignored". The User in this case has no idea that their AD account is disabled, their ServiceNow User account is inactive, and that the email they are sending does not process in ServiceNow.
Question:
For Inactive Users that send an email to our SN Instance email address, is there a way to trigger an email back to that User? The intent of sending an email back is to let the User know that their AD account is disabled and to have the User contact our Service Desk.
Thank you.
Mike
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-25-2023 08:06 PM
Hi, if I recall correctly these emails are moved to the 'junk' folder if the user is inactive and\or locked out.
I would look at creating an after update BR for sys_email table where mailbox = junk and in the script trigger a sysevent that you can then consume in a notification advising the users that their account is locked.
GlideSystem | ServiceNow Developers
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-31-2023 08:22 AM
Hi Tony,
Thanks for the information and sorry for the late reply. Below are the steps I have taken, but I’m not getting a reply back to the User (ESS Test) that sent the email. I assume something in the BR Script, but don’t know what? Screen shots attached.
- Set User (ESS Test) to inactive in ServiceNow User table.
- Created Business Rule (Notify Inactive User)
Business Rule created on Email (sys_email) table.
When to run (After & Update)
Conditions:- Mailbox is Junk
- User ID is ESS Test
- Subject <contains> PDS
BR Script:
(function executeRule(current, previous /*null when async*/) {
gs.eventQueue('notify.inactive_user', current, 'parm1','parm2',gs.getUserID(), gs.getUserName());
})(current, previous);
Created Event (notify.inactive_user)
Event created on Email (sys_email) table.
- Created Notification (Notify Inactive User)
Notification created on Email (sys_email) table
Triggered by Event (notify.inactive_user)
TEST
- Login to PC as ESS Test User
- Send email to our ServiceNow DEV Instance email address with PDS in the Subject
TEST Result
- Email recognizes User ID is inactive and sends email to Junk folder.
- An email is NOT sent back to ESS Test User

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-30-2023 06:21 AM
Hi Mike
OOTB functionality will not send emails to inactive users.
So I would update your BR and put the inbound email in parm1
(function executeRule(current, previous /*null when async*/) {
gs.eventQueue('notify.inactive_user', current, '<insert email address here>','parm2',gs.getUserID(), gs.getUserName());
})(current, previous);
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-06-2023 03:19 AM
Hello Mike,
I want to prevent creating incidents via email if the sender's email ID is blank/the sender account is inactive in the user table, Do you have any idea how can I do this?
Also, we created more than 200+ inbound actions to create incidents based on different conditions/ subject lines we want the same functionality for this inbound action also.
if the sender is inactive incident should not be created.
Thanks,
Divya