How Block an Email for Inbound Action

Beto
Mega Guru

How do I block an email/user from creating an incident? I use the "Create Incident" that comes with ServiceNow. I tried to use the conditions below, but they do not work. It still creates an incident. I want to block "footprints."

find_real_file.png

3 REPLIES 3

bernyalvarado
Mega Sage

Hi Bryant,



You can enclose the script that is within the inbound action Create Incident with the following condition:


if (email.origemail != "footprints@mycompany"){



  // the original inbound script goes here



}



Thanks,


Berny


I inserted the above code and it still created the incident. Am I suppose to put a "then" statement?


ChiranjeeviR
Kilo Sage

1. Navigate to the module Email Filter as shown below:

a) Click on the module "Email Address Filters" as shown below:

ChiranjeeviR_0-1700567087952.png

 

b) Now click on New and define the Email Address and make sure to select Type as Deny as shown below:

ChiranjeeviR_1-1700567088125.png

 

https://docs.servicenow.com/bundle/sandiego-servicenow-platform/page/administer/notification/concept...

2nd  Approach:

Create a system property where you store email addresses which you don't want to create an incident, then check that property from the condition on the inbound action.

Utilize this Property and check in condition of Inbound action like below:

if(gs.getProperty('Property Name').indexOf(email.from)<-1)

Hope this helps. Please mark the answer as correct/helpful based on impact👍🇮🇳

Thanks & Regards,
Chiranjeevi
ServiceNow Developer | | ITSM | | ServiceNow Discovery | | Event Management | | Service Mapping | | CMDB

Please mark as Correct Answer/Helpful, if applicable.