How to auto-attach file from another system as a url parameter?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-11-2023 05:27 PM - edited 10-11-2023 05:28 PM
Hello everyone!
I've a relatively complex coding question that I'm hoping someone might have some insight on.
We're setting up an integration between ServiceNow and Epic Hyperspace using the SN Store application "EMR Help". We've gotten the auto-login setup so Epic Users don't need to log in again to ServiceNow after being directed there to open a ticket; after they're automatically logged in to their account in ServiceNow (based on who they were logged in as in Epic), they're routed to a record producer so that they can then create an incident on our Service Portal.
We're now hoping to be able to auto-attach screen shots taken in Epic onto the Service Portal record producer. Ideally, this would look the same as if someone had attached something with the paperclip icon in the record producer; I would like the attachment to be visibly added to the record producer form by the integration BEFORE the record is submitted.
I have a few thoughts on how this could probably be done, but I was hoping someone had already gotten something similar set up and could let me know how you'd ended up doing it.
My first thought was to do it this way:
1)Epic to SN autoSSO
2)Epic POST -> SN (Create attachment)
3)SN -> Epic (Response w/ attachment sys_id)
4)Epic GET -> SN Service Portal w/ URL params containing sys_id of attachment and cat_item
5) Client script on the cat_item to pull the already existing attachment sys_id and add show it as a currently attached file on this cat_item
Any thoughts, suggestions, ideas? Have you done this before? Is there code that does portions of this that have examples on the forums anywhere? I think it's very likely that the files being passed would be larger than could reasonably be included in the URL.
Much appreciated.
-R
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-25-2025 02:31 PM
Did you ever get this working? We are implementing something similar with EMR help and would love to know how you ended up doing it.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-22-2025 09:12 AM
I also just wanted to follow up and see if you got this working. We'd like to do the same.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
We ended up that the Epic team handled this issue. They saved all screenshots in epic for a certain amount of time, and polled ServiceNow regularly - every couple of minutes - to see if a ticket was submitted from an epic auto-login account. If so, it finds the ticket associated to that user and attaches the appropriate screenshots via a post rest request.
