Skip to main content

Configuring Slack integration

Overview

Slack is a popular messaging platform that allows teams to communicate and collaborate in real-time. Rill supports sending notifications to Slack channels using the Slack API. This can be useful for sending alerts and reports to your team members.

Setting up the Slack integration

Rill Cloud can send alert notifications to channels and/or as direct messages. This will require a Slack application to first be created and configured in your workspace with the necessary permission scopes. To set up your Slack application, follow the steps provided in the Slack documentation and configure your app within the appropriate permissions depending on the notification type that you wish to use (see below).

Slack channels

Sending notifications to a specific channel (public or private) requires the chat:write scope.

info

The application will also need to be added to the channel for the notification to be sent.

warning

Any alert configured to be sent to a Slack channel will be viewable by all project viewers.

Direct messages

Sending notifications via a direct message requires the chat:write, users:read, and users:read.email scopes.

tip

The last two scopes are required to find the user's ID by email.

Enabling the Slack integration in your project

Once the Slack integration has been set up, the Slack destination will need to be enabled on a per project basis (note - alerts can only be configured on projects deployed to Rill Cloud). This requires the connector.slack.bot_token connector variable to be set, which can be configured in Rill through a fashion very similar to setting credentials for other connectors. Please use one of the available options below.

Updating the .env file directly

Within your project's .env file (i.e. <RILL_PROJECT_HOME>/.env), you can set this connector variable with the Slack Bot User OAuth Token:

connector.slack.bot_token=<BOT_USER_OAUTH_TOKEN>

Afterwards, if the project has already been deployed to Rill Cloud, you can rill env push to update your cloud deployment accordingly.

Using the rill env set command

Another option to set this connector variable within your project is to use the rill env set command, i.e.:

rill env set connector.slack.bot_token <BOT_USER_OAUTH_TOKEN>

Afterwards, if the project has already been deployed to Rill Cloud, you can rill env push to update your cloud deployment accordingly.

Enabling the Slack connector through rill.yaml

You can enable the Slack "connector" within your project by updating your project's rill.yaml file with the following configuration:

# Rest of your rill.yaml contents
connectors:
- name: slack
type: slack

Afterwards, when you next deploy the project, you will be prompted to set your Slack Bot User OAuth Token via rill env configure.