Skip to content

Connect ServiceNow🔗

When a support engineer clicks Ask Lightrun AI on an incident, ServiceNow sends the incident to Lightrun. Lightrun investigates, then posts the root cause and next step back on the incident as a comment.

The setup uses two keys, one for each direction:

Direction Purpose Key
ServiceNow → Lightrun Send the incident to Lightrun A Lightrun API key, stored in ServiceNow
Lightrun → ServiceNow Read the incident and post the result A ServiceNow REST API key, stored in Lightrun

Who does it: your ServiceNow admin and a Lightrun admin.

Prerequisites🔗

  • A ServiceNow instance you can test on first. A non-production instance is best.
  • A ServiceNow user with the admin role, to import the update set and create API keys.
  • The ServiceNow IntegrationHub plugin activated. The app sends incidents through an IntegrationHub REST step.
  • The app file lightrun-ai-servicenow-app.xml, which your Lightrun team sends you.
  • A Lightrun user who can create API keys and edit workflows.
  • HTTPS access between your instance and your Lightrun address in both directions. See Network requirements.

Walkthrough🔗

Click through the setup screen by screen, or follow the written steps below.

Step 1: Prepare Lightrun🔗

  1. In Lightrun, go to Workflow and open the workflow that should investigate incidents. Set its trigger to ServiceNow incident webhook and copy the Webhook URL.
  2. Go to Settings → API Keys → Create API key. Name it, for example ServiceNow app, and copy the key.

Warning

The API key is shown only once. Treat it like a password.

Step 2: Install the Lightrun AI app in ServiceNow🔗

  1. Activate IntegrationHub if it isn't on yet. The app uses it to send incidents to Lightrun.
  2. Create an integration user, for example svc_lightrun. It needs to read incidents in your in-scope assignment groups and add comments. It doesn't need anything else.
  3. Import the app. Go to All → System Update Sets → Retrieved Update Sets and click Import Update Set from XML. Upload lightrun-ai-servicenow-app.xml.
  4. Open the imported update set Lightrun AI and click Preview Update Set. Resolve any problems, then click Commit Update Set.
  5. Point the app at Lightrun. Go to App Engine → ServiceNow Studio, click the Apps icon and select Lightrun AI App. In the action's REST step, set:

    • Base URL: your Lightrun address, for example https://<company>.ai-platform.lightrun.com/
    • Resource path: the rest of the webhook URL from step 1.1, everything after the host. It starts with /api/ext/v1/servicenow/incident-webhook/.

    Click Save, then Publish.

  6. Add the Lightrun key. In Studio, open Connection & Credential Aliases → LIGHTRUN-AI. Under Credentials, click New → API Key Credentials, paste the Lightrun API key from step 1.2 and click Submit.

  7. Create the key Lightrun uses to reply. Go to All → System Web Services → API Access Policies → REST API Key → New. Link it to the integration user and click Submit. Reopen the record and copy the generated key from Token.

Step 3: Connect ServiceNow in Lightrun🔗

  1. Go to Connectors, search for ServiceNow and click Connect.
  2. Fill in:
    • Instance URL: your instance, for example https://<instance>.service-now.com, with nothing after .com
    • API key: the token from step 2.7
  3. Click Test connection. When it shows Connected, click Add.
  4. Back in the workflow from step 1.1, add ServiceNow incident comment as the output and save.

Step 4: Network🔗

  • ServiceNow → Lightrun: HTTPS to your Lightrun address. Nothing to open on your side.
  • Lightrun → ServiceNow: HTTPS to your instance. If you restrict ServiceNow by IP address, allowlist Lightrun's IP addresses. Your Lightrun team can provide them.

See Network requirements for the full list.

Check it works🔗

Open a test incident and click Ask Lightrun AI. A confirmation appears at the top of the form. When the investigation finishes, the result appears in the incident's activity stream as a comment.

Troubleshooting🔗

What you see What to check
The button does nothing IntegrationHub is active and the app's action is published.
The update set preview shows problems Resolve them before you commit. Don't commit with open errors.
Lightrun rejects the request (401) The LIGHTRUN-AI alias holds API Key Credentials with a valid Lightrun API key.
No comment appears on the incident The Instance URL in Lightrun has nothing after .com, and the token comes from the REST API Key record.
The comment shows raw HTML Turn on rendering of journal entries as HTML in ServiceNow.

Last update: November 24, 2026