Skip to end of metadata
Go to start of metadata

 

If you have a problem understanding how the action works, check: Automatic tasks, Conditional execution, Components params

Basic information

Category: Slack

Available from version: 1.0.0

Description

The component is used to send messages in the Slack communicator to the indicated recipients using a bot. To be able to use a bot, you must first create an application on the api.slack.com website in the appropriate workspace. The bot allows you to automatically send messages to a single user, private groups and public and private channels. The bot is controlled by a special bot user token (Bot User OAuth Token) that can access one or more of Slack's APIs.

Configuration parameters

Parameter name

From version

Description

Paremeter type

Default value

Field type

Comments and restrictions

Recipient type*

1.0.0

Specifies the type of recipient of the message.

Text

 

Values list

Displayed valuePassed ValueDescription
UsersUSERSThe ability to send messages to one or more users. When sending messages to more than 1 users, a private group will be created consisting of these users and application.
ChannelCHANNELThe ability to send messages to a public or private channel.
User names*1.0.0User names coming from the system. They must have an email address defined in the system.Text values array Editable field 
Channel*1.0.0

The name of the channel that comes from the specified Slack workspace.

Text Editable field

Instead of the channel name, you can enter the channel ID, which is in the URL of the currently viewed Slack channel.

Message*1.0.0

The message content.

Text Editable field

Information on text formatting methods link

Parameter*- mandatory field

Bot configuration

1. Being logged in to the appropriate Slack workspace, create an application on the link page.

2. Then we add at least one permission scope to be able to install the application in the specified workspace. To do this, in Building Apps for Slack section select the Permissions option from Add features and functionality drop-down list. Then, in the Scopes section of the Bot Token Scopes, we add the scope of permissions (e.g. chat:write).

3. On the same page, in the OAuth Tokens for Your Workspace section, click the Install to Workspace button. In the new window, we allow the newly created application to access a specific Slack workspace by clicking the Allow button.

4. A token has been generated in the OAuth Tokens for Your Workspace section. We put its value in the system in the plugin configuration management tab in the Plus Slack Integrator item. There must be one key-value pair in the JSON structure that corresponds to the token.

{
 	"token": "xoxb-99489924819-2348753480899-FF1LDoP3DZ2xzEZj9140HTvA"
}


Permissions scopes

 The Slack application's capabilities are governed by the permission scopes.

OperationZakresOpis
Sending messages to a channelchat:writeSending messages as an application with a specific name to channel.
chat:write:publicSending messages as an application with the specified name to a channel to which the application does not belong (is not a member).
Sending direct messagesim:writeSending direct message as an application with the specified name to users.
users:readOverview of users in the workspace.
users:read:emailOverview of users' email addresses in the workspace.

Sending messages to private groups / directly to more than 1 user

mpim:writeSend messages to more than 1 users simultaneously, creating a private group of those users and application.
users:readOverview of users in the workspace.
users:read:emailOverview of users' email addresses in the workspace

The configuration that ensures the implementation of each of the above operations is as follows

For an operation of sending messages to a channel, add the application to the specified channel, if it is a private channel. In a situation where the message is to be sent to the public channel, adding the application to this channel is not necessary.

Configuration example

Change log

1.0.0

  • Component adding

  • No labels
Write a comment…