Skip to content

feat: Add ServiceNow integration#3113

Merged
forestileao merged 7 commits intosuperplanehq:mainfrom
ConeDjordjic:servicenow
Feb 20, 2026
Merged

feat: Add ServiceNow integration#3113
forestileao merged 7 commits intosuperplanehq:mainfrom
ConeDjordjic:servicenow

Conversation

@ConeDjordjic
Copy link
Contributor

@ConeDjordjic ConeDjordjic commented Feb 13, 2026

Implements #3006

Addresses review feedback from @AleksandarCole:

  • Removed the OnIncident trigger (required complex manual Business Rule setup in ServiceNow)
  • Removed Basic Auth, OAuth only
  • Added GetIncidents action component as a replacement

GetIncidents made the most sense over other options like create change request,
query CMDB items, or manage service catalog requests. Those are more one-off
actions. GetIncidents is more useful as a recurring check that can actually
branch the workflow based on what's going on.

Summary

Adds the ServiceNow integration with:

  • Create Incident action: creates incidents via the Table API
  • Get Incidents action: queries incidents with filters and routes based on urgency

Authentication is OAuth only. Categories, subcategories, assignment groups,
and users are loaded from the ServiceNow API. Selecting a group filters the
user list. Selecting a category filters the subcategory list.

Output Channels (Get Incidents)

  • Clear: no incidents matched the filters
  • Low: incidents found, but none are high urgency
  • High: at least one high-urgency incident found

Video Demo (updated)

https://www.youtube.com/watch?v=DXuqBVpNBtk

Implementation

Backend (pkg/integrations/servicenow/)

  • servicenow.go: integration config and OAuth auth
  • create_incident.go: create incident action
  • get_incidents.go: query incidents with filters
  • client.go: ServiceNow Table API client
  • list_resources.go: loads categories, subcategories, groups, and users

Frontend (web_src/src/pages/workflowv2/mappers/servicenow/)

  • Action mapper for Create Incident
  • Action mapper for Get Incidents with urgency-based state coloring

Signed-off-by: ConeDjordjic <turbo.topcone@gmail.com>
@AleksandarCole AleksandarCole added pr:stage-2/3 Needs to pass functional review and removed pr:stage-1/3 Needs to pass basic review. labels Feb 17, 2026
@AleksandarCole
Copy link
Collaborator

@ConeDjordjic quick summary of what we discussed:

  • Let's simplify the integration config - no need to give user 2 options - pick the best one.
  • Due to the limitations on ServiceNow side - let's ditch the trigger component and replace it with one more action component
  • It can be GetIncident - but if you can think of a more creative component (maybe something unrelated to incidents) that would be cooler.

- Remove OnIncident webhook trigger (required manual Business Rule setup)
- Remove Basic Auth support (OAuth only)
- Add GetIncidents action component with clear/low/high output channels
- Fix on_hold_reason IDs (was skipping 2): Awaiting Caller=1, Awaiting Change=2, Awaiting Problem=3, Awaiting Vendor=4
- Remove unused GetIncident client method

Signed-off-by: ConeDjordjic <turbo.topcone@gmail.com>
# Conflicts:
#	web_src/src/ui/BuildingBlocksSidebar/index.tsx
#	web_src/src/ui/componentSidebar/integrationIcons.tsx
Signed-off-by: ConeDjordjic <turbo.topcone@gmail.com>
@forestileao
Copy link
Collaborator

forestileao commented Feb 19, 2026

@ConeDjordjic, I think @AleksandarCole mentioned to create a getIncident instead of a getIncidents (plural) component.
We may have problems to store unlimited arrays of json payloads due to their size at the moment. Until we have solution for that, can you replace this component with a getIncident? The paramenter can be the incident of Type FieldTypeIntegrationResource

@ConeDjordjic ConeDjordjic force-pushed the servicenow branch 2 times, most recently from 2f7aeec to 226c5ea Compare February 20, 2026 09:26
Signed-off-by: ConeDjordjic <turbo.topcone@gmail.com>
Signed-off-by: Pedro F. Leao <pedroforestileao@gmail.com>
@forestileao
Copy link
Collaborator

