Inbound action

tGhadage
Tera Contributor

Hi Guys, 

 

I have requirement where if the sender email address is test@test.com and if that's being forwarded to forwared@test.com and the subject line is "Fw: GL   Workbench New Extract Refresh Failed" then create p2 incident.

 

can you please guide!

Thanks!!

1 REPLY 1

HrishabhKumar
Kilo Sage

Hi @tGhadage ,

To create an inbound email action in ServiceNow that meets your specified conditions, follow these steps:

 

Navigate to Inbound Email Actions:

Go to System Policy > Email > Inbound Actions in the application navigator.

Create a New Inbound Email Action:

Click on New to create a new inbound email action.

 

Define the Conditions:

Name: Give your inbound email action a meaningful name, e.g., "Create P2 Incident on GL Workbench Failure".

Target Table: Select Incident since you want to create an incident.

Type: Select Create a Record.

 

Filter Conditions:

Add conditions to match the sender and recipient email addresses and the subject line. This can be done in the Conditions section.

Sender matches: test@test.com

Recipient matches: forwarded@test.com

Subject starts with: Fw: GL Workbench New Extract Refresh Failed

 

Script (if needed):

In the Script section, you can write a script to set additional fields and properties for the incident.


(function runAction( /* GlideRecord */ email, /* GlideRecord */ email_action, /* GlideRecord */ event) {

var incident = new GlideRecord('incident');

incident.initialize();

incident.short_description = "GL Workbench New Extract Refresh Failed";

incident.description = email.body_text;

incident.caller_id.setDisplayValue(email.origemail);

incident.urgency = 2; // P2 incident

incident.insert();

})(email, email_action, event);


Thanks,

Hope this helps.

If my response proves helpful please mark it helpful and accept it as solution to close this thread.