ServiceNow for Workflows
Preview
Your Dynatrace environment can integrate with a ServiceNow environment using ServiceNow for Workflows , enabling you to create incidents based on your monitoring data and events automatically. Furthermore, you can retrieve groups from ServiceNow and import them as Ownership teams.
Configure the integration
To use ServiceNow workflow actions, you first need to install ServiceNow for Workflows from Dynatrace Hub.
-
In Dynatrace Hub , select ServiceNow for Workflows.
-
Select Install.
-
Follow the procedures below to configure your ServiceNow integration.
Grant permissions to Workflows
Some permissions are required by Workflows to run actions on your behalf. Other permissions are required by actions that come bundled with ServiceNow for Workflows itself.
To fine-tune permissions granted to Workflows
- Go to Workflows and select Settings > Authorization settings.
- Select the following permissions besides the general Workflows permission.
- Permissions needed for ServiceNow workflow actions:
app-settings:objects:read
- Permissions needed for ServiceNow workflow actions:
For more on general Workflows user permissions, see User permissions for workflows.
Create ServiceNow basic authentication credentials
Sign in to your ServiceNow instance and create basic authentication credentials with the following permissions. You will need these credentials in the next step.
ServiceNow user permissions:
- Search, create and update incidents (table incident)
- Read categories (table sys_choice, element category)
- Read subcategories (table sys_choice, element subcategory)
- Read assignment groups (table sys_user_group)
- Read resolution codes (table sys_choice, element close_code)
Configure ServiceNow connection
You need a configured connection for each of your ServiceNow environments.
To configure a connection
- Go to Settings and select Connections > Connectors > ServiceNow.
- Select Connection
- Describe your ServiceNow connection.
- Connection name: Provide a meaningful name for your connection.
- ServiceNow Instance URL: Add the URL of your ServiceNow environment.
- User and Password: Provide your ServiceNow basic authentication credentials (username and password).
- Select Create.
Available actions
The following workflow actions are available for the ServiceNow integration. Each action corresponds to an endpoint of the ServiceNow API.
Action
Description
ServiceNow API endpoint
Create Incident
Creates an incident in your ServiceNow environment. An incident represents a problem or an issue that needs to be addressed and resolved.
POST /api/now/v2/table/incident
Create a vulnerability item
Creates a vulnerability item in your ServiceNow environment.
POST /api/now/v2/table/sn_vul_vulnerable_item
Get Groups
Get groups from your ServiceNow environment.
GET /api/now/v2/table/sys_user_group
Comment
Create a comment on an entry in your ServiceNow environment
PUT /api/now/v2/table/${tableName}/${sysId}
Search
Generic search action that allows searching your ServiceNow environment
GET /api/now/v2/table/${tableName}
Create a ServiceNow incident
To raise a ServiceNow incident in your workflow
-
In the Choose action pane, search for ServiceNow for Workflows and select Create Incident.
-
In the Create Incident action, select the Connection to your ServiceNow environment.
-
Configure the input fields as needed.
FieldDescriptionRequiredCorrelation IDUnique identifier (in most cases, this is the Dynatrace event ID).optionalCallerThe user who reports the incident.optionalCategoryThe category of the incident. Category options are derived by querying thesys_choice
table withsysparm_query: 'name=incident^element=category^inactive=false'
.requiredSubcategoryThe subcategory of the incident. Subcategory options are derived by querying thesys_choice
table withsysparm_query: 'name=incident^element=subcategory^inactive=false^dependent_value=${category}'
.requiredImpactThe impact of the incident.requiredUrgencyThe urgency of the incident.requiredAssignment GroupThe group that will work on the incident. Assignment groups options are derived by querying thesys_user_group
table withsysparm_display_value: 'all'
.requiredConfiguration itemThe affected entity.optionalShort descriptionA brief description of the incident.optionalDescriptionA detailed description of the incident.optionalFor more details, see the official ServiceNow documentation.
Create a vulnerability item in ServiceNow
To create a ServiceNow vulnerability item in your workflow
-
In the Choose action pane, search for ServiceNow for Workflows and select Create a vulnerability item.
-
In the Create a vulnerability item action, select the Connection to your ServiceNow environment.
-
Configure the input fields as needed.
FieldDescriptionRequiredExternal IDID which is associated with the vulnerable itemoptionalDescriptionA detailed description of the vulnerability itemoptionalShort descriptionA brief description of the vulnerability itemoptionalRisk scoreThe risk score of the vulnerability itemoptionalRisk ratingThe risk rating of the vulnerability itemoptionalSourceThe source which detected the vulnerable itemoptionalSource risk scoreThe risk score in the source system of the vulnerability itemoptionalConfiguration itemThe affected entityoptionalFirst foundThe date of the detectionoptionalPriorityThe priority of the vulnerability itemoptionalFor more details, see the official ServiceNow documentation.
Get Groups from ServiceNow
To fetch groups from ServiceNow in your workflow
-
In the Choose action pane, search for ServiceNow for Workflows and select Get Groups.
-
In the Get Group action, select the Connection to your ServiceNow environment.
-
Configure the input fields as needed.
FieldDescriptionRequiredSysParm QueryAn encoded query used to filter the result setoptionalLimitMaximum number of results to return (Default: 100)optionalFor more details, see the official ServiceNow documentation.
Create comment in ServiceNow
To create a comment on an entry in a ServiceNow table in your workflow
-
In the Choose action pane, search for ServiceNow for Workflows and select Create Comment.
-
In the Create Comment action, select the Connection to your ServiceNow environment.
-
Configure the input fields as needed.
FieldDescriptionRequiredTableThe table name of the entry to comment onrequiredUnique record identifier (sys_id)The sys_id of the entry to comment onrequiredCommentThe comment that will be createdrequiredFor more details, see the official ServiceNow documentation.
Search in ServiceNow
To search ServiceNow in your workflow
-
In the Choose action pane, search for ServiceNow for Workflows and select Search.
-
In the Search action, select the Connection to your ServiceNow environment.
-
Configure the input fields as needed.
FieldDescriptionRequiredTableThe name of the table in which to searchrequiredSysParm QueryAn encoded query used to filter the result setoptionalSysParm FieldsComma-separated list of fields that limit the resultoptionalLimitMaximum number of results to return (Default: 100)optionalFor more details, see the official ServiceNow documentation.
Troubleshooting
The following is a solution to a problem some people have.