- 06 Jun 2022
- 2 Minutes to read
- Print
- DarkLight
Slack Module
- Updated on 06 Jun 2022
- 2 Minutes to read
- Print
- DarkLight
Overview
The Slack Module allows a user to integrate the Slack application with Decisions.
- Installation of the Slack Module is required. To learn how to install the module, see Installing Modules from GitHub and visit https://github.com/Decisions-Modules/Decisions.Slack.
- Slack application
Example
This example will demonstrate how to configure the Slack Module.
- After creating an app at Slack API click OAuth & Permissions.
- Under User Token Scopes, click Add an OAuth Scope. Add channels:history, channels:read, channels:write, chat:write,im:write, pins:write, search:read, and users:read scopes.
- Click Install to Workspace at the top of the screen. After allowing permission, it will generate the OAuth Token.
- In Decisions, navigate to System > Integrations > OAuth > Providers. Click ADD OAUTH PROVIDER.
- Enter a name, select OAuth2, and add the links for the Token Request URL, Authorize URL, and Callback URL. Click SAVE.Token Request URL: https://slack.com/api/oauth.v2.access
Authorize URL: https://slack.com/oauth/v2/authorize
Callback URL: http://localhost/decisions/HandleTokenResponse
The Default Consumer Key and Default Consumer Secret Key can be located on Slack API by clicking Basic Information. The fields are labeled Client ID and Client Secret. - Navigate to System > Integrations > OAuth > Tokens. Click CREATE TOKEN.
- Enter a name for the token and select the Provider. Under Additional Values enter "user_scope=channels:history,channels:read,channels:write,chat:write,im:write,pins:write,search:read,users:read". Click Request Token. Follow the instructions on the browser window and click OK when done.
Available Steps
The Slack Module steps are located under INTEGRATION > SLACK MESSENGER.
Archive Channel
The Archive Channel step allows a user to archive a desired Slack channel.
Input Parameter | Description |
---|---|
Channel ID | Id of the specified channel |
Create Channel
The Create Channel step allows a user to create a public or private channel.
Input Parameter | Description |
---|---|
Channel Name | Desired name for the new channel |
Private | Allows the user to set the channel as private |
Delete Message from Channel
The Delete Message from Channel step allows a user to remove a specified message from a channel.
Input Parameter | Description |
---|---|
Channel ID | Id of the specified channel |
Message Timestamp | Timestamp of the desired message |
Get Channel ID by Name
The Get Channel ID by Name step allows a user to use a channel's name to get the ID associated with the channel.
Input Parameter | Description |
---|---|
Channel Name | Name of the desired channel |
Get Channel List
The Get Channel List step allows a user to get a list of channels.
Input Parameter | Description |
---|---|
Exclude Archived | Allows the user to exclude archived channels |
Get Messages from Channel
The Get Messages from Channel step will allow a user to get messages from a specified channel.
Input Parameter | Description |
---|---|
Channel ID | Id of the specified channel |
Latest Message Timestamp | Timestamp of the message |
Message Count | Number of messages to get from the channel |
Get User List in Channel
The Get User List in Channel step will allow a user to get a list of users in a specified channel.
Input Parameters | Description |
---|---|
Channel ID | Id of the specified channel |
Invite to Channel
The Invite to Channel step will allow a user to send an invite to another user.
Input Parameter | Description |
---|---|
Channel ID | Id of the specified channel |
User Id List | List of user Ids |
Open Channel with Users
The Open Channel with Users step will allow a user to open a channel populated with a specified list of user IDs.
Input Parameter | Description |
---|---|
User Id List | List of specified user Ids |
Pin Message to Channel
The Pin Message to Channel allows a user to pin a message to a specified channel.
Input Parameter | Description |
---|---|
Channel ID | Id of the specified channel |
Message Timestamp | Timestamp of the specified message |
Post Message to Channel
The Post Message to Channel allows a user to post a message to a specified channel.
Input Parameter | Description |
---|---|
Channel ID | Id of the specified channel |
Message Text | Message to post |
Search for Text in Channels
The Search for Text in Channels step allows a user to search for text in Slack channels.
Input Parameter | Description |
---|---|
Match Count | Number of results to match |
Text to Search | Text to search |
Unpin Message to Channel
The Unpin Message to Channel step allows a user to remove a message from being pinned to a specified channel.
Input Parameter | Description |
---|---|
Channel ID | Id of the specified channel |
Message Timestamp | Timestamp of the message |