Send notification to assignment group when user uploads attachment in requested item table

Nisha Kumari2
Tera Contributor

Once a user attaches an attachment in requested item table I would like to send an email notification to the assignment_group and assigned_to user informing them that photo has been uploaded.

 

Please advice.

6 REPLIES 6

Jaspal Singh
Mega Patron
Mega Patron

Hi Nisha,

Check for thread that has a solution. Would need minor tweaks to get it worked for your use case.

Danish Bhairag2
Tera Sage
Tera Sage

Hi @Nisha Kumari2 ,

 

So the mail should go to the Task ticket assignment group & assigned to which are mapped to RITM ticket ?

 

if yes then u can create a After insert BR on attachment table which will trigger once attachment is added on RITM table.(Condition for BR should be table name is sc_req_item).

In the advanced section of the BR u can write below script to fetch the assignment group & assigned to value.

var gr = new GlideRecord('sc_task');
gr.addQuery('request_item',table_sys_id);
gr.query();
while(gr.next()){
    gs.eventQueue('notification_to_group',gr,gr.assignment_group,gr.assigned_to);
}

 

Note: You need to create an event as well as notification for that event & keep ready.

 

In you notification when to send tab, you need to trigger that when event is fired & select the above event name which u will be providing in the BR, in the whom to send u need to select send to event parm1 contains recipient 1 & event parm2 (which will contain the assignment group & assigned to value).

Add the appropriate thing in the email body.

 

Thanks,

Danish

 

Nisha Kumari2
Tera Contributor

Thank you for replying. Can this requirement be fulfilled with flow designer? Please let me know.

 

Hi @Nisha Kumari2 ,

 

Yes it can be achieved via flow designer as well. Create a new action in ur flow , in that action add script step (custom script) & use the above code in my response. That will also work.

 

Thanks,

Danish