Token导航 LogoToken导航TokenDH.com
研究检索敏感数据clawhub未标认证来源可访问clear审计通过

feishu-file-upload飞书文件上传

Agent Skill

feishu-file-upload 用于查找、检索和筛选相关信息,适合在 OpenClaw 中需要根据关键词、任务场景或来源线索快速定位候选结果时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

3,818

周安装

164

GitHub Stars

1

下载量

1,338
OpenClaw

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

MIT-0

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:feishu-file-upload(飞书文件上传)
来源仓库:https://github.com/brucezhu888/feishu-file-upload
安装命令:
openclaw skills install feishu-file-upload
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 OpenClaw 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

ClawHubOpenClaw
openclaw skills install feishu-file-upload

简介

上传本地文件并发送到飞书聊天室,需要 ~/.openclaw/openclaw.json 中的飞书应用凭据。

  • 适合在 OpenClaw 中需要根据关键词、任务场景或来源线索快速定位候选结果时使用。
  • 当用户要求发送/共享文件时自动激活此技能。
  • 安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。
  • 适用于研究检索类任务场景。

SKILL.md

name
feishu-file-upload
description
Upload and send local files to Feishu chats. Requires Feishu app credentials (app_id/app_secret) in ~/.openclaw/openclaw.json. Use when user asks to send/share/upload files (CSV, PDF, Excel, images, ZIP) to Feishu. Supports chat_id (groups), open_id/user_id (users), and email recipients.
version
1.0.0
metadata
openclaw
requires
config
env
bins

Feishu File Upload

Upload local files to Feishu Drive and send as file messages to chats or users.

When to Use

  • User asks to "send file", "upload file", or "share file" to Feishu
  • Need to share documents (CSV, PDF, Excel, Word) with group or individual
  • Bot needs to send files that Feishu's native message API doesn't support directly
  • Images/videos: Use media parameter in message tool instead (no need for this skill)

Quick Start

Send to Group Chat

python scripts/upload_to_feishu.py /path/to/file.csv oc_xxxxxx --type chat_id

Send to Individual User

python scripts/upload_to_feishu.py /path/to/file.pdf ou_xxxxxx --type open_id

Send via Email

python scripts/upload_to_feishu.py /path/to/file.zip user@example.com --type email

Use Environment Variable

export OPENCLAW_CHAT_ID=oc_xxxxxx
python scripts/upload_to_feishu.py /path/to/file.csv --env

How It Works

  1. Read credentials from ~/.openclaw/openclaw.json (channels.feishu.appId/appSecret)
  2. Get tenant access token from Feishu Auth API
  3. Upload file to Feishu Drive → returns file_key
  4. Send file message using file_key to target chat/user

Script Usage

Arguments

ArgumentRequiredDefaultDescription
file_pathYes-Absolute path to local file
receive_idYes*-Recipient ID (chat_id, open_id, user_id, or email)
--typeNochat_idRecipient type: chat_id, open_id, user_id, email
--envNofalseGet receive_id from OPENCLAW_CHAT_ID env var

*Not required if --env is used

Receive ID Types

TypeExampleUse Case
chat_idoc_06a6b40e03e98e41c8aebcbed8b09871Group chats (default)
open_idou_b0f83ea276761ab10ebb3f4f277453b8Individual user (recommended)
user_id123456Individual user (by user_id)
emailuser@example.comSend to email address

Extract Chat ID from Feishu Message

From Feishu message metadata:

{
  "conversation_label": "oc_06a6b40e03e98e41c8aebcbed8b09871"
}

receive_id = oc_06a6b40e03e98e41c8aebcbed8b09871, type = chat_id

From sender info:

{
  "sender_id": "ou_b0f83ea276761ab10ebb3f4f277453b8"
}

receive_id = ou_b0f83ea276761ab10ebb3f4f277453b8, type = open_id

Prerequisites

  • Python 3.6+
  • requests library: pip install requests
  • Feishu bot credentials in openclaw.json

Feishu API Permissions

Bot needs these permissions in Feishu Developer Console:

Required for file upload:

  • im:resource:upload - Upload files (preferred)
  • OR im:resource - Read and upload files

Required for sending messages:

  • im:message - Send messages to chats

How to Enable Permissions

  1. Open Feishu Developer Console: https://open.feishu.cn/app/YOUR_APP_ID/auth
  2. Search for im:resource:upload or im:resource
  3. Click "Apply" and enable the permission
  4. Wait a few minutes for permission to take effect

Quick link: https://open.feishu.cn/app/cli_a94a21db99385bd8/auth?q=im:resource:upload,im:resource

File Size Limits

  • Single file: 30MB max (Feishu API limit)
  • Large files may take longer to upload

Supported File Types

All file types supported by Feishu Drive:

CategoryExtensions
DocumentsPDF, DOC, DOCX, XLS, XLSX, PPT, PPTX
ImagesJPG, PNG, GIF, WEBP
ArchivesZIP, RAR, 7Z
Code/TextTXT, MD, JSON, CSV, XML, PY, JS
MediaMP3, MP4, WAV (auto-converted to OPUS)

Error Handling

Script handles:

  • Missing credentials → Error message
  • File not found → Error message
  • Upload failure → API error details
  • Send failure → API error details
  • Missing permissions → Clear error with fix link

Testing

# Test with a small file to a group chat
python scripts/upload_to_feishu.py /tmp/test.txt oc_xxxxxx --type chat_id

# Test sending to yourself (find your open_id from message metadata)
python scripts/upload_to_feishu.py /tmp/test.pdf ou_xxxxxx --type open_id

Troubleshooting

"Access denied" / "99991672"

  • Bot lacks im:resource:upload or im:resource permission
  • Open: https://open.feishu.cn/app/cli_a94a21db99385bd8/auth?q=im:resource:upload,im:resource
  • Enable permission and wait a few minutes

"Bot/User can NOT be out of the chat (230002)"

  • Bot is not a member of the target group chat
  • Add bot to the chat, or send to a different chat

"Invalid receive_id"

  • Check the ID format matches the type
  • chat_id starts with oc_
  • open_id starts with ou_
  • user_id is numeric
  • email must be valid email format

Upload fails for large files

  • Feishu API limit is 30MB
  • Compress file or use Feishu Drive web interface for larger files

Alternative: Manual Upload

If script fails, user can manually:

  1. Upload file to Feishu Drive via web/app
  2. Share file with the chat
  3. Bot can then reference the file

Security Notes

  • Credentials read from openclaw.json (local only)
  • Token expires after ~2 hours (auto-refreshed each run)
  • Files uploaded to Feishu Drive follow Feishu's security policies
  • Script does not store or transmit credentials

Comparison with Message Tool

FeatureThis SkillMessage Tool media
Documents (PDF, CSV, etc.)✅ Supported❌ Not supported
Images✅ Supported✅ Supported (easier)
Videos✅ Supported✅ Supported (easier)
File size limit30MBVaries by platform
Complexity2 API calls1 API call

Recommendation: Use media parameter for images/videos, use this skill for documents and other files.

适合场景

01

OpenClaw 用户查找和安装 Skill 时

02

用户想查找某类 Agent Skill 时

03

需要根据任务场景推荐可安装能力包时

04

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

补充不同宿主或平台的使用分布数据

能力 5

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

OpenClaw

73.16%
按下载量换算979

安全审计

VirusTotal

通过

ClawScan

通过

Static analysis

通过

权限和风险

敏感数据

该 Skill 可能接触密钥、Token、环境变量或敏感配置,应进入高风险复核队列,默认不自动发布。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills