# Slack

{% hint style="danger" %}
Current limitation: all event notifications are sent to Slack and Teams from Kyso. There is no option (currently) to customise your own communications preferences. This is only possible for email communications.
{% endhint %}

Kyso can be integrated easily with Slack, which will receive notifications when something happens in your organization or channel, for example, when a new report is created, or a new comment is written, just follow these steps:

## 1. Create a Slack App

Open Slack and choose the option **Apps**, under the menu *More.*

<figure><img src="https://4003540104-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LjzfPqQ1fXmC4OMXwiD%2Fuploads%2FD5jQlw6fDJ2MHPqzjWnq%2FScreenshot%20from%202023-03-23%2014-12-00.png?alt=media&#x26;token=b2b57e30-6df0-4894-a69e-2b1431d06f9b" alt=""><figcaption><p>Slack Apps</p></figcaption></figure>

Click on **App Directory** button, located at the top right of your screen.

<figure><img src="https://4003540104-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LjzfPqQ1fXmC4OMXwiD%2Fuploads%2FqNqhCbh5FK6U2QhBTcuC%2FScreenshot%20from%202023-03-23%2014-12-35.png?alt=media&#x26;token=62c62d17-d445-4cd2-9d41-4e5ee5d2f6d4" alt=""><figcaption><p>Slack's App Directoy</p></figcaption></figure>

Then, click on **Build**, located at the top right of your screen.

<figure><img src="https://4003540104-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LjzfPqQ1fXmC4OMXwiD%2Fuploads%2F8lK1QOMRJPQBZyq8MXlM%2FScreenshot%20from%202023-03-23%2014-13-12.png?alt=media&#x26;token=975a837c-4e69-4416-9ea7-3c5b0629e69d" alt=""><figcaption><p>Slack Apps</p></figcaption></figure>

Go to **Your Apps** in the top right of your screen, go to **Manage your apps** and click **Create an app**

<figure><img src="https://4003540104-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LjzfPqQ1fXmC4OMXwiD%2Fuploads%2FEprgGGWAC5dXWUw4Vaad%2FScreenshot%202023-09-27%20at%2015.01.04.png?alt=media&#x26;token=c2c14919-970a-4c9e-9d02-696bba6cc796" alt=""><figcaption><p>Your Slack Apps</p></figcaption></figure>

Click **Create an app**

<figure><img src="https://4003540104-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LjzfPqQ1fXmC4OMXwiD%2Fuploads%2F4a9dRCfjGTRtjgxLEBAM%2FScreenshot%202023-09-27%20at%2015.01.09.png?alt=media&#x26;token=d87459a5-bab8-41cc-ba5a-8d788c25eb26" alt=""><figcaption><p>Create an App</p></figcaption></figure>

Select the option **From scratch**

<figure><img src="https://4003540104-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LjzfPqQ1fXmC4OMXwiD%2Fuploads%2FG1RFCNajuMyRuG7YrYlr%2FScreenshot%20from%202023-03-23%2014-13-45.png?alt=media&#x26;token=437962af-64f3-4603-a4c1-6516873c31dd" alt=""><figcaption><p>New App from Scratch</p></figcaption></figure>

Choose a **name** and select the desired **workspace**&#x20;

<figure><img src="https://4003540104-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LjzfPqQ1fXmC4OMXwiD%2Fuploads%2FCHcHIKJEIHXAphycMPh9%2FScreenshot%20from%202023-03-23%2014-14-07.png?alt=media&#x26;token=ac085038-d21e-47fd-a5bf-82c91eba45fb" alt=""><figcaption><p>Choose an App Name</p></figcaption></figure>

Click on the section **Permissions.**

<figure><img src="https://4003540104-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LjzfPqQ1fXmC4OMXwiD%2Fuploads%2FOGu4MnYMOKKJbUmBRhOu%2FScreenshot%20from%202023-03-23%2014-15-39.png?alt=media&#x26;token=ca1622a9-f7f5-42d0-a9a0-0bd9e8bad5f4" alt=""><figcaption><p>App Permissions</p></figcaption></figure>

Scroll down until the section **Scopes** and add the scope **chat:write** to the **Bot Token Scopes.**

<figure><img src="https://4003540104-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LjzfPqQ1fXmC4OMXwiD%2Fuploads%2FZvFVzkmx8Y3g6NH17CHK%2FScreenshot%20from%202023-03-23%2014-17-03.png?alt=media&#x26;token=e1122348-927b-49ca-be0d-9077c65a5b02" alt=""><figcaption><p>App Tokens</p></figcaption></figure>

Scroll up to the top of the same page and click on the button **Install to Workspace.**

