Skip to content

Integrations Slack

Thomas Trutt edited this page Apr 14, 2025 · 1 revision

The system can be integrated with Slack to send messages or attachments to a channel.

Precautions

Slack is an external service and it is up to you, your IT department, and other security professionals to decide what data can safely be shared on the platform. It is suggested that no sensitive data be sent to Slack or included in an attached file. It is also suggested that you send message to a private channel that is only accessible to the people who need to see the data.

Obtaining a OAuth Token for Slack

This is a simple process that requires you to create a new app and then generate a token for the app. The following steps will guide you through the process:

  1. Go to the Slack API page and click on "Create New App".
  2. Select "From scratch" and give your app a name and select the workspace you want to use.
  3. Click on "Create App".
  4. Click on "OAuth & Permissions" in the left menu.
  5. Scroll down to the "Scopes" section and the following to the "Bot Token Scopes" section:
    • Add the following scopes:
      • chat:write - This will allow the app to send messages to channels.
      • chat:write.public - This will allow the app to send messages to public channels.
      • chat:write.customize - This will allow the app to send messages with custom emojis.
      • channels"join - This will allow the app to join channels.
      • files:write - This will allow the app to upload files.
      • incoming-webhook - This will allow the app to send messages to channels.
  6. Scroll up to OAuth Tokens and click on "Add an OAuth Scope" click on "Install App to <<WORKSPACE NAME>>".
  7. Select the channel the app should be able to send messages to.
  8. Click on "Allow" to give the app permission to access your workspace.
  9. Copy the "OAuth Access Token" and save it to your .env file as SLACK_\<\<NUMBER\>\>_TOKEN.

If desired you can add a custom logo as well as a custom name for the app. This is not required but it will make it easier to identify the app in the future.

  1. Click on "Basic Information" in the left menu.
  2. Scroll down to the "Display Information" section.
  3. Upload a custom logo and enter a custom name for the app.
  4. Click on "Save Changes" to save the changes.

Obtaining a Slack Channel ID

  1. In the slack app, go to the channel you want to send messages to.
  2. Click on the channel name at the top of the screen.
  3. On the "About" tab located at the bottom the Channel ID is displayed along with a copy icon; click on the copy icon.
  4. Save the channel ID to your .env file as SLACK_\<\<NUMBER\>\>_CHANNEL.

Example

Slack Example

Clone this wiki locally