Skip to content
Loïc LEUILLIOT edited this page Aug 10, 2017 · 10 revisions

Documentation Version

Requirements

In order to be used, Slack is requiring https url on its new Event API. It doesn't allow unstrusted SSL certificate (auto generated one). You can claim free certificates from Let's Encrypt or Start SSL.

First of all, ensure you're using the latest composer and SeAT version. We assume you will run all command with the SeAT user. This is mandatory. In the following line, you'll see domain in some url. You must replace this by your domain or slack access path.

Create an app on Slack

  1. go on Slack Application
  2. clic on Create New App
  3. on left side, clic on OAuth & Permissions and put https://domain/slackbot/oauth/callback and save changes.

Attach SeAT to Slack

Install the plugin

  1. put your SeAT instance offline by running php artisan down
  2. including slackbot into SeAT with composer require warlof/slackbot
  3. add the plugin to your SeAT instance by editing the file in config/app.php and append this line Warlof\Seat\Slackbot\SlackbotServiceProvider::class after https://github.com/eveseat/seat/blob/2.0.0/config/app.php#L185-L187
/*
 * Package Service Providers...
 */
  1. publish the newly installed package with php artisan vendor:publish --force
  2. update your database with php artisan migrate
  3. restart supervisor using sudo service supervisor restart in order to load new codes
  4. back your SeAT instance online with php artisan up
  5. sign to your instance with a superuser and go into Slackbot > Slackbot Settings in order to setup the plugin
  6. fill the fields Slack Client ID, Slack Client Secret and Slack Verification Token
  7. hit the Update button

Grant SeAT to access to Slack

  1. First of all, you need to setup Slack Client ID, Slack Client Secret and Slack Verification Token into Slackbot > Slackbot Settings, fill the field and hit update button
  2. If needed, authenticate yourself using Slack Team credentials and confirm the team you want to bind with SeAT.
  3. On success and back to SeAT, click both on Update Slack channels and groups and Update Slack users
  4. Edit your slack permission going on Slackbot > Slack Access Management

Init the Slack outgoing webhook

  1. back on your Slack created application information page
  2. on left side, clic on Event Subscriptions and put https://domain/slackbot/event/callback (wait for check - Verified)
  3. into Team Events section, add following event :
  • channel_archive
  • channel_created
  • channel_deleted
  • channel_rename
  • channel_unarchive
  • group_archive
  • group_close
  • group_open
  • group_rename
  • group_unarchive
  • message.channels (used in order to track channel join or leave events)
  • message.groups (used in order to track group join or leave events)
  1. hit Save Changes at the bottom

Sync SeAT and Slack

When everything is correctly setup, go on your SeAT instance on Configuration > Schedule and ensure that slack:update is in the list. If not, you can add it with every five minutes rule.

If you're on an existing Slack, go into Slackbot > Slackbot Settings from the sidebar and hit the Update Slack Channels and groups button. This will pull all known private and public channels.

Build your permission layout

  1. Back to your SeAT instance
  2. Go into Slackbot > Slack Access Management from the sidebar
  3. Fill the Quick create form according to your needs

The table available on the right allow you to see the detail of applied permission foreach categories :

  • public : everybody, without affiliation of any kind
  • user : specific SeAT user
  • role : all user attached to specific SeAT role
  • corporation : all user which have at least one character in a specific corporation
  • title : all user which own a specific title in a corporation
  • alliance : all user which have at least one character in a specific alliance (this require eve:eve-update command to be run at least once)

Quick howto

Setup howto