How can I get the "Activity Stream @Mention Email" notification email to include the text of the @Mention?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-23-2017 09:05 AM
Hello all,
How can I get the "Activity Stream @Mention Email" notification email to include the text of the @Mention?
Thanks!
Mike
- Labels:
-
Incident Management

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-23-2017 09:28 AM
Hi Michael,
You can add
if (current.field_name == "comments") {
template.print(recordGR.comments.getJournalEntry(1) + "<br />");
}
else if (current.field_name == "work_notes") {
template.print(recordGR.work_notes.getJournalEntry(1) + "<br />");
}
}
to the mail notification script: ng_activity_mention_body
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-18-2021 09:09 PM
Hello Jaspal,
I was wondering if there is a way we can record the email sent via Mentions in the activity streams of the records (incident, requests, story, etc).
Regards,
Amit

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-02-2019 02:43 PM
This script worked well for me.
Go to System Notifications > Email > Notification Mail Script
Look for ng_activity_mention_body
Then replace the script with the following :
var recordGR = new GlideRecord(current.table);
var field = current.field_name;
if(recordGR.get(current.document)) {
email.setSubject("You have been mentioned in " + recordGR.getDisplayValue());
template.print("<p style='color: #424E5B;margin: 0 0 12px;line-height: 26px;margin-bottom: 12px'>You have been mentioned by " + current.user_from.name + " in <a href='/" + recordGR.getRecordClassName() + ".do?sys_id=" + recordGR.getUniqueValue() + "'>" + recordGR.getDisplayValue() + "</a></p>" + '<br><br>' + 'Comments: ' + current.document[field].getJournalEntry(1));
}
This is the result:
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-12-2019 09:18 AM
Hi,
This code is working fine.
But is there any option to put the comment entered in next line. Can we get the comment after we mention the name from the getJournalEntry() ? In below image, we can see users are directly entering the comment after @mention so that mail is looks like this.