Slack Spoke
Use the Slack spoke to post messages and manage access to channels.
Integration Hub subscription
This spoke requires an Integration Hub subscription. For more information, see Legal schedules - IntegrationHub overview. To learn more about the subscription, contact your account manager.
Spoke version
The Slack spoke v 1.7.0 is the latest version.
Slack account requirements
Spoke subflows
| Subflow | Description |
|---|---|
| Insert Slack User Details by Member ID | Inserts details of the required user in the Slack User Cache module, based on the Member ID. |
| Insert Slack User Details by User ID | Inserts details of the required user in the Slack User Cache module, based on the User ID. |
| Post Actionable Message | Posts an actionable message to a Slack channel. Note: This subflow requires an outbound configuration as an input. Customize the default outbound configurations or create an outbound configuration as per your requirement. For more information, see Configure outbound configurations in ServiceNow instance. |
| Post Approval Message | Posts an approval message to a Slack channel. Note: This subflow requires an outbound configuration as an input. Customize the default outbound configurations or create an outbound configuration as per your requirement. For more information, see Configure outbound configurations in ServiceNow instance. |
| Respond to Slack Approval Message | Posts an acknowledgment message on a Slack channel. |
| Respond to Slack Command | Posts a response to a command on a Slack channel. |
| Respond to Slack Message Action | Posts a notification on a Slack channel. |
While customizing the subflows, make sure that the subflows are configured to avoid infinite loops.
Spoke actions
The Slack spoke provides actions to automate the Slack workspace tasks when events occur in the ServiceNow instance. Available actions include:
| Category | Action | Description |
|---|---|---|
| Conversation Management | Add User to Channel | Adds an existing user to the specified channel in the Slack workspace. |
| Archive Channel | Archives a channel in a Slack workspace. | |
| Rename Conversation | Renames a conversation. | |
| Look up Conversation Info | Retrieves information about a conversation. | |
| Create Channel | Creates a channel in a Slack workspace. | |
| Look Up Attachments Stream By Conversation or Member ID | Retrieves attachments related with the relevant channel, member, or bot user. | |
| Look up Channel History Stream | Retrieves the history of a channel. You must provide the channel ID, and the start and end date as inputs. | |
| Look up Conversation | Retrieves the conversation messages for a thread from the specified channel. | |
| Open Conversation | Opens or resumes a direct message or a multi-person direct message. | |
| Look up Conversation IDs Stream by Member ID | Retrieves details of the Conversation IDs related with the specified member on Slack. | |
| Set Topic for Channel | Sets the topic for a Slack channel. | |
| Remove User from Channel | Removes a user from a channel in the Slack workspace. | |
| Notification Management | Post Actionable Message | Posts an actionable message to a Slack channel. Note: This action requires an outbound configuration as an input. Customize the default outbound configurations or create an outbound configuration as per your requirement. For more information,
see Configure outbound configurations in ServiceNow instance. |
| Post Approval Message | Posts an approval message to a Slack channel. Note: This action requires an outbound configuration as an input. Customize the default outbound configurations or create an outbound configuration as per your requirement. For more information,
see Configure outbound configurations in ServiceNow instance. |
|
| Post Change Details | Posts Change record details to a channel. | |
| Post Incident Details | Posts Incident record details to a channel. | |
| Post Message | Posts a message to a Slack Channel. | |
| Post Response to Slack | Posts a response to Slack. | |
| Update Approval Record | Updates an approval record. | |
| Post Problem Details | Posts a Problem record detail to a channel. | |
| User Management | Create User | Creates a user in the Slack workspace. Note: This action requires a user token from the Slack account. If you have bot user tokens, you can't use this action. |
| Deactivate User | Deactivates the specified user from the Slack workspace. Note: This action requires a user token from the Slack account. If you have bot user tokens, you can't use this action. |
|
| Look up User | Returns information about the specified user or bot. The information can be name, time zone, workspace admin rights, and team ownership of a user or bot. | |
| Deactivate Subscription | Deactivates a user subscription in Slack. To use this action, perform the steps outlined in the Create a Slack Enterprise Grid application and Create a Slack Enterprise connection section in Integrating with Slack. | |
| Look up Access Logs Stream | Retrieves the access logs for all users since the provided oldest date. To use this action, perform the steps outlined in the Create a Slack workspace application and Create a Slack workspace connection section in Integrating with Slack. | |
| Look up Users Stream | Retrieves all users in the Slack Enterprise grid. To use this action, perform the steps outlined in the Create a Slack Enterprise Grid application and Create a Slack Enterprise connection section in Integrating with Slack. |
- Create User and Deactivate User actions require the admin scope. The spoke set up procedure outlined here requires bot user tokens only. You can't use the Create User and Deactivate User actions while using the bot token scopes. To use these actions, you must obtain user token from your Slack account.
- The admin scope is available to Slack workspace owners only.
Spoke modules
| Module | Description |
|---|---|
| Slack Modal Configuration | Create modals and specify fields that should be displayed in your Slack modal. |
| Slack User Cache | Access information about users who have performed actions on the Slack channel that needed updates in the ServiceNow instance or a response from the ServiceNow instance. |
| Slack Channel Cache | Access information about the channels on which actions are performed that needed updates in the ServiceNow instance or response from ServiceNow instance. |
| Inbound Decisions | Specify events in Slack application for which actions must be performed in ServiceNow instance. For example, you can specify inbound decisions to update the task details in your ServiceNow instance when an approver approves the task on the relevant Slack channel. Five sample inbound decisions are available for your reference. Customize these decisions or create inbound decisions as per your requirement. When the conditions mentioned in the inbound decisions are met, the associated subflow is triggered and a record is created in the Slack User Cache module for the Slack user, who initiated the inbound action. |
| Inbound Decisions for Modals | Specify subflows that must be triggered when the required inbound decisions are met. When the conditions mentioned in the inbound decisions are met, the associated subflow is triggered and a record is created in the Slack User Cache module for the Slack user, who initiated the inbound action. |
| Slack Outbound Choices | Choices that should be displayed as a list on the Slack channels. |
| Inbound Slack Message | Access information about the inbound messages to your ServiceNow instance from the Slack application. |
| Outbound Configurations | Specify events in ServiceNow instance for which actions must be performed on Slack application. For example, you can specify outbound configurations to send a message on Slack channel asking for approval when a task is created in your ServiceNow instance. Three sample outbound configurations are available for your reference. Customize these configurations or create outbound configurations as per your requirement. The outbound configurations also provide a template to the Post Actionable Message and Post Approval Message actions. For example, you can configure the outbound configurations to display the Approve and Reject buttons in the approval message that is sent on the relevant Slack channel. When the configurations mentioned in the outbound configurations are met, the relevant subflow is triggered to perform actions in the Slack application. |
| Slack Configurations | Provide information about the Slack app and Signing Key. |
| Table | Fields |
|---|---|
| Slack Channel Cache [sn_slack_ah_v2_slack_channel_cache] |
|
| Slack Configurations [sn_slack_ah_v2_slack_configurations] |
|
| Slack Credential [sn_slack_ah_v2_slack_credential] |
|
| Slack Outbound Choices [sn_slack_ah_v2_slack_outbound_choices] |
|
| Slack User Cache [sn_slack_ah_v2_slack_user_details] |
|
| Slack Workspace Tokens [sn_slack_ah_v2_slack_workspace_tokens] |
|
| Slack Modal Configuration [sn_slack_ah_v2_slack_modal_configuration] |
|
Connection and credential alias requirements
Integration Hub uses aliases to manage connection and credential information, and OAuth credentials. Using an alias eliminates the need to configure multiple credentials and connection information profiles when using multiple environments. If the connection or credential information changes, you don't need to update any actions that use the connection.
For information about setting up the spoke, see Set up Slack spoke.