Inbound Email Actions - Can I choose a specific POP3 account to generate requests from?

Sysop
Tera Contributor

Marketing team wants to use ServiceNow. I created them a new table extended from the task table called MKTG.  They want the requesters to be able to send an email to marketing@company,com and generate a ticket.    I plan on adding the marketing@company.com pop3 account to ServiceNow.. 

 

I'm looking at Inbound Email Actions and trying to figure a way for these tickets to be generated ONLY if the email is sent to the marketing@company.com address.  I dont want a ticket generated if someone sends an email to our ServiceNow POP3 address.

1 ACCEPTED SOLUTION

Jaspal Singh
Mega Patron
Mega Patron

No need to complicate. You can simply do below.

1. Create a forward rule when mail is sent to marketing@company.com --- Ask your outlook team to take care of the forwared rule that will send mails to abc@service-now.com where abc is your instance name

2. In the Inbound all you need is a check where

if (email.recipient.indexOf('marketing@company.com')>-1 || email.from.indexOf('marketing@company.com')>-1)

{

//process your inbound

}

You can add above in the condition of inbound mail actioin itself.

View solution in original post

6 REPLIES 6

Ashish Nahar
Kilo Guru

HI, First thing. ServiceNow has its own pop3 account. So in such cases, you need to ask the team to create a forward rule on the "marketing@company.com" email address to route it to servicenow email address.

Once you have done this. Create an inbound action add the following condition.

 

find_real_file.png

 

Once done, make sure your table selection and Stop processing is checked. You should receive any email sent to this email address in the table you have selected while creating the inbound action.

 

Inbound action

Jaspal Singh
Mega Patron
Mega Patron

No need to complicate. You can simply do below.

1. Create a forward rule when mail is sent to marketing@company.com --- Ask your outlook team to take care of the forwared rule that will send mails to abc@service-now.com where abc is your instance name

2. In the Inbound all you need is a check where

if (email.recipient.indexOf('marketing@company.com')>-1 || email.from.indexOf('marketing@company.com')>-1)

{

//process your inbound

}

You can add above in the condition of inbound mail actioin itself.

Something I should have probably added, I only want people with @company.com to be able to open a request so SN needs to check if the senders email address is matched to a user in our instance and then populate the "Opened by" field with that user.

 

If I'm forwarding from marketing@company.com to abc@service-now.com is "Opened by" still going to be set to the person who sent the original email?

Yes that should be fine.

All you need to do is GlideRecord the user table to get corresponding user by comparing mail. Something as below.

var frommailis=email.from;
var getuseris=new GlideRecord('sys_user');
getuseris.addQuery('email',frommailis);
getuseris.query();
if(getuseris.next())
{
current.opened_by=getuseris.sys_id; //set user
}

else
{
current.opened_by.setDisplayValue('Guest'); //else set guest
}