cancel
Showing results for 
Search instead for 
Did you mean: 

Service Now Integration thro REST API

DevarajanKannan
Level 2
Hi,

Can you please guide how we can download all attached files in defined folder while reading incident information by using ServiceNow Incident Management API::Retrieve Incidents

Thanks and Regards,
Devarajan Kannan

------------------------------
Devarajan Kannan
------------------------------
10 REPLIES 10

lookman
Staff
Staff
Hi Devarajan.

There are several output data items associated with the skill. On the Outputs tab, there is a field called Response Content. You want to store this into a text data item. Once you've successfully completed the step, you should use the Utility - JSON to Collection VBO to extract all of the values from the Response Content text data item into a collection from which you can now spin through and pick out all of the incidents.

13067.png

13068.png
Here is the input tab of the JSON to Collection action
13069.png

Here is the output tab of the JSON to Collection action

13070.png

Hopefully this gets you going.

jack


------------------------------
Jack Look
Sr Product Consultant
Blue Prism
------------------------------

Hi Jack,

13072.png

i am trying to download files which are attached in "INC0010005". kindly share some more inputs to download attachment files by using SNOW API.

13073.png


As you suggested, i am able to extract JASON response content by using  API method "Reterive Incidents by SysID" . Jason response content also attached your reference.


------------------------------
Devarajan Kannan
------------------------------

Hi Devarajan.

Sorry about the delay in responding. There is a separate API that ServiceNow uses to access attachments. In other words, the ServiceNow Table API on which the skill is based, does not support retrieval of attachments. You would have to use the ServiceNow Attachment API to do that.

We currently do not have a skill created for the Attachment API but I will be looking into it to see how quickly I can get it created and published.

jack


------------------------------
Jack Look
Sr Product Consultant
Blue Prism
------------------------------

One more thing Devarajan.

You can create a web service API within Blue Prism to access the ServiceNow Attachment API yourself. You do not have to wait for a skill to be created (or you can create the skill yourself and submit it to the Digital Exchange 🙂 ).


------------------------------
Jack Look
Sr Product Consultant
Blue Prism
------------------------------

Hi Devarajan.

Have you made any progress? I've started working on the skill for this but was wondering how you are doing.

jack


------------------------------
Jack Look
Sr Product Consultant
Blue Prism
------------------------------

Hi Jack,

I know it's been awhile but I wanted to follow up regarding this post. I was able to pull in JSON information about the attachments in ServiceNow from BluePrism. Have you been able to get it to actually download the file and save it? I tried grabbing the download link from that JSON info and then using the download file utility but it requires authentication to download so that didn't work. 

Thanks!
Peter

------------------------------
Peter Bayiokos
------------------------------

Hi Peter.

I've made some progress but it has been slow going as I'm working on several projects and this keeps getting put on the back burner.

Using the SNOW attachment API I was able to get a text file to download but the problem is with everything else. It appears the issue is that in the current release of BluePrism, the result in the Web Service API is a text data item. This cannot be modified although I'm told that we will be able choose the data type at some point in a future release.

Anyway, SNOW is returning a binary file which BP is converting into a text field. We have no control over this. Then when you try to convert it back into a binary data type inside the process/object, the file gets corrupted.

I think that we could use the code stage from the HTTP VBO and modify it, but I have not had a chance to work on it. Actually, I'm not a C# guy so I need some help.  Maybe from you?

So Peter, that is where we are.

Care to colloborate?

jack

------------------------------
Jack Look
Sr Product Consultant
Blue Prism
------------------------------

Hi Jack,

It looks like BluePrism resolved this issue. The new HTTP VBO has a Retrieve file option that downloads a file from the SNOW api similar to cURL command. 

Thanks,
Peter

------------------------------
Peter Bayiokos
------------------------------

Hi Peter.

I'm glad it was resolved.

jack

------------------------------
Jack Look
Sr Product Consultant
Blue Prism
------------------------------