With the implementation of a Slack Endpoint you can easily connect your Slack Bot with COGNIGY.AI.
This How to covers the necessary steps for creating and connecting a Slack Endpoint. If you want to get information about assigning a Flow to the Endpoint and setting up the Data Management see Endpoints.
1 Configure Your Slack App for the usage of the Cognigy Endpoint on Slack API
2 Creation and Configuration of a Slack Endpoint within COGNIGY.AI
On Slack API
A Slack Workspace
Create a Slack App for your Slack Workspace (see figure 1.1).
Your bot needs permission to post messages in a chat. For that go to the OAuth & Permissions page of your Slack App.Scroll down to the Scopes section and select the permission chat:write, im:write and incoming:webhook (see figure 1.3).
To successfully connect your Slack App with the COGNIGY.AI Endpoint you'll need the Verification Token of your Slack App. Go to the Basic Information page of your Slack App and scroll to the App Credentials section. There you have to get the Verification Token (see figure 1.4) and save it (e.g. in a txt-file).
Go to the OAuth & Permissions page of your Slack App and scroll to the Tokens for Your Workspace section (see figure 1.5). Copy the Bot User OAuth Access Token (starts with the characters xoxb-) and save it. You can also use the OAuth Access Token, but then the bot will only have the same permissions as your user account. You can find more information about the OAuth tokens here.
In case you can't find the token: be sure that your Slack app is installed to your workspace. After installing it'll generate the two tokens.
Now we are able to set up the Slack Endpoint within COGNIGY.AI.
OAuth Access Token
First you have to create a Endpoint of the type Slack (see figure 2.1).
Expand the Slack Setup panel (see figure 2.2) and paste the saved tokens (step s1.4 and 1.5) into the corresponding fields.
Move to the top of the Endpoint Configuration page and copy the Endpoint URL which is displayed above the General Settings (see figure 2.3).
On Slack API
Go to the settings page of your Slack App and open the Event Subscription page. Paste the copied Endpoint URL (step 2.3) into the the Request URL field (see figure 2.4) A "verified" message should indicate that the entered URL is valid and that the Endpoint can be reached.
Now you just need to subscribe to the Bot Events which will trigger the bot. You can subscribe to the app_mention and message.im events.
You should be all set up to use the Slack Endpoint you've created with a Flow of your choice.
Updated about 2 years ago