How to transfer a CSV file attached to a service catalog to a MID server?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-18-2023 02:53 AM
Hello Developers,
The user creates an application form as a CSV file and attaches it to the service catalog.
The MID server automatically kicks a script based on the contents of the CSV file, and the script kicks the process of updating table records on the business server.
In our environment, for implementations that do not use CSV files, we create an ECC queue with the contents of the service catalog as arguments to communicate with the MID server.
However, the problem here is that files attached to the ECC queue are not transferred to the MID server.
At this time I would like to know how to pass a CSV file from SNOW to the MID server by each request from users.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-02-2023 12:49 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-02-2023 05:17 PM
Thank you for your information.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-02-2023 05:18 PM
I have confirmed the feasibility of the following methods by Attachment API.
Attachment API | ServiceNow Developers
- Getting sys_id of request item by Flow designer.
- Flow designer creates ECC queue that to run the script file that getting attachment file list by Attachment API on Mid server. API is like below.
https://<tenant>.service-now.com/api/now/attachment?table_sys_id=<sys_id>
*<sys_id> is got on 1. - The script parses the result of the attachment API to identify the sys_id of the attachment.
- The script file continues, accessing the Attachment API with the curl command based on the sys_id of the attachment and retrieving the attachment.
https://<tenant>.service-now.com/api/now/attachment/<sys_id>/file
*<sys_id> is got on 3.