Notification conditions for received email updating RITM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-25-2023 07:45 PM
I'm wanting to send an email notification only if an email reply is received and updated into the RITM.
Ultimately what I want to do is send an 'auto reply' if an email is received as a response to a closed RITM advising that the RITM is closed and no one will be looking at their reply, so contact our Service Desk directly.
I wanted to add a condition in the notification that simply looked at:
Is the RITM closed? If yes and the email update was received from the requested for or a watchlist member then auto reply to the sender.
So this is what shows in the activities for the RITM
I cannot figure how to get this condition to run.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-25-2023 10:58 PM
Hi @Bidduam , you can use a Inbound Action with type Reply Email or Record Action and script your logic in it.
See: https://support.servicenow.com/kb?id=kb_article_view&sysparm_article=KB0777623
There are two ways in which you can send an auto-reply to an incoming email
- Configuring an Inbound Action with Action type: Reply email.
- Configuring an Inbound Action with Action type: Record Action and with certain conditions (using a script) to send the reply
Ideally an Inbound Action with Action type = reply email also can be triggered on specific conditions, however, there could be some typical scenarios where the script first needs to identify the target record and then, depending on the conditions, the instance should send an auto-reply.
In that case, it is advisable to configure an Inbound Action with Action type = Record Action and add the following code to your script, editing it as needed:
var gr = new GlideRecord('sys_email');
gr.initialize();
gr.type = 'send-ready';
gr.recipients = email.origemail;
gr.subject = <add the desired email subject>
gr.body = <add the desired email body>
gr.insert();
Greets
Daniel
Please mark reply as Helpful/Correct, if applicable. Thanks!