> For the complete documentation index, see [llms.txt](https://doc.duaer.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://doc.duaer.com/knowledge/sources/slack.md).

# Connect Slack to the Duaer knowledge base

Index the last 30 days of chosen Slack channels, threads included: public channels for the workspace, private ones for their members only. Employees can also mention Duaer or message it directly.
## What Duaer reads in Slack

- The channels the app is invited to and you tick under Channels to index.
- The last 30 days of messages, threads included, one item per channel and day.
- Up to 200 channels.

## Connect Slack

1. Create a Slack app for your workspace with the bot scopes channels:read, groups:read, channels:history, groups:history, users:read and users:read.email; for the bot and the daily digest also app_mentions:read, im:history and chat:write. Install it to the workspace.
2. In Duaer, create a Slack API credential with the app’s bot token (xoxb-), and put its Signing Secret in the Signature Secret field. A Slack OAuth2 API credential also works.
3. As an owner or admin, open Data sources in the sidebar, select Add source and choose Slack, choose Knowledge source under Add as, then choose the credential and click Connect.
4. In Slack, invite the app to each channel to index (send /invite @YourApp in the channel). Back on the source, tick the channels under Channels to index and click Save channels.

## Who finds which channel

Members are matched to Slack users by email. Public channels are found by everyone in the workspace; private channels only by their members. When someone joins or leaves a channel, it takes effect within a minute with the bot’s events, else within 10 minutes.

## How soon changes show

- New messages are read every 10 minutes.
- Channel members are all read again once a day, and member events start a read at once.

## Ask Duaer in Slack

1. The credential needs the bot token (xoxb-) and the Signing Secret. On the Slack source, turn on Ask Duaer in Slack.
2. Paste the Event Subscriptions request URL into the Slack app under Event Subscriptions, and subscribe to the bot events app_mention, message.im, member_joined_channel and member_left_channel.
3. Paste the Interactivity request URL under Interactivity & Shortcuts, so Helpful, Not helpful and the Run buttons work.
4. Employees mention it in a channel, or message it directly.

Answers cite their sources and use only what the person asking may open. When they ask it to do something, it sends Run and Cancel buttons.

## Limits

- The last 30 days only, and up to 200 channels.
- Only channels the app is in can be chosen.
- When the app lacks a scope, the source names it; add it, then reinstall the app to the workspace.
## Questions

### Why is a channel missing from the list?

The app is not in that channel yet. Send /invite @YourApp in the channel, then reload the source. See also [Fix Slack not_in_channel](/troubleshooting/slack-not-in-channel.md).

### Who finds messages from a private channel?

Only that channel’s members. Someone who leaves the channel stops finding them.

### Can Duaer read Slack messages older than 30 days?

No. The knowledge base keeps the last 30 days, and older days leave it.

## Related

- [Knowledge sources you can connect to Duaer](https://doc.duaer.com/knowledge/sources.md)
- [Roll out Duaer to your company: the admin checklist](https://doc.duaer.com/knowledge/set-up.md)
- [Connect Microsoft Teams to the Duaer knowledge base](https://doc.duaer.com/knowledge/sources/microsoft-teams.md)
- [Fix Slack not_in_channel and channel_not_found in Duaer](https://doc.duaer.com/troubleshooting/slack-not-in-channel.md)
- [Permission-aware enterprise AI search: how Duaer keeps document access intact](https://doc.duaer.com/guides/permission-aware-ai-search.md)

