Index the message history of Slack channels, one thread at a time.
You can no longer add a Slack source from the dashboard. This page is for Slack sources added earlier. They keep syncing, and you can still change their settings.
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.
1

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.
2

Install the app

Install the app to your workspace and copy the Bot User OAuth Token. It starts with xoxb-.
3

Invite the bot

In every channel you want indexed, run /invite @your-app. Kelu reads only channels the bot is in.
4

Enter the token

In Kelu, open the source’s Configuration tab and click Edit. Paste the token in Bot token and click Save changes.
Chat history often holds things you would not publish. A Slack source belongs in an internal knowledge base: its documents then answer your team and your chat bots, but not your widget or public API. In an external knowledge base, every thread is public.

Options

All of these are on the source’s Configuration tab, with the Bot token.
OptionDefaultWhat it does
ChannelsEmptyChannel 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 channelsOffAlso indexes private channels the bot is in. Needs groups:read and groups:history. Ignored when Channels is filled in.
Threads opened withinEmptyOnly threads started in the last N days. Empty reads the whole history.
Trusted usersEmptyUser IDs or handles, for example U024BE7LH, @alice. The people whose replies you trust.
Only threads a trusted user answeredOffDrops every thread no trusted user replied to. Ignored while Trusted users is empty.
Exclude usersEmptyUser 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, answered or correct). 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-app in 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.