Setting up autoreply for emails sent to Service-Now mailbox

John_Lee
Kilo Explorer

Hi All

 

Is there a way to setup an autoreply text for emails sent to my organizations Service-Now mailbox, only to respond to emails sent from an internal email address?

 

Is there a way where an inbound email doesn't create a record but still produce an autoreply?

 

Many Thanks.

34 REPLIES 34

Hey Shalini, did you see mine where I have an inbound action with a target table of sys_email instead of a ticket table?   That way if you reach that order and meet some condition (or fail to meet previous conditions) it'll just create an outgoing email instead of making a ticket?


I am trying to implement your solution and creating an inbound action on Email table. So, in my original inbound action I changed the code so that I am creating tickets for only external users, not for internal users. For internal, I want to send an auto reply that they need to use My support and not send an email.



My question is: which inbound action will trigger? Appreciate your help. I am still writing the code.



Thanks,


Shalini


As long as you end the code with event.state="stop_processing"; it won't process any further inbound actions after that one.   So have one inbound action for the ticket table with the condition you're checking if they're internal or not, such as: email.from.toLowerCase().indexOf('yourcompanysdomain.com')<0 then have another inbound action for the sys_email table with the opposite condition and as long as they both end with the stop processing thing, it will only execute one of those two and will stop looking for any other matches.


Make sense?


Thank you Alan! I think I understand what you've explained. Let me develop and test and see how it works.



Appreciate your reply!



Regards,


Shalini


So, I tried the code.  



I kept my original code on the incident table and added a condition not create the ticket for internal but create in all other conditions. The order is 100 on this


Then I added an inbound on Email table and added your code.   The order is 10 on this.



I tested with internal email and external email. The inbound is not creating tickets both for internal and external.



Is the order on the inbound correct?



Thanks,


Shalini