Assistance Needed with Sending Attachments in HR Case Notifications

Jay
Tera Expert

Hi Developers,

I have a requirement where, when an attachment is added to an HR case, a notification needs to be sent to the user who opened the case. The notification should include the actual attachment, not just a link.

To implement this, I created an after-insert business rule on the attachment table, which triggers an event to send the email. Additionally, I created an after-insert business rule on the sys_email table to ensure the actual attachment is included in the email.

This setup works fine, and the attachment is being sent as expected. However, an issue occurs when multiple attachments are added in the same pop-up window on the HR case (for example, using the Shift + Down Arrow shortcut). When attachments are added in this way, ServiceNow inserts them simultaneously, without any time difference. As a result, the business rule on the sys_email table is unable to correctly distinguish between the attachments, causing the same attachment to be sent in the notification.

Jay_0-1729503799981.png

Jay_1-1729504035943.pngJay_2-1729504070445.png

 

Can someone please help me resolve this issue or suggest an alternative workaround?

Thank You!
Jay

3 REPLIES 3

munisailaks
Tera Contributor

Hi Jay,

 

Looking for some help in workday spoke integration. Can you please help.

 

Thanks,

Lakshmi

@munisailaks  what exactly the help is needed, you can create a new question so it can be answered as part of that.

VaranAwesomenow
Mega Sage

There are events that get fired when attachment is added following are the events you can see the details of actual event names here Administering attachments

Once event is triggered you can try one of the options

1.Write a script action that can invoke a subflow which can notify with attachment

2. Create a notification as response to event with a notification script that can attach the file.