# 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="/files/f0senZWcoAcozaM8Fh52" alt=""><figcaption></figcaption></figure>

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

<figure><img src="/files/6IvFvPNv5qo2axzF9NA6" 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="/files/cUewEk2SR0cvgGJJ0zHJ" 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="/files/IFNHEoGYrEQFDfOR21st" 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="/files/bhWn4pAKXitsuJ0bZvUl" 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="/files/JBv9arWZU2FfiDUmNt9E" 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="/files/AYQNrSld3e9z5IXOPmhr" alt=""><figcaption></figcaption></figure>

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

<figure><img src="/files/blDQrcuv6HpXoMVEfVbJ" 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="/files/CaKrCIBKKhYp8UG7biwJ" 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="/files/8VGpUakOZn9qKrS80Pgr" 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="/files/FoHPkmec8xMbu2rHtMGA" alt=""><figcaption></figcaption></figure>

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

<figure><img src="/files/i14gVeSW1JRgrg8Hqias" 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="/files/5UDVc0J05VPk58WGzibK" 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="/files/GwufvMP0bFBNQHEHmDLH" 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="/files/CHxzttpMr16WujvkmjXk" 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="/files/yzpqwrvWEqJ6jR3JwBca" 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="/files/Ol42FeDH7eoSUKwXG7Mj" 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="/files/qhIViDYmQdGGA5pxRnxa" 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="/files/m9BFgKhu50OerxOXTJir" 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>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.skyone.cloud/english/skyone-studio/artificial-intelligence/agents/ai-agent-publication-channels/how-to-set-up-slack-in-skyone-studio.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
