---
title: Create a ServiceNow incident
source: https://docs.newrelic.com/docs/workflow-automation/setup-and-configure/actions-catalog/servicenow/servicenow-incident-create
---

Creates a new incident in ServiceNow using the Table API.

For authentication setup, see [ServiceNow Incident actions](https://docs.newrelic.com/docs/workflow-automation/setup-and-configure/actions-catalog/servicenow/servicenow-incident).

## Inputs

| Input Field          | Optionality | Type   | Description                                                                                                                                                  | Example                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          |
| -------------------- | ----------- | ------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| **domain**           | Required    | String | Domain of the ServiceNow instance. Used to construct the base URL `your-domain.service-now.com`.                                                             | `"your-domain"`                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  |
| **shortDescription** | Required    | String | Short description of the incident.                                                                                                                           | `"Test Incident"`                                                                                                                                                                                                                                                                                                                                                                                                                                                                                |
| **apiKey**           | Required    | String | ServiceNow REST API Key for authentication. Passed as the `x-sn-apikey` request header. Must be provided as a secret.                                        | `"${{ :secrets:serviceNowApiKey }}"`                                                                                                                                                                                                                                                                                                                                                                                                                                                             |
| **parameters**       | Optional    | Map    | Optional URL query parameters for the ServiceNow API request. Controls the format and content of the API response. See the parameters reference table below. | `"{\"sysparm_fields\": \"name,short_description\", \"sysparm_exclude_reference_link\": \"true\", \"sysparm_input_display_value\": \"false\", \"sysparm_display_value\": \"true\"}"` See [Export to OpenAPI specification](https://www.servicenow.com/docs/r/api-reference/rest-api-explorer/export-openapi-specification.html) for a list of accepted parameters.                                                                                                                                |
| **fields**           | Optional    | Map    | Additional incident fields to include in the request body. All fields are merged with `shortDescription`. See the fields reference table below.              | `"{\"description\": \"Detailed description\", \"urgency\": \"2\", \"impact\": \"2\", \"priority\": \"3\", \"assignment_group\": \"IT Support\", \"assigned_to\": \"john.doe\", \"category\": \"Software\", \"subcategory\": \"Application\", \"caller_id\": \"jane.smith\", \"contact_type\": \"email\", \"state\": \"1\", \"cmdb_ci\": \"web-server-01\"}"` See [JSON object format](https://www.servicenow.com/docs/r/api-reference/web-services/c_JSONObjectFormat.html) for a sample object. |
| **selectors**        | Optional    | List   |                                                                                                                                                              | `[{\"name\": \"incidentNumber\", \"expression\": \".responseBody.result.number\"}]`                                                                                                                                                                                                                                                                                                                                                                                                              |

> #### ⚠️ PARAMETERS REFERENCE
>
> | Parameter                           | Type   | Description                                                                                              | Default   |
> | ----------------------------------- | ------ | -------------------------------------------------------------------------------------------------------- | --------- |
> | **sysparm_fields**                  | String | Comma-separated list of fields to return in the response.                                                |           |
> | **sysparm_exclude_reference_link**  | String | `true` or `false` to exclude reference links from the response.                                          | `false`   |
> | **sysparm_display_value**           | String | `true`, `false`, or `all` to return display values instead of actual values.                             | `false`   |
> | **sysparm_input_display_value**     | String | `true` or `false`. When `true`, sets field values using their display value instead of the actual value. | `false`   |
> | **sysparm_suppress_auto_sys_field** | String | `true` or `false`. When `true`, suppresses auto-generation of system fields.                             | `false`   |
> | **sysparm_view**                    | String | Renders the response according to a specific UI view. Overridden by `sysparm_fields`.                    | `default` |

> #### ⚠️ FIELDS REFERENCE
>
> | Field                   | Type   |
> | ----------------------- | ------ |
> | **short_description**   | String |
> | **description**         | String |
> | **caller_id**           | String |
> | **category**            | String |
> | **subcategory**         | String |
> | **urgency**             | String |
> | **impact**              | String |
> | **priority**            | String |
> | **assignment_group**    | String |
> | **assigned_to**         | String |
> | **state**               | String |
> | **contact_type**        | String |
> | **business_service**    | String |
> | **cmdb_ci**             | String |
> | **comments**            | String |
> | **opened_by**           | String |
> | **opened_at**           | String |
> | **correlation_id**      | String |
> | **correlation_display** | String |

## Outputs

| Output Field     | Type    | Example                                                                                                                                                                                             |
| ---------------- | ------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **response**     | Object  | ```yaml { "result": {     "number": "INC0019382",     "sys_id": "ed59ab193b67ba10e811026aa5e45a2d",     "short_description": "The server is on fire.",     ....     .... } } ```                    |
| **success**      | Boolean | `success: true | false`                                                                                                                                                                             |
| **errorMessage** | String  | ```yaml [   {     "success": false,     "errorMessage": "{\"error\":{\"message\":\"User Not Authenticated\",\"detail\":\"Required to provide Auth information\"},\"status\":\"failure\"}"   } ] ``` |

## Example

| Workflow example                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  |
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| ```yaml name: create-servicenow-incident description: to create a incident in ServiceNow steps:   - type: action     name: createIncident     action: serviceNow.incident.create     version: 1     inputs:       domain: "your-domain"       apiKey: "${{ :secrets:serviceNowApiKey }}"       shortDescription: "Test incident from New Relic WFA"       fields:         description: "This is a test incident created from New Relic WFA using access token authentication."         priority: "2"         impact: "2"         urgency: "2"         assignment_group: "IT Support"         assigned_to: "admin"         contact_type: "email"       parameters:         sysparm_display_value: "true"         sysparm_fields: "number,short_description,description,priority,sys_id"       selectors:         - name: sysId           expression: .responseBody.result.sys_id     next: end ``` |
