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
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)
Configure the service now connection as Basic Authentication
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
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.