Inbound email action: Prevent creating ticket sent directly to company.service-now.com

jxa7987
Tera Expert

Hi,

We have a custom application and set up an inbound email action. All New emails that are being sent out to their 4 mailbox creates ticket. So far it works. But the problem is if the user directly Servicenow, let say "company.service-now.com". It also created a new ticket for that custom application.

How can I reject the ticket creation if it only direct to Servicenow email? We are planning to create more inbound email to our IT and HR Applications.

Please help. Thanks.  

1 ACCEPTED SOLUTION

prashantatsastr
Giga Expert

Hi Joan,



In this case you will probably have to modify the inbound action script created for the customized application.



You can check emails in the inbound script if the email was sent to ServiceNow mailbox directly.


if(email.recipients.indexOf('company@service-now.com')>-1)


{


//Do not process the email


}


else if (check required condition for mailboxes)


{


// do something
}



Please let me know if you need more details.



PS: Please hit like, mark helpful/ correct depending on impact of the response.



Regards,


Prashant


View solution in original post

3 REPLIES 3

Kalaiarasan Pus
Giga Sage

Find the corresponding inbound action that is creating the ticket by going through the received email log. Check its related list to see the inbound action that was executed.


prashantatsastr
Giga Expert

Hi Joan,



In this case you will probably have to modify the inbound action script created for the customized application.



You can check emails in the inbound script if the email was sent to ServiceNow mailbox directly.


if(email.recipients.indexOf('company@service-now.com')>-1)


{


//Do not process the email


}


else if (check required condition for mailboxes)


{


// do something
}



Please let me know if you need more details.



PS: Please hit like, mark helpful/ correct depending on impact of the response.



Regards,


Prashant


kkswamy
Tera Expert

find_real_file.png


You can use the From field and roles field in the "When to run" section to restrict of creating the tickets through inbound email action.


or


you can use the condition builder also to put the conditions to run the email action.


or


you can write a script in "actions" tab saying that if the email came from specific user and fixed subject line or a keyword in the email of the subject then only this inbound email action should run.