Where to store a common PDF filein ServiceNow?

Lihini
Tera Contributor

Hi Community,

 

I have a scenario where I need to send an email with an attachment from ServiceNow. The attachment is a common PDF file, such as a shipping instruction document, which is the same for all recipients.

Before sending it as an attachment in the email notification, I want to store this PDF in ServiceNow. Later, I will use an email notification to attach this file and send it out.

 

My questions are:

  1. What is the best table in ServiceNow to store a reusable file (like a shipping instruction PDF)?
  2. Are there any best practices or things to consider for this kind of use case?

Any help, example scripts, or references to documentation would be greatly appreciated!

Thanks in advance!

Lihini Dissanayake
7 REPLIES 7

mohdarbaz
Kilo Guru

Hi @Lihini ,

you can use sys_attachment table. This table is designed to store attachments and can be used to manage files that need to be reused across different records and notifications.

 

Regards,

Mohd Arbaz.

 

Gaurav Rathaur
Kilo Guru

Hi @Lihini , 

 

You can follow these links to get your answer -

 

Link 1 - How do I attach a document to an email notification?

Link2 - Sending Documents in an Email Notification

 

If my response was helpful, please mark it as the correct answer and close the thread. This will help others who come across the same issue.

Thanks!
Gaurav Rathaur

 

Dushyant Siroh
Tera Expert

Hello @Lihini 

 

You can store reusable attachments in a custom record or a general-purpose table like sys_attachment or even you will create a custom table like u_attachment, upload the file here and retrieve with  file name or sys_id.

 

sys_attachment pros and cons :- 
Pros:

Simple and quick if only one or two documents are needed.

No need to create new tables or schema.

Cons:

Harder to manage due to many document its confused you sometimes.

Harder to Track the file.

Using a Custom Table (Best Practice)
Create a table like u_attachments with fields like:
Name
Description
Version
Active
Attach the file to each record.
 
Pros:
  • Clean structure: easily manage multiple reusable files.
  • Enables versioning .
  • Easy to Read.
Cons:
  • Require more setup effort to setup.
  • Requires ACL configuration if needed.

Please mark the answer as helpful and correct if helped. 

Kind Regards,

Dushyant Sirohi