ServiceNow Slack Integration Using Integration Hub
Slack requirements:
- Slack account
- Slack workspace owner credentials for admin scope permissions
Scope of integration
- Using WebHooks Spoke
- Notification Management
- Using Slack Spoke
- Channel Management
- Notification Management
- User Management
Category | Permission Name | Action can be performed |
Channel Management | channels:write groups:write im:write mpim:write Slack Spoke |
Add User to ChannelArchive ChannelCreate ChannelLook Up Channel HistoryLook Up ConversationRemove User from Channel |
Notification Management | chat:write chat:write:bot chat:write:user Using WebHooks Spokes |
Post a MessagePost Actionable MessagePost Approval MessagePost Change DetailsPost Incident DetailsPost MessagePost Response to SlackUpdate Approval RecordPost Problem Details |
User Management | users:read.email users:read admin Slack Spoke |
Create User Deactivate UserLookup User |
Slack Configuration Steps:
- Login with your admin account
- Create App : https://api.slack.com/
- Set Redirect URL : https://YOUR INSTANCE.service-now.com/oauth_redirect.do
- Scopes (Add on Oauth scope): Provide below permission.
- chat:write
- chat:write:bot
- chat:write:user
- channels:write
- groups:write
- im:write
- mpim:write
- users:read.email
- users:read
- admin
- Install App to workspace
ServiceNow Configuration Steps:
- Enable the IntegrationHub plugin.
- Create OAuth Profile: System OAuth – > Application Registry -> Connect to a third party OAuth Provider
- Fill all required details which you will get from Slack.
- Authorization URL:https://slack.com/oauth/v2/authorize
- Token URL:https://slack.com/api/oauth.v2.access
- Redirect URL: https://YOUR INSTANCE.service-now.com/oauth_redirect.do
- Default Grant type: Authorization Code
- Client ID: Take from Slack
- Client Secret: Take from Slack
- Navigate to integrationhub and create new credential.
- Click on “Get OAuth Token” related link.
- Go to Integrationhub -> connection & credential aliases and create one record.
- Go to manage Token and edit the expiry date.
- Create one HTTP connection from related list of connection & credential aliases. Select your credential and fill Connection URL as https://api.slack.com.
- Go to flow designer and create one simple flow to push message in Slack.