How to read attachment from external system regularly?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-28-2023 09:37 AM - edited 07-31-2023 11:18 PM
Hi,
There is a third party external ITSM tool used for incident management. Whenever they add any Attachments to any of the Incident records, we need to read that from ServiceNow.
That external tool will not/cannot make any calls/send any ACK's. Completely ZERO outbound calls from it.
From ServiceNow only we need to keep querying that tool say every minute or every 5 minutes and if we see any attachments, we need to read that and add those attachments to the respective incident records in ServiceNow.
What is the right way to do this?
Note - External tool WILL NOT push the attachments. COMLETELY ZERO outbound calls from that tool. EVERYTHING should be managed by ServiceNow only.
PS - This is in continuation to my previous question on this - What is the best method to READ incident data from... - ServiceNow Community
- Labels:
-
Architect
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-28-2023 05:34 PM
Hi, does your third party send you any sort of API update when an attachment is added to a task at their end, eg comment update?
When you state you need to read everything; what is your definition of read, query and pull back the file into sys_attachment table relating it to the relevant task, open the file separately in a browser, or somehow parse the file at source?
You could configure a scheduled job to query the source instance on a 5 minute cycle, looking for attachment updates made in the last 5 minutes and then process these as required, or if you receive a task update every time an attachment is added use this as a trigger to retrieve the specific attachment(s).
But exactly what and how is entirely dependent on specific requirements, process and the third party platforms API capabilities.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-29-2023 12:20 AM
Hi @Tony Chatfield1 I have updated my question with more clarity/details. Thank you..
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-29-2023 09:42 PM
Hi, if your source platform does not have the ability to respond to REST, SOAP or a custom API, then there is no way you can easily query it for data. If you have a data retrieval process\solution, then I would think scheduled jobs to retrieve data updated within the last x minutes would be the best solution, as there is no value in retrieving the same data over and over by querying for all data over and over.
Ultimately, the entire solution is 100% dependent on what the source platform will responded too?
and scheduling a periodic query from your SNC instance should not be difficult or complicated.
- although this will depend on how the source stores it's data and the data and format supplied in its payloads.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-31-2023 12:22 AM
Hi @Tony Chatfield1 , Thanks for replying.
For reading the incident/problem/change data, I am using GET method, loading the data into Import set table and transforming into respective Target tables. This I am doing using scheduled job and reading it every 10 minutes.
But I am stuck in doing the same for attachments, like how do I READ those attachments, how to store/pass it to ServiceNow attachment API / what exactly i need to do 🙂