Feishu File Send

Other

发送文件到飞书。当用户提到"发送文件到飞书"、"发送图片到飞书"、"飞书发文件"、"发送录音到飞书"等时使用。 支持图片、音频、文档等任意文件类型。

Install

openclaw skills install lhq-feishu-send-file

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: 文件描述(可选)

重要规则

  1. 文件必须在 workspace 目录

    • 不要用 /tmp/ 路径发送
    • 先复制到 workspace 再发送
  2. 使用绝对路径

    • 推荐:D:\Documents\openclaw\workspace\filename
    • 或:C:\Users\用户名\.openclaw\workspace\filename
  3. 使用 mediafile_pathpath 参数发送文件

    • 不要用 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)
  • 检查飞书权限

用户收不到

  • 确认使用了 mediafile_pathpath 参数
  • 不要用 message 参数发送文件
  • 检查 target 是否为正确的 open_id