Slack Module
  • 09 May 2022
  • 2 Minutes to read
  • Dark
    Light

Slack Module

  • Dark
    Light

Article Summary

Overview

Module Details

Core or Github ModuleCore Module
Restart Required? No
Steps Exposed?No
Step Location Integration > Slack Messenger
Settings Location N/A
Prerequisites
  • Slack account and application
  • Experience using OAuth and generating OAuth tokens in Decisions
  • Understanding of using Slack's API

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


Configuration

  1. Navigate to Slack in a browser and visit Slack's API page to create a new application.
  2. Select OAuth & Permissions.
  3. 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.
  4. Click Install to Workspace at the top of the screen. After allowing permission, it will generate the OAuth Token.

  5. In Decisions, create an OAuth Provider.
  6. Enter the values for the Token Request URL, Authorize URL, Callback URL, Default Consumer, and Secret keys. 
    The below table lists URL's used for the integration:
    Token Request URLhttps://slack.com/api/oauth.v2.access
    Authorize URLhttps://slack.com/oauth/v2/authorize
    Callback URLhttps://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.

  7. Create an OAuth Token.
  8. 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?