Slack Module
  • 06 Jun 2022
  • 2 Minutes to read
  • Dark
    Light
  This documentation version is deprecated, please click here for the latest version.

Slack Module

  • Dark
    Light

Article summary

Overview

The Slack Module allows a user to integrate the Slack application with Decisions. 

Prerequisites:


Example

This example will demonstrate how to configure the Slack Module. 

  1. After creating an app at Slack API click OAuth & Permissions.
  2. 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.
  3. Click Install to Workspace at the top of the screen. After allowing permission, it will generate the OAuth Token.
  4. In Decisions, navigate to System > Integrations > OAuth > Providers. Click ADD OAUTH PROVIDER.
  5. 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.


  6. Navigate to System > Integrations > OAuth > Tokens. Click CREATE TOKEN.

  7. 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 ParameterDescription
Channel IDId of the specified channel 

Create Channel

The Create Channel step allows a user to create a public or private channel.

Input ParameterDescription
Channel NameDesired name for the new channel
PrivateAllows 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 ParameterDescription
Channel IDId of the specified channel
Message TimestampTimestamp 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 ParameterDescription
Channel NameName of the desired channel

Get Channel List

The Get Channel List step allows a user to get a list of channels.

Input ParameterDescription
Exclude ArchivedAllows 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 ParameterDescription
Channel IDId of the specified channel
Latest Message TimestampTimestamp of the message
Message CountNumber 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 ParametersDescription
Channel IDId of the specified channel

Invite to Channel

The Invite to Channel step will allow a user to send an invite to another user.

Input ParameterDescription
Channel IDId of the specified channel
User Id ListList 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 ParameterDescription
User Id ListList 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 ParameterDescription
Channel IDId of the specified channel
Message TimestampTimestamp 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 ParameterDescription
Channel IDId of the specified channel
Message TextMessage 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 ParameterDescription
Match CountNumber of results to match
Text to SearchText 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 ParameterDescription
Channel IDId of the specified channel
Message TimestampTimestamp of the message



Was this article helpful?