- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-03-2018 04:20 AM
I want to know how to trigger email whenever i add attachment to incident ticket.
Mail should be trigger to "Caller"
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-04-2018 01:28 PM
Attachments are stored on a separate table called Attachment. There are details on this Attachment record that point to the table that this attachment is related to. Since you want to send an email, here is what you need to do:
1. Create an Event to use with your notification:
A. Navigate to System Policy > Registry.
B. Click New to create a new Registry. Here are the details for the Event Registry record:
Event name: incident.attachment.add
Table: Incident [incident]
Description: Used to send a notification when an attachment is added.
Fired by: Business Rule
2. Create a Business rule to trigger the event:
Name: Send Event for Incident Attachment add
Table: Attachment [sys_attachment]
Advanced: true
Description: Sends an event when an attachment is added to the Incident table
When: after
Order: 100
Insert: true
Update: false
Delete: false
Query: false
Condition: current.table_name == 'incident'
Script:
(function executeRule(current, previous /*null when async*/) {
var incObj = new GlideRecord('incident');
if (incObj.get(current.table_sys_id)) {
gs.eventQueue('incident.attachment.add', incObj, current.file_name);
}
})(current, previous);
3. Create your notification:
Name: INC-Attachment Added
Table: Incident [incident]
Send when: Event is fired
Event name: incident.attachment.add
Users/groups in fields: Caller
Subject: Attachment ${event.parm1} has been added to Incident ${number}
Let me know if you have any questions,

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-04-2018 01:28 PM
Attachments are stored on a separate table called Attachment. There are details on this Attachment record that point to the table that this attachment is related to. Since you want to send an email, here is what you need to do:
1. Create an Event to use with your notification:
A. Navigate to System Policy > Registry.
B. Click New to create a new Registry. Here are the details for the Event Registry record:
Event name: incident.attachment.add
Table: Incident [incident]
Description: Used to send a notification when an attachment is added.
Fired by: Business Rule
2. Create a Business rule to trigger the event:
Name: Send Event for Incident Attachment add
Table: Attachment [sys_attachment]
Advanced: true
Description: Sends an event when an attachment is added to the Incident table
When: after
Order: 100
Insert: true
Update: false
Delete: false
Query: false
Condition: current.table_name == 'incident'
Script:
(function executeRule(current, previous /*null when async*/) {
var incObj = new GlideRecord('incident');
if (incObj.get(current.table_sys_id)) {
gs.eventQueue('incident.attachment.add', incObj, current.file_name);
}
})(current, previous);
3. Create your notification:
Name: INC-Attachment Added
Table: Incident [incident]
Send when: Event is fired
Event name: incident.attachment.add
Users/groups in fields: Caller
Subject: Attachment ${event.parm1} has been added to Incident ${number}
Let me know if you have any questions,
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-25-2022 08:57 AM
Very well documented
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-27-2022 04:10 AM
Thank you ! It worked.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-27-2022 04:10 AM
Thank you ! It worked.