feishu-drive
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseFeishu Drive Tool
飞书云盘工具
Single tool for cloud storage operations.
feishu_drive用于云存储操作的独立工具。
feishu_driveToken Extraction
Token提取
From URL → =
https://xxx.feishu.cn/drive/folder/ABC123folder_tokenABC123从URL 中提取 → =
https://xxx.feishu.cn/drive/folder/ABC123folder_tokenABC123Actions
操作指令
List Folder Contents
列出文件夹内容
json
{ "action": "list" }Root directory (no folder_token).
json
{ "action": "list", "folder_token": "fldcnXXX" }Returns: files with token, name, type, url, timestamps.
json
{ "action": "list" }根目录(无需folder_token)。
json
{ "action": "list", "folder_token": "fldcnXXX" }返回结果:包含token、名称、类型、链接、时间戳的文件信息。
Get File Info
获取文件信息
json
{ "action": "info", "file_token": "ABC123", "type": "docx" }Searches for the file in the root directory. Note: file must be in root or use to browse folders first.
listtypedocdocxsheetbitablefolderfilemindnoteshortcutjson
{ "action": "info", "file_token": "ABC123", "type": "docx" }在根目录中搜索文件。注意:文件必须位于根目录,或需先使用指令浏览文件夹。
listtypedocdocxsheetbitablefolderfilemindnoteshortcutCreate Folder
创建文件夹
json
{ "action": "create_folder", "name": "New Folder" }In parent folder:
json
{ "action": "create_folder", "name": "New Folder", "folder_token": "fldcnXXX" }json
{ "action": "create_folder", "name": "New Folder" }在指定父文件夹中创建:
json
{ "action": "create_folder", "name": "New Folder", "folder_token": "fldcnXXX" }Move File
移动文件
json
{ "action": "move", "file_token": "ABC123", "type": "docx", "folder_token": "fldcnXXX" }json
{ "action": "move", "file_token": "ABC123", "type": "docx", "folder_token": "fldcnXXX" }Delete File
删除文件
json
{ "action": "delete", "file_token": "ABC123", "type": "docx" }json
{ "action": "delete", "file_token": "ABC123", "type": "docx" }File Types
文件类型
| Type | Description |
|---|---|
| Old format document |
| New format document |
| Spreadsheet |
| Multi-dimensional table |
| Folder |
| Uploaded file |
| Mind map |
| Shortcut |
| 类型 | 描述 |
|---|---|
| 旧版格式文档 |
| 新版格式文档 |
| 电子表格 |
| 多维表格 |
| 文件夹 |
| 已上传文件 |
| 思维导图 |
| 快捷方式 |
Configuration
配置
yaml
channels:
feishu:
tools:
drive: true # default: trueyaml
channels:
feishu:
tools:
drive: true # 默认值: truePermissions
权限
- - Full access (create, move, delete)
drive:drive - - Read only (list, info)
drive:drive:readonly
- - 完全访问权限(创建、移动、删除)
drive:drive - - 只读权限(列出、查看信息)
drive:drive:readonly
Known Limitations
已知限制
- Bots have no root folder: Feishu bots use and don't have their own "My Space". The root folder concept only exists for user accounts. This means:
tenant_access_token- without
create_folderwill fail (400 error)folder_token - Bot can only access files/folders that have been shared with it
- Workaround: User must first create a folder manually and share it with the bot, then bot can create subfolders inside it
- 机器人无个人根文件夹:飞书机器人使用,无专属“我的空间”。根文件夹概念仅适用于用户账号。这意味着:
tenant_access_token- 不带调用
folder_token会失败(400错误)create_folder - 机器人仅能访问已共享给它的文件/文件夹
- 解决方法:用户需先手动创建文件夹并共享给机器人,之后机器人可在该文件夹内创建子文件夹
- 不带