Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updated Slack Connector Documentation & Images #190

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
75 changes: 52 additions & 23 deletions connectors/slack.mdx
Original file line number Diff line number Diff line change
@@ -1,28 +1,34 @@
---
title: Slack Connector
description: "Access knowledge from your Messages"
title: "Slack Bot Setup"
description: "How to set up a Slack bot to automatically answer questions"
icon: "slack"
---

## How it works

The Slack connector indexes all public channels for a given workspace.
The Onyx Slack Connector allows Onyx to index and make Slack conversations searchable. It enables Onyx to retrieve messages from both public and private Slack channels (only if the bot is manually added to private ones).

- Upcoming: Support for private channels by tagging/adding the Onyx Slack Bot to private channels.
Once connected, you can:

Search for Slack messages directly within Onyx.
Automatically index new messages in selected channels.
Ensure seamless retrieval of both public and private Slack conversations to enhance knowledge discovery.

## Setting up

### Authorization
### Creating an App

**Note: You must be an admin of the Slack workspace to set up the connector**

1. **Note: You must be an admin of the Slack workspace to set up the connector**
2. Navigate and sign in to [https://api.slack.com/apps](https://api.slack.com/apps).
3. Create a new Slack app:
- Click the **Create New App** button in the top right.
- Select **From an app manifest** option.
1. Navigate and sign in to https://api.slack.com/apps.
2. Create a new Slack app:
- Click the **Create New App** button on the top right.
- Select the **From a manifest** option.
- Select the relevant workspace from the dropdown and click **Next**.

![SlackApp](/images/connectors/slack/SlackApp.png)
### ![images/Screenshot2025-03-18135430.png](/Create&Manifest.png)

4. Select the "YAML" tab, paste the following manifest into the text box, and click **Next**:
1. Select the "YAML" tab, paste the following manifest into the text box, and click **Next**, then **Create**:

```
display_information:
Expand Down Expand Up @@ -50,21 +56,44 @@ settings:
token_rotation_enabled: false
```

5. Click the **Create** button.
6. In the app page, navigate to the **OAuth & Permissions** tab under the **Features** header.
7. Copy the **Bot User OAuth Token**, this will be used to access Slack.
### OAuth & Permissions

1. Once the app has been created, navigate to the **OAuth & Permissions** tab under the **Features** header.
2. Find the block that says **OAuth Tokens and click Install to (workspace)**
3. Copy the **Bot User OAuth Token**

![images/OAuth&Copy.png](/images/OAuth&Copy.png)

### Onyx Admin

1. Login to https://www.onyx.app/ and proceed to the **Admin Panel**

![images/OnyxAdminPanel.png](/images/OnyxAdminPanel.png)

1. Click on **Add Connector** and search for **Slack**

![images/AddConnector.png](/images/AddConnector.png)

1. Click on **Create New**

![images/CreateNew.png](/images/CreateNew.png)

1. Create a **name **and **paste your OAuth Token** from **OAuth & Permissions Step 3** then **click Create**

![images/SlackBotTokenAdd.png](/images/SlackBotTokenAdd.png)

1. Configure your connector, then click **Create Connector +**

![SlackBotToken](/images/connectors/slack/SlackBotToken.png)
![images/Screenshot2025-03-18140958.png](/images/Screenshot2025-03-18140958.png)

### Indexing
1. Verify that the connector has **successfully synced**

1. Navigate to the Connector Dashboard and select the **Slack** Connector.
2. Place the **Bot User OAuth Token** under **Step 1 Provide Credentials**
## ![images/Screenshot2025-03-18142459.png](/images/Screenshot2025-03-18142459.png)

![SlackConnectorSetting](/images/connectors/slack/SlackConnectorSetting.png)
## Troubleshooting

3. Set the **Workspace ID** (see below) and click **Connect**.
If you need to **reindex**, **pause**, **update the credentials**, **configuration**, or update the **frequencies** of the connector, click on the existing connector and see the following options

![SlackId](/images/connectors/slack/SlackId.png)
Revisit the **How it Works** at the top of this page to understand OnyxConnector's authorizations

**Note:** The first indexing pulls all of the public channels and takes longer than future updates.
**Note:** The first indexing pulls all of the public channels and takes longer than future updates.
99 changes: 99 additions & 0 deletions connectors/slack_connector.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,99 @@
---
title: "Slack Bot Setup"
description: "How to set up a Slack bot to automatically answer questions"
icon: "slack"
---

## How it works

The Onyx Slack Connector allows Onyx to index and make Slack conversations searchable. It enables Onyx to retrieve messages from both public and private Slack channels (only if the bot is manually added to private ones).

Once connected, you can:

Search for Slack messages directly within Onyx.
Automatically index new messages in selected channels.
Ensure seamless retrieval of both public and private Slack conversations to enhance knowledge discovery.

## Setting up

### Creating an App

**Note: You must be an admin of the Slack workspace to set up the connector**

1. Navigate and sign in to https://api.slack.com/apps.
2. Create a new Slack app:
- Click the **Create New App** button on the top right.
- Select the **From a manifest** option.
- Select the relevant workspace from the dropdown and click **Next**.

![images/Screenshot2025-03-18135430.png](/Create&Manifest.png)

1. Select the "YAML" tab, paste the following manifest into the text box, and click **Next**, then **Create**:

```
display_information:
name: OnyxConnector
description: ReadOnly Connector for indexing Onyx
features:
bot_user:
display_name: OnyxConnector
always_online: false
oauth_config:
scopes:
bot:
- channels:history
- channels:read
- groups:history
- groups:read
- channels:join
- im:history
- users:read
- users:read.email
- usergroups:read
settings:
org_deploy_enabled: false
socket_mode_enabled: false
token_rotation_enabled: false
```

### OAuth & Permissions

1. Once the app has been created, navigate to the **OAuth & Permissions** tab under the **Features** header.
2. Find the block that says **OAuth Tokens and click Install to (workspace)**
3. Copy the **Bot User OAuth Token**

![OAuth & Copy](/images/slack_connector/OAuth&Copy.png)

### Onyx Admin

1. Login to https://www.onyx.app/ and proceed to the **Admin Panel**

![Onyx Admin Panel](/images/slack_connector/OnyxAdminPanel.png)

2. Click on **Add Connector** and search for **Slack**

![Add Connector](/images/slack_connector/AddConnector.png)

3. Click on **Create New**

![Create New](/images/slack_connector/CreateNew.png)

4. Create a **name **and **paste your OAuth Token** from **OAuth & Permissions Step 3** then **click Create**

![Slack Bot Token Add](/images/slack_connector/SlackBotTokenAdd.png)

5. Configure your connector, then click **Create Connector +**

![Connector Creation](/images/slack_connector/Screenshot2025-03-18140958.png)

6. Verify that the connector has **successfully synced**

![Connector Synced](/images/slack_connector/Screenshot2025-03-18142459.png)

## Troubleshooting

If you need to **reindex**, **pause**, **update the credentials**, **configuration**, or update the **frequencies** of the connector, click on the existing connector and see the following options

Revisit the **How it Works** at the top of this page to understand OnyxConnector's authorizations

**Note:** The first indexing pulls all of the public channels and takes longer than future updates.
1 change: 1 addition & 0 deletions documentation
Submodule documentation added at 3e2460
Binary file added images/slack_connector/AddConnector.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/slack_connector/Create&Manifest.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/slack_connector/CreateNew.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/slack_connector/OAuth&Copy.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/slack_connector/OnyxAdminPanel.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/slack_connector/SlackBotTokenAdd.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.