Questions on notification implementation
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-07-2024 09:51 PM
Hello experts,
If I want to set an automatic reply every time a 'new' email is received in the instance, what is the optimal approah?
Method 1: I am thinking of just using the notification. I am thinking of setting the 'when' tab to inserted and received type is 'new'.
When I check on who will receive tab, I am not sure on what to set:
Method 2: Create an inbound email action that will trigger an event that will send the notification.
This has email.origemail that will get the senders email.
Is it much better to use method 2?
Is it ever possible to use method 1?
Regards,
Vaine
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-08-2024 01:12 AM
Hello @Rain Vaine
Yes it will better to use the method 2 and it will otimal approach for you.
If my answer has helped with your question, please mark my answer as accepted solution and give a thumb up.
Thank You
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-16-2024 05:44 PM
Hello,
I tried implementing the event and notification approach but I am encountering a problem. The situation is that when the new email is received, it will not create an incident, but instead create an event that will trigger the notification. The problem is since no incident is created, the event is not being processed and shows an error. Is there any possible work around here?
Regards,
Vaine

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-16-2024 06:57 PM
I haven't tested it but how about using a business rule?
table: sys_email
Active: checked
Advanced: checked
When: after
Insert: checked
Filter Conditions:
Type is received
Received type is New
Script:
if (current.type == "received") {
var replyBody = "autoreply email message.";
var replyEmail = new GlideEmailOutbound();
replyEmail.setSubject("Re: " + current.subject);
replyEmail.setFrom("autoreply@servicenow.com"); // Replace with email to use to reply
replyEmail.setTo(current.origemail);
replyEmail.setBody(replyBody);
replyEmail.send();