This source reads what was said in Slack. To answer questions inside Slack, set up the Slack bot. You can use both.
Change the settings
You need permission to edit sources in the knowledge base. Open the source, go to its Configuration tab and click Edit. Change the settings and click Save changes. Leave Bot token empty to keep the stored one. Changes apply on the next sync. Click Sync Now to apply them at once.Replace the bot token
The source already holds a token. To replace it, for example to add a scope, you need permission to manage the Slack app in your Slack workspace.Set up the Slack app
At api.slack.com/apps, open your app, or create one for your workspace. Under OAuth & Permissions, add these bot token scopes:
channels:read, channels:history, users:read and team:read. For private channels, also add groups:read and groups:history.Install the app
Install the app to your workspace and copy the Bot User OAuth Token. It starts with
xoxb-.Invite the bot
In every channel you want indexed, run
/invite @your-app. Kelu reads only channels the bot is in.Options
All of these are on the source’s Configuration tab, with the Bot token.| Option | Default | What it does |
|---|---|---|
| Channels | Empty | Channel IDs, comma-separated, for example C0123456, C0789012. Empty indexes every public channel the bot is in. Archived channels are skipped. A private channel needs groups:read and groups:history. |
| Include private channels | Off | Also indexes private channels the bot is in. Needs groups:read and groups:history. Ignored when Channels is filled in. |
| Threads opened within | Empty | Only threads started in the last N days. Empty reads the whole history. |
| Trusted users | Empty | User IDs or handles, for example U024BE7LH, @alice. The people whose replies you trust. |
| Only threads a trusted user answered | Off | Drops every thread no trusted user replied to. Ignored while Trusted users is empty. |
| Exclude users | Empty | User IDs or handles, for example @ci-bot. Their messages are dropped, the rest of the thread is kept. |
What gets indexed
- One document per thread. A message with no replies is its own document.
- The title is
#channel: first line of the opening message. The citation links to that message. - The document holds the question, then the accepted answer, then the rest of the discussion, each with author and date.
- The accepted answer is the reply marked with a check-mark emoji (✅ ✔️ ☑️, or a custom emoji named
solved,resolved,answeredorcorrect). With none, it is the reply with the most reactions. A trusted user’s reply wins a tie. If replies still tie, none is marked. Among several check-marked replies, the most reactions win, then a trusted user, then the earliest reply. - Join, leave and topic-change messages are skipped.
Sync
Slack re-syncs every 6 hours. Click Sync Now on the source page to sync right away.Troubleshooting
- The sync fails with
not_in_channel. You named a channel the bot is not in. Run/invite @your-appin it, then sync. - The sync fails with
missing_scope. Add the missing scopes, reinstall the app, and paste the new token on the Configuration tab. - A channel is not indexed. With Channels empty, Kelu reads only channels the bot is in, and skips archived and private ones (unless Include private channels is on).
- Authors show as user IDs. The token is missing
users:read. - Citations open a Slack redirect, not the message. The token is missing
team:read. - Nothing is indexed with Only threads a trusted user answered on. No trusted user replied in any thread. Check the names in Trusted users.