Add multiple targets to one email notification

Hai Nam Tran1
Kilo Contributor

Hi,

 

I have a email notification which is triggered by event. In this notification I post a list of specific Change records of an person in the body.

Now I want this Notification to be posted in Activities tab of each Change records in the list. How can I get it done? The Notification is not record specific.

1 ACCEPTED SOLUTION

Anil Lande
Kilo Patron

Hi,

This is not possible and you need to trigger separate email for each change then only it will appear in all change request.

There is possibility of duplicating emails which are sent by writing BR on sys_email table but that is not recommended way. 

Please try to convivence client to accept OOB functionality. If not agreeing then share how can we identify sent email so that it will be available in all related change requested.

 

Thanks,
Anil Lande 

Please appreciate the efforts of community contributors by marking appropriate response as correct answer and helpful, this may help other community users to follow correct solution in future.
Thanks
Anil Lande

View solution in original post

5 REPLIES 5

Anil Lande
Kilo Patron

Hi,

This is not possible and you need to trigger separate email for each change then only it will appear in all change request.

There is possibility of duplicating emails which are sent by writing BR on sys_email table but that is not recommended way. 

Please try to convivence client to accept OOB functionality. If not agreeing then share how can we identify sent email so that it will be available in all related change requested.

 

Thanks,
Anil Lande 

Please appreciate the efforts of community contributors by marking appropriate response as correct answer and helpful, this may help other community users to follow correct solution in future.
Thanks
Anil Lande

This is not possible and you need to trigger separate email for each change then only it will appear in all change request.

User can be spammed by notifications if they have 10 Change records.

 

There is possibility of duplicating emails which are sent by writing BR on sys_email table but that is not recommended way. 

Do you mean that only the sent notification should be duplicated, so that only one notification will be sent to the user? What do I have to do next to post this notification in activity log of all change records? Do I have to manipulate the target field in each duplicated notification?

Hi,

Do I have to manipulate the target field in each duplicated notification?

Yes you need to duplicate records in sys_email table after it is processed/sent. And update  the target on duplicated record through scripting logic. This way user will not be spammed by receiving duplicated emails as your are creating duplicate email in ServiceNow in sent state.

 

Thanks,
Anil Lande

Please appreciate the efforts of community contributors by marking appropriate response as correct answer and helpful, this may help other community users to follow correct solution in future.
Thanks
Anil Lande

Hi,

Be careful while writing BR and add proper When to Run condition as well as check condition in your script so that it will only run for particular email notification and not for all notifications.

find_real_file.png

 

The condition for Headers is "Headers contains <sys_id of notification record from sysevent_email_action table>"

 

 

Thanks,

Anil Lande

Please appreciate the efforts of community contributors by marking appropriate response as correct answer and helpful, this may help other community users to follow correct solution in future.
Thanks
Anil Lande