ServiceNow Connector

Manage incidents, changes, tickets, and CMDB in ServiceNow

ServiceNow Connector

Connect your workflows to ServiceNow and automate IT Service Management. Create incidents, manage change requests, track service requests, and keep your CMDB updated—all from DeepChain.

Overview

The ServiceNow connector provides 8 operations for managing ITSM workflows. Whether you're automating incident response or managing the change management process, this connector streamlines your operations.

Authentication

ServiceNow supports two authentication methods:

Option 1: OAuth 2.0 (Recommended)

Secure, delegated access:

auth_type: oauth2
instance: "your-instance.service-now.com"
client_id: "your-client-id"
client_secret: "your-client-secret"

How to set it up:

  1. In ServiceNow, navigate to System OAuth > OAuth Scope Approvals
  2. Create OAuth credentials for your application
  3. Add scopes: incident_management, change_management, etc.
  4. Copy Client ID and Client Secret

Option 2: Basic Auth

Simple username/password authentication:

auth_type: basic
instance: "your-instance.service-now.com"
username: "serviceaccount@company.com"
password: "your-password"

Available Operations

Operation What It Does
getIncident Fetch incident by ID
createIncident Create new incident
updateIncident Update incident details
listIncidents List incidents with filtering
getServiceRequest Fetch service request
createServiceRequest Create new service request
getChange Fetch change request
createChange Create change request

Practical Workflow Examples

Example 1: Auto-Create Incident from Alert

Turn monitoring alerts into ServiceNow incidents:

- id: create_incident
  type: servicenow_connector
  config:
    operation: createIncident
    short_description: "Alert: {{ input.alert_title }}"
    description: |
      Service: {{ input.service }}
      Severity: {{ input.severity }}
      Details: {{ input.alert_details }}
    urgency: "{{ if(input.severity == 'critical', '1', '2') }}"  # 1 = High, 2 = Medium
    impact: "{{ if(input.affected_users > 100, '1', '2') }}"
    assignment_group: "{{ input.team_group }}"
    category: "Software"

Example 2: Create Service Request

Capture user requests for new software or access:

- id: create_request
  type: servicenow_connector
  config:
    operation: createServiceRequest
    short_description: "Request: {{ input.request_type }}"
    description: "Requested by: {{ input.requester_name }}\nReason: {{ input.reason }}"
    assignment_group: "Service Desk"
    requested_for: "{{ input.user_email }}"

Example 3: Update Incident Status

Move incident through resolution workflow:

- id: resolve_incident
  type: servicenow_connector
  config:
    operation: updateIncident
    id: "{{ input.incident_id }}"
    state: "7"  # 7 = Resolved, 8 = Closed
    resolution_code: "Permanently Fixed"
    resolution_notes: "Issue resolved by {{ input.resolver_name }}"

Example 4: Create Change Request

Document system changes:

- id: create_change
  type: servicenow_connector
  config:
    operation: createChange
    short_description: "Deploy version {{ input.app_version }}"
    description: |
      Application: {{ input.app_name }}
      Environment: {{ input.environment }}
      Changes: {{ input.changelog }}
    type: "{{ input.change_type }}"  # "standard", "normal", "emergency"
    assignment_group: "DevOps"
    implementation_plan: "Automated deployment via DeepChain"

Example 5: Track Related Incidents

Find all incidents for a service:

- id: find_related
  type: servicenow_connector
  config:
    operation: listIncidents
    query: "cmdb_ci.name={{ input.service_name }}"

Rate Limits

ServiceNow rate limits vary by instance configuration:

  • Default: 60 requests per minute per user
  • Enterprise: May be higher (check your instance settings)

Note: DeepChain handles retries automatically.

Error Handling

Error What It Means How to Fix
BadRequest Invalid field or value Check field names and valid options in ServiceNow
Unauthorized Bad credentials Re-authenticate
NotFound Record doesn't exist Verify incident/request ID
Conflict Can't perform action in current state Check incident state (e.g., can't resolve a closed incident)

Best Practices

1. Use Correct Incident States

Different states have specific purposes:

state: "1"   # New
state: "2"   # In Progress
state: "6"   # Awaiting User Info
state: "7"   # Resolved
state: "8"   # Closed

2. Set Urgency Based on Impact

Auto-calculate urgency from context:

urgency: "{{ if(input.affected_users > 1000, '1', if(input.affected_users > 100, '2', '3')) }}"

3. Assign to Correct Groups

Use your ServiceNow group names:

assignment_group: "{{ input.team_group }}"  # e.g., "Network Support", "Database Team"

Next Steps