Help Center


Slack Integration

https://app.chaskiq.io/rails/active_storage/representations/redirect/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBBbXdEIiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--827f2d0b5794f7bb660c48b79e228655bd857bed/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaDdCem9MWm05eWJXRjBTU0lJYW5CbkJqb0dSVlE2RkhKbGMybDZaVjkwYjE5c2FXMXBkRnNIYVdscGFRPT0iLCJleHAiOm51bGwsInB1ciI6InZhcmlhdGlvbiJ9fQ==--cf24ea7784b3789671bb09c4029aca003c26b32d/me.jpg

Written by Miguel Michelson

updated

Slack integration allows Chaskiq to sync conversation information with an Slack workspace. There are to ways to enable this, one is like an global app or like an installation for every app created on Chaskiq. The difference resides on how you will configure it later on the Chaskiq app's integration section.


Configure the App on Slack:

To enable Slack on custom installations you need to do the following:

  • Go to Slack and create new app
  • Configure with your app info
  • Configure Chaskiq keys

Create new app in Slack

Go to Slack App basic information and activate the following features for your app

You will be asked for url for Chaskiq to receive data, then you may use this schema for url:
https://YOURCHASKIQDOMAIN/api/v1/hooks/global/slack
This will be the same url for Events API and for Interactive Elements

Events API

You have to add events type for listening Slack workspace activity. Chaskiq only need one, that's is message.channels on Bot events.

Oauth Configuration

For Chaskiq sucessfully authorizes the app you will need to add a redirect URL
Go to Oauth & Permission section on your Slack app and add the following schema:
https://YOUR-DOMAIN/api/v1/oauth

Chaskiq configuration

At this point you will have all the steps ready on Slack Side to configure the app, now you will need to add the credentials of the Slack app on the Chaskiq side, there are two ways, the global credentials and the per app credentials:

Global credentials approach

When you use this mode you have to set two ENV vars for Chaskiq to know that's the intended behavior those vars are SLACK_CLIENT_ID SLACK_CLIENT_SECRET and you can get those on the basic information tab on Slack app.
The second step is to restart Chaskiq application to get the ENV vars changes. Last step is to update the Chaskiq packages, this is achiveable by running the following command

rails packages:update

Now your app will get global support for Slack apps.

Per App Credentials approach

This approach does not require that you have to set the ENV vars , instead you will need to set that on every Chaskiq account you will need to add Slack support.



In both approaches you will need to go to your Chaskiq app and go to Settings -> Integrations tab and authorize it against Slack.

If you taken the second aproach (per app credentials) then you will ask to fill some information on Slack authorization Dialog (Api key, Secret)

That's all, Happy Slakin