Trigger Event Based on Email

Akash Singh2
Tera Contributor

Hello All,

 

How can be event  triggered to create incident based on email received.

Condition is like if email subject contains keywords as DOWN, trigger event to create incident but if within 30 mins email subject comes as UP, restrict event triggering to create incident.

 

@Ankur Please provide any suggestions.

 

Thanks

Akash

 

5 REPLIES 5

Debasis Pati
Tera Guru

Hello @Akash Singh2 ,

The best way to configure this is through inbound email actions.
Inbound email actions can create records in servicenow tables and update records.
more about servicenow inbound email actions - https://www.servicenow.com/docs/bundle/yokohama-platform-administration/page/administer/notification...

DebasisPati_0-1739524826375.png



Go to inbound actions as per the above screenshot

DebasisPati_1-1739524917939.png


Create one more inbound action of yours like the above and in condition give your condition like subject is "your subject".

and in actions just write a script like below to create incident record
Sample script:

var gr = new GlideRecord('incident');
gr.initialize(); 
gr.description = 'Testing'; 
gr.insert();


Note: Here i have added only description amend and add lines in the script according to your requirement.

Please mark it as helpful/correct if this helps you.

Regards,
Debasis