How to setup auto replies for incoming emails to servicewnow???

naveenmyana
Giga Expert

Hi All,

I need to setup an auto replies for incoming emails to service-now, when they fail to create a ticket or record in servicenow. Please tell me where i can do this one....

I need to add the below message in auto reply...

Dear Sender,

Thank you for contacting the One IT Service Desk.

We received your email however, a ticket has not been created.

If you wish to have a ticket created, please can you do the following:

  • Make sure the Service Desk email address is in the "To:" field of the message
  • If the email subject starts from "Re:", "Accepted:", "Tentative:" or "Declined:", can you please remove it
1 ACCEPTED SOLUTION

Hi Naveen,



I believe the event will be triggered only if the script in the inbound action gets executed. If it fails in the condition filter of the inbound action, the script will not be executed at all.



You can create a notification on sys_email table. It will be triggered when it is updated or inserted. Give filter conditions like:


Capture.PNG



You can add some other conditions also based on your requirement. Like Recipient contains <your instance email id>.



The mail will send to the user Id, if it's existing user of the system.


Capture.PNG



Type the subject and body of the email in what it will contain.



Regards,


Souren


View solution in original post

9 REPLIES 9

henry_cheng
ServiceNow Employee
ServiceNow Employee

Hi Naveen,



ServiceNow instance is not an email server so there is no automatic way to set up the auto-response emails as you expected.


You need to do some customization on the inbound email actions and create new email notification to send out the response email.


The rough idea is as below.


1.Create a new email inbound action and set the trigger condition based on the keyword in email subject line


2.In the inbound action script use API gs.eventqueue to create new event in the event queue. You need to register the new event name beforehand in event registry.


Please refer to below wiki page for this API.


GlideSystem - ServiceNow Wiki


3.Create a new Email Notification and set the trigger event to the new event name.


4.Compose this email notification and select the recipient who will receive the response email.



Instead of create a new email notification you can also create a new business rule and manually create a new email record in sys_email table. However email notification is much more convenient because you don't need to manually populate all the email fields in the email record when using business rule.



Cheers


Henry


Hi Naveen,



I believe the event will be triggered only if the script in the inbound action gets executed. If it fails in the condition filter of the inbound action, the script will not be executed at all.



You can create a notification on sys_email table. It will be triggered when it is updated or inserted. Give filter conditions like:


Capture.PNG



You can add some other conditions also based on your requirement. Like Recipient contains <your instance email id>.



The mail will send to the user Id, if it's existing user of the system.


Capture.PNG



Type the subject and body of the email in what it will contain.



Regards,


Souren


Hi Souren,



Can u please let me know will this send an email to users when the emails sent by them to service now are failed to create a Incident or call records.



Do I need to create any event In addition of what you said above...


We have an Inbound action to not create tickets when ever the subject of the email contacins Re: , Accepted, Declined..