Feishu File Send Skill
通过飞书发送文件(图片、音频、文档等)。
发送方法
使用 message 工具(推荐)
# 发送图片
message(action="send", channel="feishu", media="/absolute/path/to/image.png", target="ou_xxxxxxxx", caption="图片描述")
# 发送文件(HTML、PDF、音频等)
message(action="send", channel="feishu", media="/absolute/path/to/file.pdf", target="ou_xxxxxxxx", caption="文件描述")
关键参数
action: 必须为"send"channel: 必须为"feishu"target: 接收者的 open_id(阿Sir的 open_id: ou_8c6cfb7fef764d06b74805e4fed56065)media: 文件绝对路径file_path: 文件路径(别名)path: 文件路径(别名)caption: 文件描述(可选)
重要规则
-
文件必须在 workspace 目录
- 不要用
/tmp/路径发送 - 先复制到 workspace 再发送
- 不要用
-
使用绝对路径
- 推荐:
D:\Documents\openclaw\workspace\filename - 或:
C:\Users\用户名\.openclaw\workspace\filename
- 推荐:
-
使用
media、file_path或path参数发送文件- 不要用
message参数发送文件!用户将无法收到!
- 不要用
阿Sir 的飞书信息
- open_id: ou_8c6cfb7fef764d06b74805e4fed56065
- 发送目标通常是自己
示例
发送图片
message(action="send", channel="feishu", media="D:\Documents\openclaw\workspace\screenshot.png", target="ou_8c6cfb7fef764d06b74805e4fed56065", caption="屏幕截图")
发送录音
message(action="send", channel="feishu", media="D:\Documents\openclaw\workspace\recording.wav", target="ou_8c6cfb7fef764d06b74805e4fed56065", caption="录音文件")
发送文档
message(action="send", channel="feishu", media="D:\Documents\openclaw\workspace\report.pdf", target="ou_8c6cfb7fef764d06b74805e4fed56065", caption="报告文档")
故障排除
发送失败
- 检查文件是否存在且路径正确
- 不要用 /tmp/ 路径
- 文件大小是否合理(> 1KB)
- 检查飞书权限
用户收不到
- 确认使用了
media、file_path或path参数 - 不要用
message参数发送文件 - 检查 target 是否为正确的 open_id
