- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-15-2022 10:29 PM
Hello!
I have a Flow Designer Action where there is a GET request to a third party application and the response is a URL link to a CSV file (link that if I were to copy-paste it to my browser and hit enter, it would download the CSV file to my own computer).
Is there a way in ServiceNow to get the file behind the link that comes with the response body and save that as an attachment to a particular record? I have tried the "Save as attachment" in the REST step Action but it only saves the response (i.e. the URL itself, not the file).
Any help or ideas would be very much appreciated!
Solved! Go to Solution.
- Labels:
-
Integrations
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-15-2022 10:50 PM
Hi
for saving a file provided by a URL you have to initiate another REST message call. That way, you also can use the REST step in Flow Designer.
Or for a scripted approach have a look at the following API method: https://developer.servicenow.com/dev.do#!/reference/api/sandiego/server/sn_ws-namespace/c_RESTMessag...
Kind regards
Maik
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-15-2022 10:50 PM
Hi
for saving a file provided by a URL you have to initiate another REST message call. That way, you also can use the REST step in Flow Designer.
Or for a scripted approach have a look at the following API method: https://developer.servicenow.com/dev.do#!/reference/api/sandiego/server/sn_ws-namespace/c_RESTMessag...
Kind regards
Maik
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-16-2022 03:12 AM
Thanks
All that was needed was indeed an another REST call to the URL that comes with the first REST Response. All little bit of regex to remove double quotes in between and now it works wonderfully.
Thanks again!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-16-2022 03:23 AM
Thanks for the feedback and glad to help!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-21-2023 08:48 AM
could you please suggest me , i have an url field which contains url of the downloadable file and almost 700 records are there so how i can automate that to attach the file in every records