How to send files from ServiceNow sys_attachment to an external API
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-12-2025 06:06 AM
Hi everyone,
I want to send files stored in the sys_attachment table in ServiceNow to an external API that accepts file uploads (tested successfully using Postman as multipart/form-data).
I’m looking for guidance or sample code on:
Retrieving the file content from sys_attachment
Creating a multipart/form-data request using RESTMessageV2 or any alternative
Handling headers and file content correctly in the request
Has anyone done this or can share a working approach?
Thanks in advance for your help!
Logappradeep
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-12-2025 06:13 AM
check these links
Multipart/form-data attachment pusg using Rest API from Snow->Jira
Outbound REST - Multipart/form-data
REST API attachments Transfer to JIRA
If my response helped please mark it correct and close the thread so that it benefits future readers.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-12-2025 08:52 AM
I'll confirm and get back to you.
Logappradeep
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-15-2025 07:39 PM
Hope you are doing good.
Did my reply answer your question?
If my response helped please mark it correct and close the thread so that it benefits future readers.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader