Skip to content

Slack App Setup

Justin Craig-Kuhn edited this page May 21, 2021 · 23 revisions

App Manifest

To speed up app configuration, you can use the App Manifest. Make sure you replace <your-karmachest-domain> 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 KarmaChest 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 "KarmaChest" and the Default Name to "karmachest".

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 1 karma to the author of the message.

shortcuts shortcuts2

Event Subscriptions

Enter the Subscriptions Request URL as https://<your-karmachest-domain>/hooks/slack/event.

For the initial setup, you'll need to respond with the appropriate challenge response. Uncomment before_action :verify_challenge_param in https://github.com/jcraigk/karmachest/blob/master/app/controllers/hooks/slack/base_controller.rb#L6 during initial app integration.

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
  • 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 Interactivity Request URL as https://<your-karmachest-domain>/hooks/slack/action.

interactivity

Redirect URLs

Add the following redirect URLs:

  • https://<your-karmachest-domain>/oauth/slack_integration
  • https://<your-karmachest-domain>/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://<your-karmachest-domain>/hooks/slack/options

select_menus

Slash Commands

You may provide any slash command but /karma is recommended. Make sure config.base_command matches this value in config/application.rb (omit the leading slash).

slash_commands edit_command

User Token Scopes

Add the following User Token Scopes to enable Slack-based logins:

  • identity.basic
  • identity.email

Note that logging into the KarmaChest 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
Clone this wiki locally