Skip to content

Slack App Setup

Justin Craig-Kuhn edited this page Feb 1, 2022 · 23 revisions

To integrate KudoChest with Slack, first you need a workspace where you have permission to install apps. You also need a dedicated Slack App, which can be setup by visiting the Slack website. Click "Create New App" and use the following guide to configure it.

App Manifest

To speed up app configuration, you can use the Slack App Manifest. Make sure you replace <kudochest-host> with the appropriate value before importing.

The following instructions should produce the same result by editing app configuration manually.

Basic Info

First you'll want to setup the name of the app. You can provide anything you want, but KudoChest is recommended. You can set the bot display name separately (see below) so don't worry if that name is not available. Enter a description such as Team engagement through micro gratitude. Select a color - the recommended default is blue (#3491c7).

display_info

Avatar

Use the following avatar image or provide a custom one with your organization's style:

logo_blue

App Home

Under the "App Home" tab, ensure the following is enabled:

  • Always Show My Bot as Online

App Display Name

You can name your bot separately from the app. Go to "App Home" and click "Edit" next to "App Display Name". Set the bot name to "KudoChest" and the Default Name to "kudochest".

app_display_name

Show Tabs

Ensure "Home Tab" is disabled. Enable "Message Tab" and allow users to send Slash commands from there.

show_tabs

Shortcuts

To enable the User ++ context action, enter it with reply_tip Callback ID. Description should be Give a kudo to the author of the message.

shortcuts shortcuts2

Event Subscriptions

Enter the Request URL as https://<kudochest-host>/hooks/slack/event.

Slack will send a challenge param and listen for it to be echoed back. Afterward, you may comment out before_action :verify_challenge_param in app/controllers/hooks/slack/base_controller.rb to save some processing on every Slack callback.

event_subscriptions

Subscribe to the following Bot Events:

  • app_home_opened
  • app_uninstalled
  • channel_archive
  • channel_created
  • channel_deleted
  • channel_rename
  • channel_unarchive
  • message.channels
  • message.groups
  • message.im
  • message.mpim
  • reaction_added
  • reaction_removed
  • subteam_created
  • subteam_members_changed
  • subteam_updated
  • team_join
  • team_rename
  • user_change
bot_events1 bot_events2

Interactivity & Shortcuts

Enter the Request URL as https://<kudochest-host>/hooks/slack/action.

interactivity

Redirect URLs

Add the following Redirect URLs:

  • https://<kudochest-host>/oauth/slack_integration
  • https://<kudochest-host>/oauth/callback/slack
redirect_urls

Scopes

Ensure the following OAuth Scopes are enabled:

  • channels:history
  • channels:join
  • channels:read
  • chat:write
  • commands
  • emoji:read
  • groups:history
  • im:history
  • im:read
  • im:write
  • mpim:history
  • mpim:read
  • reactions:read
  • team:read
  • usergroups:read
  • users.profile:read
  • users:read
scopes1 scopes2 scopes3

Select Menus

Enter the following Options Load URL: https://<kudochest-host>/hooks/slack/options

select_menus

Slash Commands

You may provide any slash command but /kudos is recommended. Make sure BASE_COMMAND env var matches this value (omit the leading slash).

slash_commands edit_command

User Token Scopes

Add the following User Token Scopes to enable Slack OAuth logins:

  • identity.basic
  • identity.email

Note that logging into the KudoChest website using Slack OAuth does not automatically associate the user profile. It is the same as logging in with any other OAuth provider in that the user must use the connect command to associate their Slack profile with their web login after they authenticate.

user_token_scopes