# Slack Messages

Alhena AI can ingest messages from your Slack workspace to train your AI on internal knowledge, support conversations, and team discussions. This allows your AI to answer questions based on information shared in Slack channels.

## How It Works

Once connected, Alhena AI:

* Ingests the **last 6 months** of conversations from your selected Slack channels
* Identifies authoritative answers from key team members you specify
* Refreshes data periodically to keep knowledge current
* Requires read-only access to the channels you select

## Setup Steps

### 1. Connect Your Slack Workspace

1. Go to **AI Settings > Knowledge Base**
2. Click **Ingest from other sources** and choose **Slack**
3. Click **Connect Slack** to authorize the integration
4. Complete the OAuth flow to grant Alhena AI access to your workspace

### 2. Select Channels

After connecting, you'll see a configuration modal:

1. Your connected Slack workspace name will be displayed
2. Use the **Select channels** dropdown to choose which channels Alhena AI should read from
3. You can select multiple channels

### 3. Identify Key Users

Specify which Slack users' messages should be treated as authoritative answers:

1. Use the **Identify key Slack users** field to add team members
2. These are typically support staff, subject matter experts, or team leads
3. Responses from these users will be prioritized when training your AI

### 4. Save and Start Import

Click **Save** to begin the import process. Alhena AI will fetch the last 6 months of conversations from your selected channels.

## Permissions

Alhena AI requires read-only access to fetch messages from Slack channels. If you encounter permission issues:

### Missing Channel Access

If Alhena AI cannot read from certain channels, you need to invite the Alhena AI app to those channels:

1. Open the Slack channel
2. Type `/invite @Alhena` or add the Alhena AI app to the channel
3. Retry the configuration in the Alhena dashboard

### Re-authorization Required

If Slack permissions have been updated, you may need to re-authorize the integration:

1. Click **Re-authorize** when prompted
2. Complete the OAuth flow again to grant updated permissions

## Best Practices

* **Select relevant channels** - Choose channels where support questions are answered or product knowledge is shared
* **Identify the right experts** - Add users who consistently provide accurate, helpful responses
* **Review channel content** - Ensure selected channels don't contain sensitive information you don't want the AI to learn from
* **Keep channels focused** - Channels with clear, on-topic discussions produce better training data than noisy general channels

## Data Refresh

Slack data is refreshed periodically to keep your AI's knowledge current. New messages from your selected channels will be incorporated during scheduled training updates.


---

# 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://alhena.gitbook.io/docs/ai-configuration/data-sources/slack-messages.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.
