Create new record with attachment from external system - API
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
yesterday
Hi All,
I have below requirement.
EXTERNAL SYSTEM (Sends Individual PDF files)
|
ServiceNow, Submits a catalog item with PDF attached
|
After completion of RITM, txt file send back to external system
I need help in
step 1: EXTERNAL SYSTEM (Sends Individual PDF files)
step 2: ServiceNow, Submits a catalog item with PDF attached
#developer
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
yesterday
Hey there
You basically need a simple flow: first, let the external system send the PDF into ServiceNow either via a REST API (best option) or email (easiest), where you receive and store the file (ideally in a staging record); then, once the file is received, trigger a script or Flow Designer to automatically create a catalog request (RITM) and attach that same PDF to it using GlideSysAttachment—so in short, receive the file → store it → create RITM → attach the file.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
yesterday
Hi @Dhathri
Option1 :
a. Create the Record: Use the Table API to create your record (e.g., Incident, Case).
Endpoint: POST /api/now/table/{tableName}
Action: Capture the sys_id of the newly created record from the response body.
b. Upload the Attachment: Use the Attachment API to link the file to that sys_id.
Endpoint: POST /api/now/attachment/file?table_name={tableName}&table_sys_id={sys_id}&file_name={name}
Body: Send the raw binary data of the file.
Header: Set Content-Type to the file's MIME type (e.g., image/png).
Refer: Create Atachment in ServiceNow Using Attachment API and OAuth Authorization
Effortlessly Attach API Responses File to Record: Use saveResponseBodyAsAttachment()
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
yesterday
Approach
1) create scripted REST API and share endpoint and credentials etc to 3rd party
Ask them to send details for your catalog item variables, along with the PDF file details (file name, base64Encoded data etc)
2) then use CartJS API to submit the catalog item
sharing below link for your help
Sending attachments using custom scripted web service
I shared solution here few years ago, check that and enhance
💡 If my response helped, please mark it as correct ✅ and close the thread 🔒— this helps future readers find the solution faster! 🙏
Ankur
✨ Certified Technical Architect || ✨ 10x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
yesterday
@Ankur Bawiskar , User will be sending only pdf document to servicenow, My requirement is to attach the document to the catalog item and submit the order.
