Join the #BuildWithBuildAgent Challenge! Get recognized, earn exclusive swag, and inspire the ServiceNow Community with what you can build using Build Agent.  Join the Challenge.

Trying to stop, If requester replies to RITM comments, requester gets comments email

Nicholas Hromya
Giga Guru

I think I need to update the action in the Inbound email to set validator to not run if the reply is being sent by Opened by or Requester.  I am not sure what this would be in js.

I am not sure how to do this.

 

We have a notification named "Request item commented":

When to send : Insert - Updated - "Additional comments" changes

Who to send: Opened by, Requested for, and Watch list

 

We have Inbound email action named "Update Request Item":

When to run: reply

Action: 

if (current.getTableName() == "sc_req_item") {
    current.comments = "reply from: " + email.origemail + "\n\n" + email.body_text;
   
    if (gs.hasRole("itil")) {
        if (email.body.assign != undefined)
            current.assigned_to = email.body.assign;
       
        if (email.body.priority != undefined && isNumeric(email.body.priority))
            current.priority = email.body.priority;
    }
   
    current.update
 

 

5 REPLIES 5

Nicholas Hromya
Giga Guru

Trying this some more, I still want the inbound email to update the comments on the RITM, but I don't want the notification to send if the comments on the RITM are updated by the requester or Opened by.  So I think I need to update the notification.  I am still not sure how to do that.

Thanks

Nick

Nicholas Hromya
Giga Guru

On the notification, I will try the condition

Created By   is different    from      To

 

Robert H
Mega Sage

Hello @Nicholas Hromya ,

 

Have you verified that the "Send to event creator" option in the Notification is unchecked?

 

RobertH_0-1745647012357.png

 

Regards,

Robert

 

Hello it is unchecked.


I found we have two inbound email actions on reply.  Even though the activity log doesn't show to inputs, it appears two were set.  I disabled one and now it works.