@ConeDjordjic I udpated the docs myself. Service now asks to add some strange permissions
image

Signed-off-by: Pedro F. Leao <pedroforestileao@gmail.com>
@forestileao forestileao merged commit 086aa58 into superplanehq:main Feb 20, 2026
3 checks passed
@forestileao
Copy link
Collaborator

The PR is merged. @ConeDjordjic Thanks a lot for your contribution <3

cc: @AleksandarCole

@ConeDjordjic
Copy link
Contributor Author

My bad, forgot to update the docs. The admin role part is a remnant from an earlier implementation that required it for automatic business rule creation for on_incident. It's not needed at the moment but the service itself is very limiting in terms of permissions. If at some point in the future we want to implement on_incident again without a bunch of manual steps, admin permissions will be required. For the current implementation only itil is required.

The glide.oauth.inbound.client.credential.grant_type.enabled property needs to be enabled because ServiceNow disables the client credentials grant type by default. Without it, the OAuth token request will fail. Sorry I forgot to cover that in the video demo.

Copy link

@cursor cursor bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 2 potential issues.

Bugbot Autofix is OFF. To automatically fix reported issues with Cloud Agents, enable Autofix in the Cursor dashboard.

return nil, fmt.Errorf("error parsing response: %w", err)
}
return &response.Result, nil
}
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

GetIncident sys_id path not escaped

Medium Severity

GetIncident interpolates sysID directly into the request path. If a crafted value containing reserved URL characters is ever passed (e.g. via API manipulation or corrupted config), it can alter the request path/query and fetch unintended resources or fail unexpectedly.

Fix in Cursor Fix in Web

eventState: getState(componentName)(execution),
eventId: execution.rootEvent!.id!,
},
];
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

UI mapper assumes rootEvent always exists

Medium Severity

baseEventSections passes execution.rootEvent! into getTitleAndSubtitle. If an execution exists without a rootEvent (e.g. manual runs, migrated data, or partial API responses), this will throw during rendering and break the node UI.

Fix in Cursor Fix in Web

manasa-bhagwat pushed a commit to manasa-bhagwat/superplane that referenced this pull request Feb 21, 2026
Implements superplanehq#3006

Addresses review feedback from @AleksandarCole:
- Removed the OnIncident trigger (required complex manual Business Rule
setup in ServiceNow)
- Removed Basic Auth, OAuth only
- Added GetIncidents action component as a replacement

GetIncidents made the most sense over other options like create change
request,
query CMDB items, or manage service catalog requests. Those are more
one-off
actions. GetIncidents is more useful as a recurring check that can
actually
branch the workflow based on what's going on.

## Summary

Adds the ServiceNow integration with:
- **Create Incident** action: creates incidents via the Table API
- **Get Incidents** action: queries incidents with filters and routes
based on urgency

Authentication is OAuth only. Categories, subcategories, assignment
groups,
and users are loaded from the ServiceNow API. Selecting a group filters
the
user list. Selecting a category filters the subcategory list.

## Output Channels (Get Incidents)

- **Clear**: no incidents matched the filters
- **Low**: incidents found, but none are high urgency
- **High**: at least one high-urgency incident found

## Video Demo (updated)

https://www.youtube.com/watch?v=DXuqBVpNBtk

## Implementation

### Backend (`pkg/integrations/servicenow/`)
- `servicenow.go`: integration config and OAuth auth
- `create_incident.go`: create incident action
- `get_incidents.go`: query incidents with filters
- `client.go`: ServiceNow Table API client
- `list_resources.go`: loads categories, subcategories, groups, and
users

### Frontend (`web_src/src/pages/workflowv2/mappers/servicenow/`)
- Action mapper for Create Incident
- Action mapper for Get Incidents with urgency-based state coloring

---------

Signed-off-by: ConeDjordjic <turbo.topcone@gmail.com>
Signed-off-by: Pedro F. Leao <pedroforestileao@gmail.com>
Co-authored-by: Pedro F. Leao <pedroforestileao@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

edu pr:stage-3/3 Ready for full, in-depth, review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants