inbound email actions. Email address need to redirect to servicenow

sonita
Giga Guru

We received a request to create 2 new email address:  These email addresses will need to redirect to Service Now and then to the perspective assignment groups.

Any help please how o achieve this?

Anything sent to the email addresses will need to be assigned to prospective assignment groups

 

1 ACCEPTED SOLUTION

Mike Patel
Tera Sage

It's pretty easy to do.

1 - Setup forward rule on new email to forward all emails to SN.

2 - in your inbound action do something like below

if(email.to.toLowerCase().indexOf('email1@gmail.com') != -1){ //sysid of group that this email address belongs to
	current.assignment_group = 'sysid of group for that email';
}else if (email.to.toLowerCase().indexOf('email2@gmail.com') != -1){ //other group sysid
	current.assignment_group = 'sysid of group for that email';
}

View solution in original post

15 REPLIES 15

We receive the email , and the incident; but it goes to a different assignment group; 

Do you have a business rule impacting it?

Check if there is any default value for the Assignment Group Field. 
Right click on Assignment group field and Select Configure Dictionary and check the Default Value field.

in the create inbound action , there is a line that assigns that assignment grroup; i tried to comment that line , but when I was testing and I wanted to go to the link to the incident , it said no record found

 

find_real_file.png

Hi,

I can't see any line above in the screenshot provided where you are inserting any record into any table. You need to use current.insert() for inserting data into the Target Table as specified in the Inbound action form or object.insert() if you want to insert data into any other table apart from the Target Table.

 

In your scenario the target table is Incident , please try out the below code:

 

var check_email = email.from;

if(check_email == 'Provide your Email Address')

{

current.caller =gs.getuserID();

current.description = email.body;

Update Other Field Values as required

}

 

current.insert();

 

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

Regards,

Shloke

 

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

Regards,
Shloke