Show attachment as link in Incident Resolution email notification
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
yesterday
Is ServiceNow NOT allows to show incident attachment as a link in email notification.
Is yes, please provide short step or guidelines on this.
Highlighted text should show link to attachment.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
8 hours ago
Hi @gauravsp ,
Yes, ServiceNow allows you to show an Incident attachment as a clickable link in an email notification.
I tested this approach in my instance using a Notification Email Script that queries the sys_attachment table for attachments belonging to the current Incident and generates a clickable attachment URL.
Notification Email Script:
(function runMailScript(current, template, email, email_action, event) {
var attachment = new GlideRecord('sys_attachment');
attachment.addQuery('table_name', current.getTableName());
attachment.addQuery('table_sys_id', current.getUniqueValue());
attachment.query();
while (attachment.next()) {
var attachmentUrl =
gs.getProperty('glide.servlet.uri') +
'sys_attachment.do?sys_id=' +
attachment.getUniqueValue();
template.print(
'<div style="margin-top:5px;">' +
'<strong>Attachment:</strong> ' +
'<a href="' + attachmentUrl + '">' +
attachment.getValue('file_name') +
'</a>' +
'</div>'
);
}
})(current, template, email, email_action, event);
Notification:
Hello ${caller_id.first_name},
Your incident has been solved.
${number}
Solution notes:
${close_notes}
${mail_script:Show Incident Attachment Links}
It will be automatically closed in 5 business days.
If the solution does not resolve your issue, you may reopen the incident.
Thank you,
Helpdesksteps:
- Create a Notification Email Script.
Call the Mail Script from the notification using:
${mail_script:Show Incident Attachment Links}- Keep Include attachments unchecked if you only want the clickable link rather than the file attached to the email.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
7 hours ago
if the notification doesn't have that, you can include your custom logic and links using Email script
what did you start with and where are you stuck?
💡 If my response helped, please mark it as correct ✅ and close the thread 🔒— this helps future readers find the solution faster! 🙏
Ankur
✨ Certified Technical Architect || ✨ 10x ServiceNow MVP || ✨ ServiceNow Community Leader
