Retrieve ServiceNow Incident Details

using ServiceNow Connector

 

In this tutorial we will demonstrate how can we Retrieve ServiceNow Incident Details using ServiceNow Connector in Mule 4

Prerequisite: You should have access to servicenow instance and access to anypoint platform

TestData:

Create a sample incident in servicenow

RETRIEVE SERVICENOW INCIDENT DETAILS USING SERVICENOW CONNECTOR

 

Create project in anypoint studio and configure the listener

Drag and drop servicenow invoke operation from mule palette(if invoke operation is not available in mule palette please add module using exchange more information)

RETRIEVE SERVICENOW INCIDENT DETAILS USING SERVICENOW CONNECTOR

 

Configure the service now connection as Basic Authentication

RETRIEVE SERVICENOW INCIDENT DETAILS USING SERVICENOW CONNECTOR

 

In Transport Tab

 

Create the transform message to sent the payload to servicenow instance

%dw 2.0
output application/xml
ns ns0 http://www.service-now.com/incident
---
{
    ns0#getRecords: {
        ns0#number: "INC0010111"
    }
}

 

Configure the invoke operation

Provide the service and operation values

 

Transform the payload to JSON

%dw 2.0
output application/json
---
Payload

 

Deploy the project and trigger the request from postman

 

Sample application: servicenow sample application

  
Thank you for taking out time to read the above post. Hope you found it useful. In case of any questions, feel free to comment below. Also, if you are keen on knowing about a specific topic, happy to explore your recommendations as well.
 
For any latest updates or posts on our website, you can follow us on LinkedIn. Look forward to connecting with you there.


Share this:
Subscribe
Notify of
guest
1 Comment
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
A Surya
A Surya
2 years ago

How to write query in on new update record connector in service now
Query is used for filtering records based on the specific condition.
My requirement:
All the new tasks which contains short_description = ‘xyz’ need to consume those records only
Plz help on this.