Skip to main content
After integrating Cortex with ServiceNow, you can create Workflows to trigger ServiceNow actions, create tickets, or update records. This guide describes how to use a Workflow to create a ServiceNow incident.

How to automate ServiceNow incident creation in Cortex

Prerequisites

Before getting started:
  • Create the following secrets in Cortex:
    • A ServiceNow access token named servicenow_token
    • A token for name of your ServiceNow domain named servicenow_domain
  • You must have the Edit Workflows permission to create the Workflow, and the Execute Workflow runs permission to run it.

Step 1: Create the Workflow

You can create a Workflow in the Cortex UI or via the Cortex CLI.

Add the Workflow via CLI

You can use the Cortex CLI to add the example Workflow to your workspace. This allows you to quickly set up the example configuration then iterate on it for your own use case. Expand the tile below to learn more:
  1. Save the Workflow example YAML file below:
  1. Use the Cortex CLI to run this command, using the path to your Workflow YAML file: cortex workflows create -f <path-to-your-workflow.yaml>

Step 2: Run the Workflow

  • In the list of Workflows, locate the “Create ServiceNow incident” Workflow and click Run.
When you run the Workflow, the following events happen:
  1. The Workflow pauses to collect a response from the user during the User Input block. The user enters a short description, description, severity, urgency, and impact.
  2. The HTTP Request block runs, which obtains the ServiceNow Sys_ID of the user who initiated the Workflow in Cortex.
  3. The Data transformation blocks run, transforming the data to get the Sys_ID of the service and its entity descriptor from Cortex.
  4. In the final HTTP Request block, it sends a payload to the ServiceNow API including the information entered by the user during the first step, and the data that was pulled from the SysID and entity descriptor. An incident is opened in ServiceNow.

Install Cortex’s ServiceNow Incidents plugin

To further highlight visibility of ServiceNow incidents in Cortex, you can also install the ServiceNow Incidents plugin. After installing, you can view incidents within a ServiceNow tab directly on an entity’s details page: ServiceNow incidents are displayed under a tab on an entity details page.
Last modified on September 28, 2026