- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-06-2017 02:10 AM
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.
Solved! Go to Solution.
- Labels:
-
Scripting and Coding
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-06-2017 04:11 AM
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

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-06-2017 02:14 AM
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-06-2017 04:11 AM
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-06-2017 05:33 AM
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.