How to send a PDF documents in an email notification

Saridha_L1
Tera Expert

Hi Team, 

Can anyone help me on this, I have followed this document 'Sending Documents in an Email Notification', I could not see the attachment in notification.

Please help.

Regards,

Saridha.L

 
1 ACCEPTED SOLUTION

Shishir Srivast
Mega Sage

I am not sure on PDF but if you want to send the link of knowledge base (that may have instruction) in an email then you can use the email script to form the link for that knowledge base in email. something like below in your email script should help.

 

template.print('<a href="' + gs.getProperty("glide.servlet.uri") + "" + 'nav_to.do?uri=kb_view.do?sys_kb_id=PASS THE SYS_ID HERE' + '">' + 'Installation guide' + '</a>');

View solution in original post

8 REPLIES 8

SanjivMeher
Kilo Patron
Kilo Patron

Can you explain the complete use case?


Please mark this response as correct or helpful if it assisted you with your question.

Hi Sanjiv,

Thank you for your response.

Once the RITM is approved,an installation guide (its a pdf doc)needs to send to the requester. So that they can read the doc and follow the instructions to install a software.

 

For that I have followed "https://community.servicenow.com/community?id=community_blog&sys_id=651deea5dbd0dbc01dcaf3231f96196e" in my case its not showing the doc in sent  notification.

 

Regards,

Saridha.L

Bhawana Upreti
Tera Guru

Hello,

I have sent the PDf file through notification but in my case that particular record contains the pdf as an attachment. For example, I have a record of Incident table and notification of this record will trigger when the record is inserted and updated and the record includes the attachment and for the same below is criteria of notification.

Notification criteria:-

When to send- Record inserted or updated

Who will receive- to whom you want to send(Any specific users or groups)

What it will contain- There is a field called "Include Attachments" you should mark it true. and whatever be the subject or body will be.

Let me know if you have any question.

Thanks.

Thank you Bhawana,

 

I have tried this, getting notification with no attachment.

 I have followed:

1.Created a notification.

2.In wf I have written a Runscript to trigger notification.

Run script code:

(function() {
var gr = new GlideRecord("kb_knowledge");
gr.addEncodedQuery("workflow_state=published^short_description=Testing documents");
gr.query();
if (gr.next()) {

}

 

Is this correct, please guide me.

 

Regards,

Saridha.L