How can we automatically send an email notification to the user with a PDF attached.

Ria
Tera Contributor

Hello everyone,

 

How can we automatically send an email notification to the user with a PDF attached once their request is fully approved?

6 REPLIES 6

Chaitanya naram
Kilo Sage

Hi @Ria ,

 

1) Create a business rule on the request triggers when it is approved. and in the script section, attach the fixed pdf to the request record and trigger the notification using gs.eventQueue('event_name',current,current.opened_for,'');

2) Create a notification on request table (requested item) table defining reccipients and body of email. Make sure Attachments box is checked.

3) Create a event in event registry.

 

Thanks & Regards | Chiranjeevi Chaitanya Naram
Kindly mark the answer Correct and Helpful if it helps to resolve your issue.

Hi Chaitanya,

 

Could you please provide the script to add in business rules for sending an email notification with a PDF attached after approval and also provide the event registry in details?

 

Regards,

Riya Jain

@Ria ,

 

Add that pdf to the notification.

 

And add this script in business rule

var copyAtt = new GlideSysAttachment();

 

copyAtt.copy('sysevent_email_action',<sys id of notification>, 'sc_req_item',current.sys_id);

gs.eventQueue('<event name>',current,'','');

 

 

Create notification on requested item table triggers when event is fired. And recipeints is requested for the RITM. (change as per your requirements)

 

Type event registry in application navigator and create an event over there which will be used in the notifications and business rules.

Thanks & Regards | Chiranjeevi Chaitanya Naram
Kindly mark the answer Correct and Helpful if it helps to resolve your issue.

Hi Chaitanya,

 

Currently, all attachments are sent to the user via email. Our requirement is to send only the specific PDF requested by the user.

 

Regards,

Riya Jain