How to upload a document in Servicenow
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-07-2020 08:27 AM
Hi,
I have a document which i want to save in attachment table. Just like how we can upload images to image table can we upload the documents in servicneow ?
- Labels:
-
Analytics and Reports

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-08-2020 01:11 AM
Hi Irfan,
Is there any specific need to do it via script as the record when inserted in sys_attachment table need to have table_sys_id(Record where it is to be used/attached).
What is the purpose of getting it uploaded via script in sys_attachment table? Would you mind elaborating a bit about it?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-07-2020 08:45 AM
Will need to use a script to upload a file directly to sys_attachment table.
There's a sample code in the thread below. You'll need to base64Encode() binary files.
Another way to add an attachment is by accepting inbound email with attachment.
Flow Designer has a step to copy attachment too.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-08-2020 02:29 AM
Hi Irfan,
Check this similar thread, it might help you
If my answer helped you in any way, mark answer as helpful and correct.
Thanks and regards,
Megha