Files
nexus/summary_openclaw_Slack.md
2026-04-19 14:51:38 +08:00

80 lines
2.6 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# Slack 配置 OpenClaw Bot — 结构化摘要
## 文档概述
- **来源**`/Users/weishen/Workspace/nexus/openclaw/Slack.md`
- **主题**:在 Slack API 创建 App 并与 OpenClaw 集成的完整步骤
- **包含内容**:配置流程 + 现有 Bot 凭证信息
---
## 一、配置流程6 步)
| 步骤 | 操作 | 关键产物 |
|------|------|----------|
| 1 | Slack API 创建 AppFrom app manifest | App Manifest JSON |
| 2 | 安装 App 到工作区 | Bot User OAuth Token`xoxb-...` |
| 3 | 生成 App Level Token | App Level Token`xapp-1-...` |
| 4 | 添加 Channel 到 OpenClaw | `openclaw channels add --channel slack ...` |
| 5 | 绑定 Agent 到 Slack 账号 | `openclaw agents bind --agent ... --bind slack:...` |
| 6 | 验证连接 | 发送私信或 @Bot 确认响应 |
### Manifest JSON 关键配置
- **Socket Mode**:启用(`socket_mode_enabled: true`
- **Interactivity**:启用
- **Event Subscriptions**app_mention、message.channels/groups/im/mpim、reaction_added/removed 等
- **OAuth Scopes**:涵盖 im、chat、channels、groups、files、reactions、pins、users 等全部权限
---
## 二、现有 Bot 配置
### XingShu
| 项目 | 值 |
|------|---|
| Account | `xingshu` |
| Bind Agent | `main` |
| Bot Token | `xoxb-10749198837424-10729993030356-fZMcpT9AwVYjpZAoALh9G3Pf` |
| App Token | `xapp-1-A0ALWUV7P7H-10720045898595-6d84e6b3c450587efe928459ab3ccfdefac2f7cb506ff741aabce688977644e8` |
### XingYao
| 项目 | 值 |
|------|---|
| Account | `xingyao` |
| Bind Agent | `xingyao` |
| Bot Token | `xoxb-10749198837424-10717815209651-z0T78ljkOGeNddAWcajl2Wxg` |
| App Token | `xapp-1-A0AMDPLP99A-10722160508566-6cedd2c05c0a338435aaab98c9449ef01437b315b049850ba574ff67c1fbd68b` |
### XingHui
| 项目 | 值 |
|------|---|
| Account | `xinghui` |
| Bind Agent | `xinghui` |
| Bot Token | `xoxb-10749198837424-10724815197190-kEkxZmkBKQrYnY8Ov2hadu3O` |
| App Token | `xapp-1-A0AMCRT5E10-10720526191091-9ed0aff401f0feb16994d9d20a5256b6417fa83e0b743c1d63f8a8838fba822f` |
---
## 三、关键命令速查
```bash
# 添加 Slack Channel
openclaw channels add --channel slack --account <账号名> --bot-token <Bot Token> --app-token <App Token>
# 绑定 Agent
openclaw agents bind --agent <agent名称> --bind slack:<账号名>
```
---
## 四、注意事项
- 所有 Bot 均使用 **Socket Mode**(无需公网 Webhook
- App Level Token 必须添加 `connections:write` 权限
- Bot OAuth Scopes 包含 24 个权限,建议仔细评估后使用
- 凭证信息已脱敏保存在此摘要,原始文件含完整 token
## 信息图
![信息图](./summary_openclaw_Slack_infographic.jpg)