feishu-doc
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseFeishu Document Tool
Feishu 文档工具
Single tool with action parameter for all document operations.
feishu_doc通过单个工具 ,结合action参数即可完成所有文档操作。
feishu_docToken Extraction
Token 提取
From URL → =
https://xxx.feishu.cn/docx/ABC123defdoc_tokenABC123def从URL 中提取 → =
https://xxx.feishu.cn/docx/ABC123defdoc_tokenABC123defActions
操作列表
Read Document
读取文档
json
{ "action": "read", "doc_token": "ABC123def" }Returns: title, plain text content, block statistics. Check field - if present, structured content (tables, images) exists that requires .
hintlist_blocksjson
{ "action": "read", "doc_token": "ABC123def" }返回:标题、纯文本内容、区块统计信息。检查字段——如果存在该字段,说明文档中包含表格、图片等结构化内容,需要使用操作来获取。
hintlist_blocksWrite Document (Replace All)
写入文档(全部替换)
json
{ "action": "write", "doc_token": "ABC123def", "content": "# Title\n\nMarkdown content..." }Replaces entire document with markdown content. Supports: headings, lists, code blocks, quotes, links, images ( auto-uploaded), bold/italic/strikethrough.
Limitation: Markdown tables are NOT supported.
json
{ "action": "write", "doc_token": "ABC123def", "content": "# Title\n\nMarkdown content..." }使用Markdown内容替换整个文档。支持:标题、列表、代码块、引用、链接、图片( 会自动上传)、粗体/斜体/删除线。
限制: 不支持Markdown表格。
Append Content
追加内容
json
{ "action": "append", "doc_token": "ABC123def", "content": "Additional content" }Appends markdown to end of document.
json
{ "action": "append", "doc_token": "ABC123def", "content": "Additional content" }在文档末尾追加Markdown内容。
Create Document
创建文档
json
{ "action": "create", "title": "New Document" }With folder:
json
{ "action": "create", "title": "New Document", "folder_token": "fldcnXXX" }json
{ "action": "create", "title": "New Document" }创建到指定文件夹:
json
{ "action": "create", "title": "New Document", "folder_token": "fldcnXXX" }List Blocks
列出区块
json
{ "action": "list_blocks", "doc_token": "ABC123def" }Returns full block data including tables, images. Use this to read structured content.
json
{ "action": "list_blocks", "doc_token": "ABC123def" }返回包含表格、图片在内的完整区块数据。使用此操作读取结构化内容。
Get Single Block
获取单个区块
json
{ "action": "get_block", "doc_token": "ABC123def", "block_id": "doxcnXXX" }json
{ "action": "get_block", "doc_token": "ABC123def", "block_id": "doxcnXXX" }Update Block Text
更新区块文本
json
{ "action": "update_block", "doc_token": "ABC123def", "block_id": "doxcnXXX", "content": "New text" }json
{ "action": "update_block", "doc_token": "ABC123def", "block_id": "doxcnXXX", "content": "New text" }Delete Block
删除区块
json
{ "action": "delete_block", "doc_token": "ABC123def", "block_id": "doxcnXXX" }json
{ "action": "delete_block", "doc_token": "ABC123def", "block_id": "doxcnXXX" }Reading Workflow
读取工作流
- Start with - get plain text + statistics
action: "read" - Check in response for Table, Image, Code, etc.
block_types - If structured content exists, use for full data
action: "list_blocks"
- 先执行——获取纯文本内容和统计信息
action: "read" - 检查响应中的字段,查看是否包含表格、图片、代码等类型
block_types - 如果存在结构化内容,使用获取完整数据
action: "list_blocks"
Configuration
配置
yaml
channels:
feishu:
tools:
doc: true # default: trueNote: depends on this tool - wiki page content is read/written via .
feishu_wikifeishu_docyaml
channels:
feishu:
tools:
doc: true # default: true注意: 依赖此工具——wiki页面的内容通过进行读写。
feishu_wikifeishu_docPermissions
权限
Required: , , ,
docx:documentdocx:document:readonlydocx:document.block:convertdrive:drive所需权限:, , ,
docx:documentdocx:document:readonlydocx:document.block:convertdrive:drive