Written by Miguel Michelson
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.
To enable Slack on custom installations you need to do the following:
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:
This will be the same url for Events API and for Interactive Elements
You have to add events type for listening Slack workspace activity. Chaskiq only need one, that's is message.channels on Bot events.
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:
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:
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
Now your app will get global support for Slack apps.
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