Koji in Slack

Your virtual agent can be integrated into Slack. This page describes how to carry out this integration.

 

Generating app for Slack

1. Go to DevOps > Deployment > Channel deployment > Deploy Kbot to Slack.

2. Optional: modify the app’s name. If you do so, click Refresh for the changes to take effect.

3. Copy the JSON content from the gray pane. This content is required for the manifest file that you are going to create in Slack later on.

Alternatively, you can click Download the app to view the JSON data. Once a new tab is opened, switch to the Raw Data subtab on the page and copy the data.

Creating the Slack app

1. In Slack, click the name of your workspace and select Administration > Manage apps. Slack app directory opens.

2. In the Slack app directory, click Build in the upper right of the window.

3. Click Create New App.

4. From the Create an app dialog, select From an app manifest.

5. Select a workspace and click Next.

6. Switch to the JSON tab, paste the content that you have generated earlier, and click Next.

7. Click Create to finalize the creation.

8. Once the app is created, the app’s menu is opened. Slack suggests installing the app: in Basic Information section, click Install to Workspace to make the app available in your workspace.

9. Click Allow in the permission request dialog opens.

Now the app is available in the defined workspace.

Updating Kbot configuration

To connect your app with your Koji instance:

1. Go to https://api.slack.com/.

2. In the upper right of the window, select the app from the Your apps menu.

3. Go to OAuth & Permissions and copy the Bot User OAuth Token.

4. Open the kbot.conf file on your Kbot instance.

5. Make sure that the channels parameter includes slack:

channels = local,msbot,slack

6. Create the slack_bot_token parameter and assign it the Bot User OAuth Token value that you have copied earlier:

slack_bot_token = xoxb-***-2216504619762-93xsTejMH5wyugkxCX5We4cD

7. Restart your Kbot:

./bin/kbot.sh restart

The setup is finished. Users can communicate with Koji in Slack.

Starting conversation with Koji

To start communicating with Koji, Jira customers or internal Jira users must authenticate in Slack. The procedure is slightly different for customers and users: the main difference is that customers are asked to type a password, while Jira users are given an authorization link.

Adding Koji to a channel

You can add your virtual assistant to a channel in Slack. To learn how to do it, see the Adding Koji to a channel page.