AI 驱动的一站式 Slack 工作流自动化
简介
通过 OpenClaw 直接操控 Slack,支持消息收发、表情回复、置顶管理、成员查询等完整工作流,需配置 bot token 权限。
原始描述
Use when you need to control Slack from OpenClaw via the message tool, including reacting to messages or pinning/unpinning items in Slack channels or DMs.
通过你的 Agent 添加
安装目录:slack/(目录名取自 SKILL.md 的 frontmatter name,不是 URL 里的 slug)。
点「快速安装」复制一段指令贴给你的 Agent:它会先下载到 /tmp、把文件清单和校验值给你看,你确认之后才解压安装。不会一步装完、也不改系统其它位置。
或者手动安装
包是「根级 SKILL.md + 作者附带的文件」,解压到上面的 <slug>/ 目录即可;
目录名不用换,也不要把包直接解压到 skills 根目录。
技能申请的权限由作者决定:装之前先看清单里有没有脚本、它会读写什么。
中文使用说明 来自收录源
核心用法
Slack 技能是 OpenClaw 平台与 Slack 工作空间深度集成的桥接工具,允许 AI 代理执行完整的频道与私信操作。核心能力覆盖四大模块:
消息管理:支持发送(send)、读取(read)、编辑(edit)、删除(delete)消息,可定向到公开频道(C123 格式)或指定用户(<@U123> 格式)。
互动反馈:通过 react 和 reactions 动作为消息添加表情反馈(支持 Unicode 或 :name: 格式),reactions 可列出某条消息的全部表情回应。
内容置顶:pin/unpin/list-pins 组合管理频道内的关键信息沉淀,适合标记决策记录或重要公告。
组织洞察:member-info 查询用户档案(真实姓名、邮箱、时区、状态),emoji-list 获取工作区自定义表情库。
显著优点
- 原生集成深度:基于 Socket Mode 实时事件+Bot Token 双机制,既保证低延迟响应,又支持全量写操作。
- 上下文复用:自动暴露
slack message id和channel字段,实现跨工具链的会话连续性。 - 灵活定向:支持频道广播、@全员、单用户 DM 三级触达策略。
潜在局限
- 权限依赖重:
im:write等敏感 scope 需管理员显式授权,DM 功能在受限配置下可能失效。 - ID 可读性差:Slack 的
C123/U123/1712023032.1234格式对用户不友好,需借助上下文或反复查询。 - 无原生搜索:缺少全局消息检索能力,依赖
read的limit参数做局部遍历。
适合人群
- 需将 AI 代理接入现有 Slack 工作流的开发团队
- 希望自动化站会同步、任务状态反馈的项目管理者
- 需要批量查询成员信息或管理频道置顶内容的运营人员
常规风险
- Token 泄露:Bot Token 具备频道写权限,配置泄露可导致垃圾消息发送或敏感信息外泄。
- 误触全员通知:
@everyone或<@UserID>格式使用不当可能触发大规模通知骚扰。 - 消息不可恢复:
delete操作不可逆,且无回收站机制。
技能正文
name: slack description: Use when you need to control Slack from OpenClaw via the message tool, including reacting to messages or pinning/unpinning items in Slack channels or DMs. metadata: { "openclaw": { "emoji": "💬", "requires": { "config": ["channels.slack"] } } }
Slack Actions
Overview
Use the message tool with these actions to control Slack: send, react, reactions, read, edit, delete, download-file, pin, unpin, list-pins, member-info, emoji-list. The tool uses the bot token configured for OpenClaw.
Inputs to collect
channelId(e.g.C123) andmessageId(Slack message timestamp, e.g.1712023032.1234).- For reactions, an
emoji(Unicode or:name:). - For message sends, a
totarget (channel:<id>likeC123or user mention<@U123>).
Message context lines include slack message id and channel fields you can reuse directly.
Actions
Action groups | Default | Notes
| Action group | Default | Notes |
|---|---|---|
| reactions | enabled | React + list reactions |
| messages | enabled | Read/send/edit/delete |
| pins | enabled | Pin/unpin/list |
| memberInfo | enabled | Member info |
| emojiList | enabled | Custom emoji list |
Common Patterns
Send a message to a channel
/message
action: send
channel: slack
to: C123
message: Hello @everyone!
Send a message to a specific user
/message
action: send
channel: slack
to: <@U123>
message: Hi there!
React to a message
/message
action: react
channelId: C123
messageId: 1712023032.1234
emoji: ✅
List reactions on a message
/message
action: reactions
channelId: C123
messageId: 1712023032.1234
Edit a message
/message
action: edit
channelId: C123
messageId: 1712023032.1234
message: Updated text
Delete a message
/message
action: delete
channelId: C123
messageId: 1712023032.1234
Read recent messages from a channel
/message
action: read
channelId: C123
limit: 20
Pin a message
/message
action: pin
channelId: C123
messageId: 1712023032.1234
Unpin a message
/message
action: unpin
channelId: C123
messageId: 1712023032.1234
List pinned messages in a channel
/message
action: list-pins
channelId: C123
Get member info by user ID
/message
action: member-info
userId: U123
Returns: real_name, display_name, email, avatar URLs, timezone, profile status, etc.
List custom emojis
/message
action: emoji-list
Tips & Gotchas
- Mention format: Use
<@U...>instead of@Nameto ensure Slack parses the mention correctly. - Member lookup: If you don't know a user's ID, check recent message context or project board assignee fields. You can also use
member-infoonce you have any guessable ID. - DM policy: Direct messages require
im:writescope and may need explicit pairing if your channel config is restrictive. - Socket Mode vs Bot API: OpenClaw uses Socket Mode for real-time events; all write operations go through bot token scopes.
Ideas to try
- React with ✅ to mark completed tasks.
- Pin key decisions or weekly status updates.
- Introduce yourself using
<@UserID>to trigger notifications. - Monitor channel activity with periodic
readcalls.
正文来自原始发布页, 版权归作者所有,许可未标注。 权利人认为有不妥,可申请下架。