Skip to main content
The Slack resource exposes a Slack workspace as a virtual filesystem mounted at some prefix such as /slack/. For token setup, see Slack Setup.

Config

Filesystem Layout

Example:
Directory names embed the Slack ID so that write commands (slack send-message --channel, etc.) can reference the correct resource without extra lookups.

Channels

/slack/channels/ lists public and private channels the bot has access to. The channel ID is appended after __. Each channel directory contains day-partitioned directories for the last 90 days (or since channel creation, whichever is shorter). Each date directory contains chat.jsonl plus a files/ directory for attachments shared that day. The date range is derived from the channel’s created timestamp.

DMs

/slack/dms/ lists direct message conversations. The DM ID is appended after __. Like channels, DM directories contain daily directories with chat.jsonl and files/.

Users

/slack/users/ lists one .json file per non-deleted, non-bot user. Reading a user file calls get_user_profile() and returns the full profile JSON from the Slack API.

Cache

The Slack resource uses IndexCacheStore (same as Discord and other resources). Index entries store channel IDs, DM IDs, user IDs, and channel creation timestamps for date range computation. There is no separate content cache - file content caching is handled by the workspace IOResult mechanism.

Example

See examples/python/slack/slack.py for the full working example.

Finding IDs

Resource-specific commands require Slack IDs (channel_id, user_id, ts). These can be extracted from the filesystem:

Working with Large Channels

Channels with many messages produce large chat.jsonl files per day. Tips for efficient access:

Shell Commands

Standard commands available on the mounted Slack tree: Acting on Slack (sending, reacting, pins, member info, search) goes through the slack CLI when installed; the mounted tree stays read-oriented. The <name>__<id> path segments supply the channel and user IDs the CLI flags take.