# Slack

### Download Chatlayer Bot App on Slack&#x20;

{% hint style="info" %}
Note that you have to be a workspace admin to install the Chatlayer app in your Slack workspace
{% endhint %}

1. Open **Slack** and navigate to the workspace where you want to add the bot
2. Click **Add apps** located at the bottom left corner of the Slack interface.<br>

<figure><img src="/files/ZkGqjId7UTBSHr9ehcsZ" alt=""><figcaption><p>From main navigation, click 'Add apps'</p></figcaption></figure>

3. Search for **Chatlayer Bot** in the search bar.\
   If you can't find the app, you can install it by clicking [here](https://slack.com/oauth/v2/authorize?client_id=2327687118.7214179557811\&scope=channels:history,channels:read,chat:write,files:read,files:write,groups:history,im:history,mpim:read,reactions:read,team:read,users:read\&user_scope=).

<figure><img src="/files/ym4ya417iHpV5cMJzpTK" alt=""><figcaption><p>Find Chatlayer bot app</p></figcaption></figure>

4. Download the Chatlayer bot app.
5. Locate the **Chatlayer bot** in your Apps list after the download is complete.

<figure><img src="/files/NN32GQIslhRzrme15PlB" alt=""><figcaption><p>Chatlayer bot listed on your Apps</p></figcaption></figure>

### **Configure Slack App on Chatlayer**

To connect Slack app to Chatlayer, follow these steps:

1. Navigate to the **Bots** page on Chatlayer and select **Integrations**.

<figure><img src="/files/nRZZFnagDIWKQU7kDDwS" alt=""><figcaption><p>Integrations page on Chatlayer</p></figcaption></figure>

2. Find the Slack app or type ‘Slack’ in the search bar.
3. Click **View App** and then **Connected Account**.

<figure><img src="/files/aYtU23f8orFIWfAKdpqQ" alt=""><figcaption><p>Click 'Connected account' to connect Slack</p></figcaption></figure>

4. Click **Authorize.**&#x20;

<figure><img src="/files/cRJpjonkviWqjRovZ54y" alt=""><figcaption></figcaption></figure>

5. A new tab will open, listing all the requested permissions. Click **Allow**.

<figure><img src="/files/H6GTffmgV83tz6ynh73S" alt=""><figcaption></figcaption></figure>

6. Click **Connect** to connect the account.&#x20;

<figure><img src="/files/0zrEYkd90xWnwZvsDmtu" alt=""><figcaption></figcaption></figure>

7. Go to **Connected accounts** to see the connected account.&#x20;

<figure><img src="/files/jQ7Z5WDg8G6UOJUpcQ0a" alt=""><figcaption></figcaption></figure>

### Connect a Bot to a Slack Channel&#x20;

Follow these steps to connect a bot to a connected Slack channel:

1. On the **‘Bots’** page, create a new bot or open an existing bot.

<figure><img src="/files/e8fXLzPrH4JZQt8VLzpJ" alt=""><figcaption></figcaption></figure>

2. In the main navigation, go to **Channels** and click **Add channel**.

<figure><img src="/files/uqFpZVYZpL66gdnKq5ks" alt=""><figcaption></figcaption></figure>

3. Select **Slack App** and click **Next**.

<figure><img src="/files/KyH10mKr66m83LpCTHwW" alt=""><figcaption></figcaption></figure>

4. Select the connected Slack account or connect a new account, then click **Next**.

<figure><img src="/files/DbPSMkK4mr9zQGczphaw" alt=""><figcaption><p>Select Slack account</p></figcaption></figure>

{% hint style="info" %}
Before connecting the Slack channel, make sure you have already created a Slack channel. You can follow the documentation [here](https://slack.com/help/articles/201402297-Create-a-channel).
{% endhint %}

5. In the Slack channel input field, copy and paste the **Slack channel ID** and enter the **bot name**. After filling in both fields, click **Finish** to connect the bot with the Slack channel.

<figure><img src="/files/sIr487BxWHoOgLrsegoG" alt=""><figcaption><p>Fill Slack channel ID and bot name</p></figcaption></figure>

<figure><img src="/files/HNjJSGGmLGIbzPzTrCpd" alt=""><figcaption><p>A slack channel is connected</p></figcaption></figure>

6. Once connected, you can start testing your bot in your Slack channel. You bot will start responding any questions coming from the channel. \ <br>

   <figure><img src="/files/MA02ErEq33vpPElXMEcv" alt=""><figcaption><p>Example bot conversation on Slack channel</p></figcaption></figure>


---

# 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.chatlayer.ai/integrateandcode/app-integrations/slack.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.
