ServiceNow Email Notification via Outbound REST Calls

Summary:

This article describes the step-by-step process of How to Configure "ServiceNow Email Notification via Outbound REST Calls".

Prerequisites:

  • The user needs to have a working ServiceNow tenant.
  • Working webMethods.io integration cloud tenant.

Contents:

  • How to configure the “ServiceNow Email Notification via Outbound REST Calls” on insert or update of any “incident” in ServiceNow via webMethods.io connector. Here we will make use of webMethods.io webhooks.
Note:
Any coding or configuration examples provided in this document are only examples and are not intended for use in a production system without verification. The example is only done here to better explain and visualize the possibilities.

Steps:

    1. Login to the webMethods.io tenant & Let's make a simple workflow integration of ServiceNow.

    2. Drag & drop the ServiceNow app from the app menu. Repeat the steps similarly as we did in Step 10 & step 11 of the link: http://techcommunity.softwareag.com/pwiki/-/wiki/Main/ServiceNow%20Email%20Notification. for this example I will choose the action “listProblems” (user can make any integration based on his business use-case.)

    3. Setup the webhook for this integration, click on the “settings” button of the flow starter.

    4. Now click on the “webhook” option from the triggers part.

    5. Users will get a “webhook URL”. This URL is used to invoke this integration via any client & also for various purposes. Copy of this webhook URL, as we are going to use this URL in the ServiceNow business rule. The user has the option to enable the Authentication for this webhook URL. After copying click on the Next button.

    6. The next step will provide the option to add “Headers”, “Body” & “Query” for the webhook. Users can make use of these based on their needs. Then click the “Next” button & finish the setup.

    7. Once the setup is done. It will look like below.

    8. Now go to the “ServiceNow” instance and in the search bar search for the “Rest Message”. Now click on the REST Message option present Under the System Web Services, inside the “Outbound”. Then click on the “New” button to make a new REST Message.

    9. Now give the “Name” for this message & inside the “Endpoint” box provide the “webhook URL” that we had created inside the webMethods.io. Users can have the option to configure the “Authentication ” as well, As we haven’t set any Authentication for the webhook URL, so we don’t need this. Similarly, the user can set up the “HTTP Headers” based on the needs. Now click on the “save” button.

    10. Once you save, REST Message is created. Now click on your REST Message, & scroll down.

    11. Users will find a “Default GET” option under the “HTTP Methods”. Click on this option & under this page, change the HTTP Methods  “POST” from the drop-down menu & click save.

        Now, after saving this setting, scroll down on this same page & click on the “test” button. As service Now provide the option to test this function here itself to check for any error.

    12. Now, Users can configure the Business rule to trigger this webhook enabled REST Message Outbound call. To create the business rule, please follow the link: http://techcommunity.softwareag.com/pwiki/-/wiki/Main/ServiceNow%20Email%20Notification%20via%20Event. Step6.

    13. In the Business rule, Under the “Advanced” option, write the “script code” to invoke the webhook enabled REST Message Outbound call & click on the “Save” button.

        Now, This business rule will get invoked as soon as a new incident is created in service now, and it will intern make an outbound REST Call, that will invoke webMethods.io integration webhook URL also, it will notify the respective stakeholders too.

    14. Now, create a new incident via webMethods.io ServiceNow connector, as we did in the above steps:- 11,12 & 13 of SAMPLE I. So, As soon as the new incident is created, Out Integration will be started executing automatically.