Overview

ServiceNow Integration allows you to:

  • Automatically create an incident in ServiceNow upon creation of Rootly incident.
  • Automatically update an existing incident in ServiceNow upon updates on Rootly incident.
  • Automatically create incident in Rootly upon creation of ServiceNow incident.
  • Automatically update an existing incident in Rootly upon updates on ServiceNow incident.
  • Automatically page on-call user upon creation of ServiceNow incident.

Establish Write-Access to ServiceNow

Rootly integrates to ServiceNow via OAuth - enabling Rootly to create and update the INC table in ServiceNow.

It is recommended that you perform this integration using a service account to ensure uninterrupted connection, should the integrating user leave the company.

Log into your Rootly org as an Admin user and navigate to Configurations > Integrations > ServiceNow.

CleanShot 2025-05-13 at 11.14.58.png

Click Setup to open configuration modal.

CleanShot 2025-05-13 at 11.16.39.png

Log into your ServiceNow instance as an Admin user and navigate to **System OAuth **>Application Registry .

CleanShot 2025-05-13 at 11.19.50.png

Click on New to initiate the creation of a new application.

CleanShot 2025-05-13 at 11.23.06.png

Select the Create an OAuth API endpoint for external clients option.

CleanShot 2025-05-13 at 11.25.24.png

Copy and paste the following values to the corresponding fields in ServiceNow and then click on Submit.

ServiceNow FieldValue
NameRootly
Redirect URLhttps://rootly.com/auth/service_now/callback

CleanShot 2025-05-13 at 11.31.13.png

Locate and open the new application you just created in ServiceNow. You might have to search for it by Name if you have a lot of applications already.

CleanShot 2025-05-13 at 11.32.59.png

Copy following fields from ServiceNow.

CleanShot 2025-05-13 at 11.35.47.png

When copying the Client Secret, you might have to unmask (click on the lock icon) it and perform a manual drag > right click > Copy. Sometimes masked values do not copy correctly in ServiceNow.

CleanShot 2025-05-13 at 11.41.14.png

Paste the copied fields into your Rootly setup modal and click on Connect.

CleanShot 2025-05-13 at 11.38.08.png

You’ll be presented with a ServiceNow screen to proceed with the integration. Click on Allow.

CleanShot 2025-05-13 at 11.43.07.png

If integration is successful, you’ll be presented with this screen on Rootly.

CleanShot 2025-05-13 at 11.44.25.png

You can click on Save and you are all set! Your ServiceNow card should appear with a Connected indicator when you’re on the Integrations page.

CleanShot 2025-05-13 at 11.46.18.png

Establish Ability to Receive ServiceNow Events

Webhooks are set up in ServiceNow to send incident events to Rootly. Rootly is then able to process these events to facilitate automated actions.

Navigate to your ServiceNow instance and go to **System Definition **>Business Rules .

There are multiple Business Rules pages. Make sure you select the one under System Definition.

CleanShot 2025-05-13 at 11.57.09.png

Click on New to initiate the creation a new business rule.

CleanShot 2025-05-13 at 12.00.18.png

Fill in the following fields.

ServiceNow FieldValue
NameGive it any descriptive name you’d like.
TableSelect Incident [incident].
AdvancedEnsure this is checked.
WhenSelect After.
InsertCheck this if you want to receive an event after an incident is created in ServiceNow.
UpdateCheck this if you want to receive an event after an incident is updated in ServiceNow.
DeleteCheck this if you want to receive an event after an incident is deleted in ServiceNow.

Navigate to the Advanced tab.

CleanShot 2025-05-13 at 12.08.46.png

Replace content in the Script editor with the following code.

(function executeRule(current, previous /*null when async*/ ) {
    try {
        var r = new sn_ws.RESTMessageV2();
        r.setEndpoint("<insert webhook public URL>");
        r.setHttpMethod("post");
        r.setRequestHeader("secret", "<secret>");

        // getValue(string) does not support dot walking, 
        // so I had to do a bit more to get the user’s email address
        var usr = new GlideRecord('sys_user');
        usr.get('sys_id', current.getValue("caller_id"));
        var reported_by_email = usr.getValue('email');

        // Make sure to convert object references to values.
        // More info at: 
        // https://swissbytes.blogspot.com/2017/11/service-now-script-includes-make-sure.html

        var number = current.getValue("number");		
        var opened_at = current.getValue("opened_at");
        var impact = current.getValue("impact");
        var urgency = current.getValue("urgency");
        var short_description = current.getValue("short_description");
        var description = current.getValue("description");
        var category = current.getValue("category");
        var priority = current.getValue("priority");
        var sys_id = current.getValue("sys_id");
        var subcategory = current.getValue("subcategory");
        var state = current.getValue("state");

        var obj = {
            "number": number,
            "reported_by_email": reported_by_email,
            "opened_at": opened_at,
            "impact": impact,
            "urgency": urgency,
            "short_description": short_description,
            "description": description,
            "category": category,
            "priority": priority,
            "sys_id": sys_id,
            "subcategory": subcategory,
            "state": state
        };
        
        var body = JSON.stringify(obj);
        gs.info("Webhook body: " + body);
        r.setRequestBody(body);

        var response = r.execute();
        var httpStatus = response.getStatusCode();
    } catch (ex) {
        var message = ex.message;
        gs.error("Error message: " + message);
    }

    gs.info("Webhook target HTTP status response: " + httpStatus);

})(current, previous);

Replace <insert webhook public URL> and <secret> placeholder texts with actual values from Rootly’s ServiceNow integration page.

CleanShot 2025-05-13 at 12.13.02.png

Click Submit. Now you’re ready to receive ServiceNow events in Rootly!

CleanShot 2025-05-13 at 12.15.45.png

Uninstall

You can uninstall this integration by navigating to Configuration > Integrations > **ServiceNow **>Delete.

CleanShot 2025-05-13 at 12.17.17.png

Using ServiceNow as an Alert Source

If your org is using Rootly On-Call, ServiceNow can also be set up as an alert source. This allows your on-call user to be paged whenever a ServiceNow ticket is created.

You Rootly org must have Rootly On-Call enabled order to perform this setup.

Support

If you need help or more information about this integration, please contact support@rootly.com.