# How to Set Up Slack in Skyone Studio

This documentation describes the complete process for configuring the **Slack** integration in **Skyone Studio.**

The goal is to enable agent flows created in **Skyone Studio** to communicate directly with **Slack** channels and users.

It is intended for administrators and developers responsible for configuring integrations and managing flows in **Skyone Studio.**

### Benefits:

* Enables direct communication between Skyone Studio and Slack.
* Automates responses and interactions in channels or private messages.
* Centralizes support flows and notifications in a single location.
* Simplifies user and permission management.

### **Key Terms (Glossary)**

* **Slack API**: Interface that allows creating and configuring apps for integration.
* **Bot User OAuth Token**: Authentication token that allows the bot to interact in Slack.
* **Signing Secret**: Security key used to validate communications.
* **Scopes**: Permissions assigned to an app in Slack.
* **Webhook URL**: Address used by Slack to send events to Studio.

### **Configuration Steps**

To configure Slack, you will need to work simultaneously in **Skyone Studio** and **Slack for Developers**. In addition, you must have a **Slack workspace** and a **channel**.

**Steps**:

1. [\[ Step 01 \] Create an app in Slack](#step-1-creating-an-app-in-slack): Foundation of the integration and credential generation.&#x20;
2. [\[ Step 02 \] Configure the app permissions](#step-2-configure-app-permissions): Define the required scopes.
3. [\[ Step 03 \] Create the Bot User OAuth Token](#step-3-create-the-bot-user-oauth-token): Token to authenticate in Studio.
4. [\[ Step 04 \] Enable interactivity](#step-4-enable-interactivity): Allows Slack to send responses.
5. [\[ Step 05 \] Enable events](#step-5-enable-events): Sends mentions and messages to Studio.
6. [\[ Step 06 \] Add the Slack account in Skyone Studio](#step-6-add-the-slack-account-in-skyone-studio): Register the Slack credentials.
7. [\[ Step 07 \] Enter the Studio URL in Slack](#step-7-insert-the-studio-url-in-slack): To receive events.
8. [\[ Step 08 \] Enable the Messages tab](#step-08-enable-the-messages-tab): Activate the messages tab so users can interact directly with the bot in Slack.
9. [\[ Step 09 \] Confirm that the bot has been added to the Slack workspace](#step-09-confirm-the-bot-was-added-to-the-slack-workspace): Verify its presence in the workspace.
10. [\[ Step 10 \] Test your Slack integration](#step-10-test-your-slack-integration): Send a message to confirm the integration is working correctl

***

### Step 1: Creating an App in Slack

1. On the "**Your Apps**" page, click "**Create New App**".
2. Select "**From scratch**".

<figure><img src="https://2493694111-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FQPcfIOA6Tl2Bmk6CdV2O%2Fuploads%2Fs6U4x3ZCY94tyAMExasR%2Fimage.avif?alt=media&#x26;token=63833e4b-e373-491f-969b-ea334364bd17" alt=""><figcaption></figcaption></figure>

3. Select the workspace where you will develop your app.

<figure><img src="https://2493694111-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FQPcfIOA6Tl2Bmk6CdV2O%2Fuploads%2Fdn5H0kmVWioltxjSvX1V%2Fimage%20(1).avif?alt=media&#x26;token=83aa4afd-e88e-41fe-8249-a893c3ed0408" alt=""><figcaption></figcaption></figure>

4. Click "**Create App**".

Once the app is created, the Basic Information page will be displayed. You will need this page and others under the Features section for configuration. Keep it open.

***

### <mark style="color:blue;">Step 2: Configure App Permissions</mark>

&#x20;In Slack, permissions are called Scopes. These scopes define what your app can access or perform, such as reading mentions, sending messages, accessing files, and retrieving user information.

<figure><img src="https://2493694111-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FQPcfIOA6Tl2Bmk6CdV2O%2Fuploads%2F8KleyncJ1QufqAn1pux9%2Fimage%20(2).avif?alt=media&#x26;token=dbd33469-4826-4e62-9b24-aff1726dfe82" alt=""><figcaption></figcaption></figure>

1. From the sidebar menu, go to **OAuth & Permissions.**
2. In the Scopes section, click '**Add an OAuth Scope'** and add the following scopes:

* **`app_mentions:read`**
* **`channels:history`**
* **`chat:write`**
* **`files:read`**
* **`im:history`**
* **`im:read`**
* **`incoming-webhook`**
* **`users:read`**
* **`users:read.email`**

***

### <mark style="color:blue;">Step 3: Create the Bot User OAuth Token</mark>

1. Still under “**OAuth & Permissions**”, in the “**OAuth Tokens**” section, click "**Install to Workspace**".

<figure><img src="https://2493694111-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FQPcfIOA6Tl2Bmk6CdV2O%2Fuploads%2FVtweM6SWwOmdVa3kEmkk%2Fimage%20(3).avif?alt=media&#x26;token=cd53ef1a-0180-4658-87fb-63560cdbfd03" alt=""><figcaption></figcaption></figure>

2. Select the previously created channel where the app should post messages.
3. To finish, click "**Allow**".
4. Done! The Bot User OAuth Token has been created and will be used later.

***

### <mark style="color:blue;">Step 4: Enable Interactivity</mark>

1. From the sidebar menu, go to “**Interactivity & Shortcuts**”.&#x20;
2. In the “**Interactivity**” section, enable the feature by toggling the switch.

<figure><img src="https://2493694111-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FQPcfIOA6Tl2Bmk6CdV2O%2Fuploads%2FuL6t7PmwrmycLIAUkEbO%2Fimage%20(4).avif?alt=media&#x26;token=12c6b7e1-28c4-4465-b086-40b1436faa53" alt=""><figcaption></figcaption></figure>

***

### <mark style="color:blue;">Step 5: Enable Events</mark>

1. From the sidebar menu, go to "**Event Subscriptions**".&#x20;

<figure><img src="https://2493694111-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FQPcfIOA6Tl2Bmk6CdV2O%2Fuploads%2F4kbjObsv38lEB7iUBbnE%2Fimage%20(5).avif?alt=media&#x26;token=bcd4c823-9b2f-426a-a912-7473791753ad" alt=""><figcaption></figcaption></figure>

2. In the Enable Events section, toggle the switch to enable the feature.
3. On the same page, under the Subscribe to Bot Events section, click "**Add Bot Use Event**" and add the following events:

* `app_mention`
* `message.channels`
* `message.im`

4. Click "**Save Changes**".

***

### Step 6: Add the Slack Account in Skyone Studio

To connect Slack to Skyone Studio, the steps are divided into three sections: **Agent Flow**, **Account**, and **Users**.

Follow the instructions below:

1. Access Skyone Studio.
2. Create or open the desired **Agent Flow**.
3. Click "**Publish**".
4. Select the "**Slack**" option.
5. Choose the agent flow you want to configure.
6. Click "**Manage Accounts**".

<figure><img src="https://2493694111-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FQPcfIOA6Tl2Bmk6CdV2O%2Fuploads%2Fbj1areDuHCgbPuX78vi6%2Fimage.png?alt=media&#x26;token=521c768d-be49-4cae-aec4-d3ccd3a1da87" alt=""><figcaption></figcaption></figure>

7. Click **“Create Account.”**
8. In the displayed modal, fill in the following fields:

<figure><img src="https://2493694111-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FQPcfIOA6Tl2Bmk6CdV2O%2Fuploads%2FvFI9EMY5CyJcOWqm53IC%2Fdel%20edicao%20de%20imagem%20(2).png?alt=media&#x26;token=a79894f2-6ca5-40ff-848b-d64f8b3dd727" alt=""><figcaption></figcaption></figure>

* **Name**: a name to identify the account
* **Public account**: by enabling this option, anyone will be able to interact with the linked publication without the need for authentication.

{% hint style="info" %}
A public account can be linked to only one single publication.
{% endhint %}

* **Bot Token**: go to the OAuth & Permissions page in Slack, find the OAuth Tokens section, copy the Bot User OAuth Token and paste it here.

<figure><img src="https://2493694111-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FQPcfIOA6Tl2Bmk6CdV2O%2Fuploads%2Fb42N1oaNG2DFbMQccLIX%2Fimage%20(6).avif?alt=media&#x26;token=6ea76fe6-17e3-43ea-ad0e-2b6430ca7e4e" alt=""><figcaption></figcaption></figure>

* **Signing Secret**: go to the Basic Information page in Slack, copy the Signing Secret value and paste it here.

<figure><img src="https://2493694111-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FQPcfIOA6Tl2Bmk6CdV2O%2Fuploads%2FdAlYv2ADchA5bk4WKQe3%2Fimage%20(7).avif?alt=media&#x26;token=13f41283-37a9-4fcf-b0f9-df1574bff9df" alt=""><figcaption></figcaption></figure>

9. Click "**Create**" and close the modal.
10. **Back on the previous screen in Studio**: Select the account you just created.
11. In the Users and Groups section, click "**Manage Users and Groups**".

<figure><img src="https://2493694111-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FQPcfIOA6Tl2Bmk6CdV2O%2Fuploads%2F64bzSjwHPpIx9qpj7Z2F%2FzqbohYrsAM.png?alt=media&#x26;token=5f219362-7cb2-46bd-8850-f13a3a66d0e8" alt=""><figcaption></figcaption></figure>

12. Click "**Create User**".
13. Fill in the following fields:

<figure><img src="https://2493694111-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FQPcfIOA6Tl2Bmk6CdV2O%2Fuploads%2FElAeDwUvOkxNRS5Ma28P%2Fimage.png?alt=media&#x26;token=61692bea-bf72-4dc3-9547-d2aacc0375a7" alt=""><figcaption></figcaption></figure>

* **Name**
* **Email**
* **Type**: select Slack

{% hint style="danger" %}
&#x20;If the user is not registered with the Slack type, the AI will not be able to send a response
{% endhint %}

* Email Settings: enable "**Use same email**" if the Slack email is the same as the one entered above. If not, enter the corresponding Slack email manually.<br>

14. Click "**Create**" and close the modal.
15. The user will be displayed automatically and can also be manually added under "**Select Users**".
16. Finally, click "**Save Publication**".
17. A Webhook URL will be displayed. Copy this URL for use in the next configuration step.

<figure><img src="https://2493694111-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FQPcfIOA6Tl2Bmk6CdV2O%2Fuploads%2FVg71bS1CDlohp32M26Q5%2Fn1o2RYKXUU.png?alt=media&#x26;token=cff85d33-9fb4-4b34-9084-d611a2cd021e" alt=""><figcaption></figcaption></figure>

***

### <mark style="color:blue;">Step 7: Insert the Studio URL in Slack</mark>

1. Go back to the Slack API.
2. In the sidebar menu, go to "**Event Subscriptions.**"
3. Under the "**Enable Events**" section, paste the previously copied URL into the "**Request URL**" field.

<figure><img src="https://2493694111-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FQPcfIOA6Tl2Bmk6CdV2O%2Fuploads%2FErt38GuQvxRtmod0LxHr%2Fimage%20(8).avif?alt=media&#x26;token=287f76c1-1cab-46a1-b061-c31ff15d5f8a" alt=""><figcaption></figcaption></figure>

4. Next, go to the "**Interactivity & Shortcuts**" page and paste the previously copied URL into the "**Request URL**" field.

<figure><img src="https://2493694111-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FQPcfIOA6Tl2Bmk6CdV2O%2Fuploads%2FHaBXeviDqNTxEVv9onUH%2Fimage%20(9).avif?alt=media&#x26;token=c7e3d2e8-d933-40f8-91a7-5c3ae20be0b4" alt=""><figcaption></figcaption></figure>

5. Click "**Save Changes**" to finish.

***

### <mark style="color:blue;">Step 08: Enable the Messages Tab</mark>

1. In the Slack API sidebar menu, go to **“App Home.”**
2. In the **“Show Tabs”** section, enable the **“Messages Tab”** option.
3. Select the option **“Allow users to send Slash commands and messages from the messages tab.”**

<figure><img src="https://2493694111-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FQPcfIOA6Tl2Bmk6CdV2O%2Fuploads%2FT8BRk96Q6i9EJ925iLhi%2Fimage%20(10).avif?alt=media&#x26;token=9e00710b-c968-47ec-a6d7-94dff94afd46" alt=""><figcaption></figcaption></figure>

***

### <mark style="color:blue;">Step 09: Confirm the Bot Was Added to the Slack Workspace</mark>

1. In the Slack chat, click **“More actions”** (the three dots located in the upper-right corner).
2. From the dropdown menu, click **“Edit settings.”**

<figure><img src="https://2493694111-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FQPcfIOA6Tl2Bmk6CdV2O%2Fuploads%2F1gtV00cSFFhSNvowrMsc%2FZk2rI9KlO9.png?alt=media&#x26;token=1dfb951b-a3ee-48fd-bc65-3a71e6003499" alt=""><figcaption></figcaption></figure>

3. Go to the **“Integrations”** tab.
4. Under **“Apps,”** check if the bot appears in this section. If it doesn’t, click **“Add apps”** to add it.

<figure><img src="https://2493694111-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FQPcfIOA6Tl2Bmk6CdV2O%2Fuploads%2Fu7Hih3dAak8tn4h8oPIk%2Fimage.png?alt=media&#x26;token=95326abf-5f55-4cf1-b13e-c134497e1c02" alt=""><figcaption></figcaption></figure>

***

### <mark style="color:blue;">Step 10: Test Your Slack Integration</mark>

Find your channel and test the integration by typing a greeting message.

<figure><img src="https://2493694111-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FQPcfIOA6Tl2Bmk6CdV2O%2Fuploads%2FZBbZ4BilHZlvf6hpuH1t%2Fimage.png?alt=media&#x26;token=d2938919-3582-451a-844e-86bed022ac31" alt=""><figcaption></figcaption></figure>

***

### **Demonstration Video**

To make the process easier to understand, watch the video below for a practical demonstration of all the steps covered in this documentation. The video shows each screen, click, and configuration required to complete the Slack integration with Skyone Studio.

{% embed url="<https://files.gitbook.com/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FQPcfIOA6Tl2Bmk6CdV2O%2Fuploads%2FsuZUPBsSvST2VpElWWyL%2FSlack%20EN.mp4?alt=media&token=a04eacca-737d-41d1-aed2-705f14a767c3>" %}

***

### FAQ – Slack Configuration in Skyone Studio

<details>

<summary>Do I need admin permissions in Slack to configure it?</summary>

Yes. You must have admin (or equivalent) permissions to create the app, define permissions, enable events, and install the bot in the Workspace.

</details>

<details>

<summary>Can I use any Workspace in Slack?</summary>

No. The app must be created in the Workspace that will be used for the integration with Skyone Studio.

</details>

<details>

<summary>What should I do if the bot doesn’t respond?</summary>

* Check if the bot has been added to the Workspace.
* Confirm that the permissions (scopes) are properly configured.
* Verify that the **Bot User OAuth Token** and **Signing Secret** are correctly registered in the Studio.
* Make sure the **Request URL** has been entered and validated in Slack.
* Ensure the user is registered as type **Slack** in the Studio

</details>
