How to hide specific Email from activity logs

Meghant Rai
Kilo Guru

I have a requirement where we are resetting the password of user via Orchestration and incorporated a notification activity within workflow which is sending the credentials to the user. However once the RITM is closed the password is visible in activity section of the RITM which is a Security breach. Can someone help me how to hide this email from activity logs of the RITM so that it should not be visible to anyone or the second approach not a single email should be visible for the RITM for this catalog item.

@Ankur Bawiskar : Your help would be highly appreciated.

1 ACCEPTED SOLUTION

Consider creating an event to trigger a notification. This instead of directly using the Notification utility in Workflow/Flow will have as an advantage that you can use the Email Access Restriction + in general this approach is far more better for maintainability. Maintaining notifications that are created using the Notification utility are a nightmare.

If my answer helped you in any way, please then mark it as helpful.

Kind regards,
Mark
2020, 2021 ServiceNow Community MVP
2020, 2021 ServiceNow Developer MVP

---

LinkedIn
Community article, blog, video list

 

Kind regards,

 

Mark Roethof

Independent ServiceNow Consultant

10x ServiceNow MVP

---

 

~444 Articles, Blogs, Videos, Podcasts, Share projects - Experiences from the field

LinkedIn

View solution in original post

21 REPLIES 21

Hi,

It is regarding request number: ${number}
Password: #######
 
Please login after 30 minutes and check.
Note: You can reset the password after 24 hours.
 
"This is an automated Email please don't reply.""
 
This is the notification we are sending via workflow.
Is if helpful?

@Meghant Rai 

You can try this option

1) query business rule on sys_email

Condition: !gs.hasRole('admin') && gs.getSession​().isInteractive()

Script:

(function executeRule(current, previous /*null when async*/ ) {

	current.addEncodedQuery("bodyNOT LIKEPlease login after 30 minutes and check.");

})(current, previous);

Regards
Ankur

Regards,
Ankur
✨ Certified Technical Architect  ||  ✨ 9x ServiceNow MVP  ||  ✨ ServiceNow Community Leader

joshvanharn
Kilo Guru

Have you considered not associating the email to the ticket? You can choose to generate the email, and use some of the outputs to update the ticket, but not the actual email.

How can I achieve this? We are incorporating the email notification using notification activity in Workflow, is there any way we restrict this email to get attach in activity logs

If you're using Flow, all you have to do is remove the ticket reference in the email action.

If you're using Workflow, you could just create a Flow or a BR that removes the values for 'instance' and 'target_table' (maybe after posting an update to the target) from the sys_email field. This disconnects the email from the ticket, and it will no longer show on the incident.