/slack/.
For token setup, see Slack Setup.
Config
Filesystem Layout
slack-post-message --channel_id, 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 usesIndexCacheStore (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
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 largechat.jsonl files per day.
Tips for efficient access:
Shell Commands
Standard commands available on the mounted Slack tree:| Command | Notes |
|---|---|
ls | List channels, DMs, users, dates |
cat | Read chat.jsonl, user .json, or files |
head / tail | First/last N lines |
grep / rg | Pattern search (file or directory level) |
jq | Query JSON; use .[] prefix for JSONL |
wc | Line/word/byte counts |
stat | File metadata (name, size, type) |
find | Recursive search with -name, -maxdepth |
tree | Directory tree view |
slack-post-message
Post a message to a channel.
| Option | Required | Description |
|---|---|---|
--channel_id | yes | Slack channel ID |
--text | yes | Message text to send |
slack-reply-to-thread
Reply to a specific thread.
| Option | Required | Description |
|---|---|---|
--channel_id | yes | Slack channel ID |
--ts | yes | Thread parent timestamp |
--text | yes | Reply text |
--ts value is the message timestamp (e.g., from a .jsonl
entry’s ts field). Returns the posted reply JSON.
slack-add-reaction
Add an emoji reaction to a message.
| Option | Required | Description |
|---|---|---|
--channel_id | yes | Slack channel ID |
--ts | yes | Message timestamp to react to |
--reaction | yes | Emoji name (without colons) |
slack-get-users
Search for users by name, real name, or email.
| Option | Required | Description |
|---|---|---|
--query | yes | Search query |
slack-get-user-profile
Get a single user’s full profile.
| Option | Required | Description |
|---|---|---|
--user_id | yes | Slack user ID |
/slack/users/ (e.g., alice__U04K21SEVR9.json).
slack-search
Search messages across the workspace.
| Option | Required | Description |
|---|---|---|
--query | yes | Search query |