Contact Free trial Login

Example: To Get Records from a ServiceNow Incident Table

This example creates a Mule flow to get records from the Incident table.

  1. Create a Mule application as a project in Design Center or Studio 7.

  2. Add and configure HTTP Listener trigger for your flow with this Path:

    getrecords

    You can use the default ServiceNow configuration for the Listener connection.

  3. [Optional] To test your ServiceNow environment credentials to the ServiceNow server, configure a new HTTP Request component with BASIC Auth.

  4. Add a Transform component after the HTTP connector, and provide a transformation script something like this:

    output application/json
    ---
    ['description': 'Get Records Demo']

    Notice that the script transforms the output to JSON from the XML input.

  5. Add the Invoke operation from the ServiceNow connector after the Transform component.

    • Set up, test, and save a ServiceNow configuration for the connection to the ServiceNow server.

      If the connection is unsuccessful, you should correct any invalid connection parameters, and test again.

    • In the General side-tab, set Service to incident and Operation to getRecords.

      servicenow-getRecords-config
  6. Add a Logger to the end of your flow that takes a payload (or #[payload]) as the message.

  7. Deploy or Run your app.

  8. To test the app, navigate to http://localhost:8081/incident/getrecords

We use cookies to make interactions with our websites and services easy and meaningful, to better understand how they are used and to tailor advertising. You can read more and make your cookie choices here. By continuing to use this site you are giving us your consent to do this.