cancel
Showing results for 
Search instead for 
Did you mean: 

Urgent: ServiceNow API integration with Blue prism

bhuvneshnigam
Level 3
Hi All, I want to retrieve all information stored in a TASK#####. I used ServiceNow Incident Management API from Blueprism DX website, but do not know what to enter in the Inputs. Also can anyone help me out how to update the worknotes for the TASK### and update it?

15446.png

15447.png

------------------------------
Bhuvnesh Nigam
Senior system engineer
IBM
Asia/Kolkata
------------------------------
13 REPLIES 13

AmiBarrett
Level 12
The Integration guide on the DX asset page should document what goes where as far as input and configuration goes. @Jack Look might be able to shed some more light on this though, in regards to tasks specifically!​

------------------------------
Ami Barrett
RPA Blue Prism SME
Karsun Solutions
Plano TX
------------------------------

Hi Bhuvnesh.

Did you look at the SNOW API doc? That has the most complete information. The documentation I created is taken from the SNOW's own doc.

jack


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

Hi Jack, would you be able to share the link for that SNOW API doc?

------------------------------
Onur Turel
------------------------------

Hi Onur.

Incident management is actually part of the Table API (Table API | ServiceNow Developers) which is used for many things beside Incidents. When I built the skill, I used the New York release and I see that the Table API documentation no longer contains the same information on Incidents that it once did.

Anyway, I suggest using the REST API Explorer in SNOW to help understand what parameters are available. Alternatively, you can use the skill's Retrieve Incidents action w/o any params and it will return all of the incidents so you can see what you've got.

Apropos to Bhuvnesh's question, he can use the Retrieve Incidents action and the task he cares about in the sysparm_query field like so:
15387.png
The action Retrieve Incidents by Sys_Id requires the actual system id of the task/incident.

jack



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

Hi Jack,

Thanks for the quick revert, I ll refer the guide.

Bhuvnesh

------------------------------
Bhuvnesh Nigam
Senior system engineer
IBM
Asia/Kolkata
------------------------------

Hi Jack,

I referred the guide and according to it updated the web service API in system tab of Blue prism with the URL of Service now - "https://######.service-now.com".

I pasted the same URL in the action below for ServiceNow instance and entered task number in sysparm_query(as shown below). But I get following error when I run the action stage.

I am new to this API integration with Blue prism, that is why struggling a bit. Can you help me out here please.
15392.png
15393.png

------------------------------
Bhuvnesh Nigam
Senior system engineer
IBM
Asia/Kolkata
------------------------------

Hi Bhuvnesh.

Okay, if you have updated the instance name in the service, you don't need to provide it in the action. My guess is that the error you're getting is that there is no defined input in SNOW REST API for ServiceNow Instance which is why you're getting this error about a name resolution failure.

Did you create a credential called "Servicenow Credential" and put in the appropriate userid/password? The skill was designed to use this credential and you'll need to grab those values from the credential manager before trying to access the API.

If you are doing this already, I suggest you simply run the API without any params. This will retrieve all of the incidents. You can then look through the json response and see how the tasks are identified.

Let me know if you need further clarification.

jack


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

Hi Jack,

Yes, I updated the credentials and it the action stage got executed successfully. Thanks.

However, the output I got is looks like an HTML code. I am not sure how to use this to my full advantage. I am not able to see any incidents in there. The "Response header" collection and "Response content" data item snaps are attached below.

As advised by you, I kept the service now instance input blank and by updating sysparm_query with task id or keeping it blank gives me the same below output.

I know the json vbo to transfer data to data items but I am not able to understand the output generated.

15402.png
Response content data item
15403.png


------------------------------
Bhuvnesh Nigam
Senior system engineer
IBM
Asia/Kolkata
------------------------------

Hi Bhuvnesh.

The response content is JSON. you'll need to use the Utility - JSON VBO - JSON to Collection action to put the info into a collection:
15409.png1. Retrieve all the incidents - the output is in the Response Content data item.
2. Use the Utility - JSON:JSON to Collection VBO - the input is the Response Content data item, the output is the collection Result.
3. The Result collection contains all of the information with field names and values.

The reason I suggested you ignore any parameters (for now) was so that you could get a result and see what kind of information is returned.

Task does not appear to be available in the incident table so you'll need to figure out another way to get the information.

As there does not appear to be an existing SNOW API for tasks, I used the REST API Explorer and found there is another table called incident_task. It looks like you'll need to use this table to grab the information you require. I suggest you experiment with the REST API Explorer in SNOW and get a feel for what is available. Once you have that, you can copy the Incident Management API that you imported and create another API but for incident_task.

I hope this works out.

jack


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