> ## Documentation Index
> Fetch the complete documentation index at: https://learn.getodin.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Integrate Odin AI Chatbot to Slack

> Bring Odin AI to Slack

Integrating Odin AI with Slack brings intelligent, context-aware chat directly into your workspace, allowing teams to interact with your AI agent without leaving Slack. This guide walks you through installing the Odin AI app in Slack, configuring permissions, and setting up a channel for seamless communication with your AI agent.
<Warning>Each Odin AI project can only be linked to a single Slack app. You will need to create a new Slack app for each additional Odin AI project you want to connect.</Warning>

## Prerequisites

* You have:
  * your Project's `project id` at hand
  * a set of **API Key + Secret** to setup the Odin AI app in Slack

## Install and Set Up Odin AI App in Slack

1. Go to [Slack API Apps](https://api.slack.com/apps). You may need to log in to your Slack workspace.
2. Click **Create an App**.<br /><img src="https://mintcdn.com/odinai/Do-yYHq2xpG_QEBB/img/public-chatbot/create_slack_app.png?fit=max&auto=format&n=Do-yYHq2xpG_QEBB&q=85&s=e409c92f75681065cf62edacdca90249" alt="Create Slack App" width="2732" height="1458" data-path="img/public-chatbot/create_slack_app.png" />
3. Select **From scratch**.<br /><img src="https://mintcdn.com/odinai/Do-yYHq2xpG_QEBB/img/public-chatbot/create_slack_app_from_scratch.png?fit=max&auto=format&n=Do-yYHq2xpG_QEBB&q=85&s=d7b9ef131bc8f68e43bd3fccba956155" alt="Create Slack App From Scratch" width="1080" height="748" data-path="img/public-chatbot/create_slack_app_from_scratch.png" />
4. Enter the **App Name** (e.g., "Odin AI Chatbot").
5. Select the **Development Slack Workspace** where you want to install the app.
6. Click **Create App**.<br /><img src="https://mintcdn.com/odinai/Do-yYHq2xpG_QEBB/img/public-chatbot/create_slack_app_details.png?fit=max&auto=format&n=Do-yYHq2xpG_QEBB&q=85&s=0ee713d88dea1896f4cb1c30528d5419" alt="Create Slack App Details" width="1080" height="1044" data-path="img/public-chatbot/create_slack_app_details.png" />
7. In the **Basic Information** section, note down the following values: `App ID`, `Client ID`, `Client Secret`, `Signing Secret`, and `Verfication Token`. You will need these to configure the app in step 11 below.
8. In the left sidebar, click on **OAuth & Permissions**:<br />
   a. Click **Add Redirect URL** and enter the following URL:
   ```
   https://api.getodin.ai/slack/oauth
   ```
   b. Click **Add** and then **Save URLs**.<br /><img src="https://mintcdn.com/odinai/Do-yYHq2xpG_QEBB/img/public-chatbot/slack_oauth_redirect_url.png?fit=max&auto=format&n=Do-yYHq2xpG_QEBB&q=85&s=2dd7e009f762b3414f96ccadfe7f4046" alt="Slack OAuth Redirect URL" width="1138" height="650" data-path="img/public-chatbot/slack_oauth_redirect_url.png" />
   c. Under **Scopes**, add the following **Bot Token Scopes**:
   * `app_mentions:read` – to allow the bot to read messages where it is mentioned in conversations the app is in.
   * `channels:history` – to allow the bot to view messages and other content in public channels that the app is a member of.
   * `channels:manage` – to allow the bot to manage channels, including creating, archiving, and renaming channels.
   * `channels:read` – to allow the bot to view basic information about public channels in a workspace.
   * `chat:write` – to allow the bot to send messages as the app.
   * `commands` – to allow the bot to add slash commands that users can invoke.
   * `groups:read` – to allow the bot to view basic information about private channels that the app is a member of.
   * `im:history` – to allow the bot to view messages and other content in direct messages that the app is a member of.
   * `im:write` – to allow the bot to send direct messages as the app.
   * `users.profile:read` – to allow the bot to view user profiles.
   * `users:read` – to allow the bot to view people in a workspace.
   * `users:read.email` – to allow the bot to view users emails.
9. Click **App Home** in the left sidebar. Under **Show Tabs**, ensure **Messages Tab** is enabled, as well as the checkbox below it.<br /><img src="https://mintcdn.com/odinai/Do-yYHq2xpG_QEBB/img/public-chatbot/slack_app_home_tab.png?fit=max&auto=format&n=Do-yYHq2xpG_QEBB&q=85&s=3a06b9b50656d78351ccd818f4a2628d" alt="Slack App Home Tab" width="1138" height="906" data-path="img/public-chatbot/slack_app_home_tab.png" />
10. In the left side bar, click **Slash Commands**:<br />
    a. Click **Create New Command**.
    b. In the **Command** field, enter `/setup`.<br />
    c. In the **Request URL** field, enter:
    ```
    https://api.getodin.ai/slack/events
    ```
    d. In the **Short Description** field, enter something like "Channel Setup".<br />
    e. Optionally, you can add a longer description in the **Usage Hint** field.<br />
    f. Click **Save**.<br /><img src="https://mintcdn.com/odinai/Do-yYHq2xpG_QEBB/img/public-chatbot/slack_slash_command.png?fit=max&auto=format&n=Do-yYHq2xpG_QEBB&q=85&s=a84fad0fa04dc8aa41397de97c7c53e7" alt="Slack Slash Command" width="856" height="564" data-path="img/public-chatbot/slack_slash_command.png" />
11. Complete the following API endpoint URL, with the values gathered in step 7:
    ```
    https://api.getodin.ai/slack/custom_install/{client_id}/{client_secret}/{signing_secret}/{verification_token}
    ```
    Replace `{client_id}`, `{client_secret}`, `{signing_secret}`, and `{verification_token}` with the values from your Slack app found in the **Basic Information** section.
12. Open the completed URL in a new browser. This will redirect you to a page with an **Add to Slack** button. Click this button to install the app to your workspace.<br /><img src="https://mintcdn.com/odinai/Do-yYHq2xpG_QEBB/img/public-chatbot/slack_add_to_workspace.png?fit=max&auto=format&n=Do-yYHq2xpG_QEBB&q=85&s=80cdc7de6d0fb595e02a1589c1f99b1c" alt="Slack Add to Workspace" width="316" height="118" data-path="img/public-chatbot/slack_add_to_workspace.png" />
13. You will be redirected to a page crequesting permission to access your workspace. Click **Allow** to grant the necessary permissions.<br /><img src="https://mintcdn.com/odinai/Do-yYHq2xpG_QEBB/img/public-chatbot/slack_allow_permissions.png?fit=max&auto=format&n=Do-yYHq2xpG_QEBB&q=85&s=90089b5194a51b8811adfba19517eba3" alt="Slack Allow Permissions" width="1466" height="1736" data-path="img/public-chatbot/slack_allow_permissions.png" />
14. You should see a confirmation message indicating that the installation was successful and you'll be redirected to your Slack workspace.<img src="https://mintcdn.com/odinai/Do-yYHq2xpG_QEBB/img/public-chatbot/slack_installation_successful.png?fit=max&auto=format&n=Do-yYHq2xpG_QEBB&q=85&s=5aabd70257ab9a4944fb9113c9b21c2d" alt="Slack Installation Successful" width="1466" height="386" data-path="img/public-chatbot/slack_installation_successful.png" />
15. Go to your Slack workspace, and you should see the Odin AI app in the list of apps on the left sidebar.<br /><img src="https://mintcdn.com/odinai/Do-yYHq2xpG_QEBB/img/public-chatbot/slack_odin_ai_app_installed.png?fit=max&auto=format&n=Do-yYHq2xpG_QEBB&q=85&s=b2d24ca6e185d7f095606a5decf6fa61" alt="Slack Odin AI App Installed" width="2770" height="1526" data-path="img/public-chatbot/slack_odin_ai_app_installed.png" />
    <Check>App is successfully installed in your Slack workspace! The next step is to run the setup command to configure a channel for Odin AI.</Check>

## Set Up a Channel for Odin AI App

To set up a channel for Odin AI, you need to run the `/setup` command in the desired channel. This command will configure the channel to work with Odin AI.

1. Open your Slack workspace and navigate to the channel where you want to set up Odin AI.
2. In the message input box, type `/setup` and press **Enter**.<br /><img src="https://mintlify.s3.us-west-1.amazonaws.com/odinai/img/public-chatbot/public-chatbot/slack_setup_command.png" alt="Slack Setup Command" />
3. A pop-up will appear, prompting you to enter the following information:
   * **Channel** – Select the channel you want to set up for Odin AI.<br /><Note>If you want to use the app in direct messages, select your own user name.</Note>
   * **Project ID**: Enter your Odin AI Project ID.
   * **API Key**: Enter your Odin AI API Key.
   * **API Secret**: Enter your Odin AI API Secret.<br /><img src="https://mintcdn.com/odinai/Do-yYHq2xpG_QEBB/img/public-chatbot/slack_setup_command_popup.png?fit=max&auto=format&n=Do-yYHq2xpG_QEBB&q=85&s=f2354a8214e6b9c6f26afba559c96fc5" alt="Slack Setup Command Popup" width="1080" height="1048" data-path="img/public-chatbot/slack_setup_command_popup.png" />
4. Click **Submit** to complete the setup process. The app will validate the information and configure the channel.
5. If the setup is successful, you will see a confirmation message in the channel indicating that Odin AI has been set up successfully.
   <Check>Odin AI is now set up in your selected channel! You can start interacting with the bot by mentioning it in messages or using the slash commands.</Check>
