- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-20-2018 05:18 AM
Hello!
Is it possible to add to an email body the currently logged user's name and location?
For example,
Dear caller.first name,
Incident Number: xxxx
Short Description: xxxx
Priority: xxxx
Thank you.
Currently logged user's name
Currently logged user's location
Thanks!
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-20-2018 05:30 AM
Naveen makes a good point. Notifications can be triggered from different locations including Flow Designer, Workflow, Scheduled jobs, triggered from events or directly from record updates/inserts.
A universal approach would require you to evaluate all possible scenarios and ensure they are compliant so your notification script has at least the sys_id of the user who triggered the message.
Example, if they are triggered by an event, you can include gs.eventQueue() and use the third or fourth argument to pass gs.getUserID(). However you may to be in control of all the events triggered.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-20-2018 05:20 AM
Hi
You can do it using mail script Something like this you can try :-
<mail_script>
var userName = current.caller.first_name.toString().charAt(0).toUpperCase() + current.caller.first_name.toString().slice(1);
template.print("Dear " + userName + "<br />");
</mail_script>

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-20-2018 05:25 AM
Hi,
It's possible but I can't get the exact requirement, If it is just for a mail signature then it's better not to add.
Because we normally send email notifications through events or workflows. So when you try to see the updated by field it is generally be admin or system as the events and workflows are processed in background by servicenow.
If your requirement is any email client then you can surely achieve this without any difficulty.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-20-2018 05:30 AM
Naveen makes a good point. Notifications can be triggered from different locations including Flow Designer, Workflow, Scheduled jobs, triggered from events or directly from record updates/inserts.
A universal approach would require you to evaluate all possible scenarios and ensure they are compliant so your notification script has at least the sys_id of the user who triggered the message.
Example, if they are triggered by an event, you can include gs.eventQueue() and use the third or fourth argument to pass gs.getUserID(). However you may to be in control of all the events triggered.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-28-2024 09:33 PM
Hi Chuck,
I hope I'm not too late!!! I've a requirement where in if any user be it admin or a user which has access to that table tries to export the table data, then a notification should be triggered to the security team. This email notification should contain the details of the user who has exported the table data