<figure><img src="https://4003540104-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LjzfPqQ1fXmC4OMXwiD%2Fuploads%2FGVzoJyJt0CjAY6OYPgCV%2FScreenshot%20from%202023-03-23%2014-17-15.png?alt=media&#x26;token=13815c5b-c9f8-409f-ab67-fa90a5eface5" alt=""><figcaption><p>Auth Tokens</p></figcaption></figure>

Copy the generated **Bot User OAuth Token** and save it for later use.

<figure><img src="https://4003540104-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LjzfPqQ1fXmC4OMXwiD%2Fuploads%2FLEQqjVvNwcnOT13atuX5%2FScreenshot%20from%202023-03-23%2014-17-36.png?alt=media&#x26;token=5f9144f7-0257-4f97-b492-00d245a5926d" alt=""><figcaption><p>Auth Tokens</p></figcaption></figure>

The Slack App configuration is finished, in the next section you will configure Kyso to use this Slack App.

## Configure Kyso

Slack notifications can be configured at different levels:

* **Organization level**. All the channels under an organization will *inherit* this configuration. That means, all the notifications related to that organization will use the same Slack channel. *Requires organization admin role*.
* **Channel level**. Every channel can define their own slack notifications. If there is a configuration at organization level, that configuration will be *overwritten* by the channel configuration. Using this, you can define specific configuration per channel. Requires Full Access role.

#### Configure Slack Notifications at Organization Level

Login into Kyso, click on your avatar and select **Settings**.

<figure><img src="https://4003540104-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LjzfPqQ1fXmC4OMXwiD%2Fuploads%2FBaNDaJn436UrlWFfH4dp%2FScreenshot%20from%202023-03-23%2018-41-53.png?alt=media&#x26;token=0c0554d1-2e5e-4097-96d5-236d2a3b1a01" alt=""><figcaption><p>Kyso Settings</p></figcaption></figure>

Choose the desired organization in the left menu, select the tab **Notifications** and copy & paste the **Bot User OAuth Token** in the form *Slack Token*. Also, specify the **destination channel** in the input *Slack Channel*.

<figure><img src="https://4003540104-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LjzfPqQ1fXmC4OMXwiD%2Fuploads%2FGufyGRavgM3L6NegWJnu%2FScreenshot%20from%202023-03-23%2014-19-52.png?alt=media&#x26;token=cb038407-f847-4481-a7b5-d63befb59c25" alt=""><figcaption></figcaption></figure>

Open Slack, click on the **destination channel** and open the configuration by clicking on the title of the channel, at the top of the page.

<figure><img src="https://4003540104-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LjzfPqQ1fXmC4OMXwiD%2Fuploads%2F0IRomJwiYyS3Td2lOB6G%2FScreenshot%20from%202023-03-23%2018-45-26.png?alt=media&#x26;token=5896272d-a726-4987-9dae-ac7acd1a7d37" alt=""><figcaption><p>Channel Configuration</p></figcaption></figure>

Select the tab **Integrations** and click on the button **Add an App**.

<figure><img src="https://4003540104-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LjzfPqQ1fXmC4OMXwiD%2Fuploads%2F42w9MUhnG5kWbqm1NT70%2FScreenshot%20from%202023-03-23%2014-23-47.png?alt=media&#x26;token=c0c7eeb2-648f-425a-97ba-7e911e73237e" alt=""><figcaption><p>Adding an Integration</p></figcaption></figure>

Write the name of your app and click on the button **Add**.

<figure><img src="https://4003540104-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LjzfPqQ1fXmC4OMXwiD%2Fuploads%2FV8LKZqaZD1JM17iEGgzu%2FScreenshot%20from%202023-03-23%2014-24-11.png?alt=media&#x26;token=6080f263-963e-43ec-9211-8ee111bc8e5a" alt=""><figcaption><p>Add the Kyso App</p></figcaption></figure>

Well done! Your organization is now configured with Slack, to test it out just create a new report in your organization and check that you are receiving the notifications in the configured channel at Slack.

<figure><img src="https://4003540104-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LjzfPqQ1fXmC4OMXwiD%2Fuploads%2FlgHdp8FMnViBAIBXWwG7%2FScreenshot%20from%202023-03-23%2014-25-52.png?alt=media&#x26;token=e2232c17-feb7-4528-8a5b-ae765dbe423a" alt=""><figcaption><p>Kyso Notifications</p></figcaption></figure>

## Configure Slack Notifications at the Channel Level

The configuration process is exactly the same, but in the **Channel Configuration** page on your Kyso settings.

<figure><img src="https://4003540104-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LjzfPqQ1fXmC4OMXwiD%2Fuploads%2FH0RyVMxxwus6TI0srM7a%2FScreenshot%20from%202023-03-23%2018-57-23.png?alt=media&#x26;token=4d6ae304-8a89-40ce-a2da-4f74de10311e" alt=""><figcaption><p>Kyso Channel Settings</p></figcaption></figure>

Take into account that the **slack token** only can be defined at the **Organization level**, for security reasons.
