SuperAPI AI Directory

feishu-doc

Office & productivity

View repository

Updated 10-15 17:34

About this skill

Feishu Doc Skill

Quick Index

Document Operations

User Intent module tool_action Required Parameters
Create Document doc create Nullable (title recommended)
Read Document doc read document_id
Read Document Content doc read_content document_id
Write Markdown doc write_markdown document_id, content (or markdown)
List Document Blocks doc list_blocks document_id
Update Text Block doc update_block_text document_id, block_id, content

Wiki Operations

User Intent module tool_action Required Parameters
List Knowledge Spaces wiki list_spaces -
List Nodes wiki list_nodes space_id
Create Node wiki create_node space_id, title
Get Node wiki get_node space_id, node_token

Call Examples

Create Document

python3 skills/feishu-cli/run.py '{
  "action": "tool",
  "module": "doc",
  "tool_action": "create",
  "title": "Q1 工作总结",
  "folder_token": "fldcnXXXX"
}'

Read Document Content

python3 skills/feishu-cli/run.py '{
  "action": "tool",
  "module": "doc",
  "tool_action": "read_content",
  "document_id": "doccnXXXX"
}'

Write Markdown Content

python3 skills/feishu-cli/run.py '{
  "action": "tool",
  "module": "doc",
  "tool_action": "write_markdown",
  "document_id": "doccnXXXX",
  "content": "## 概述\n\n本季度完成了以下关键目标:\n\n1. 项目 A 上线\n2. 性能优化 30%"
}'

Wiki Operations

# 列出知识空间
python3 skills/feishu-cli/run.py '{"action":"tool","module":"wiki","tool_action":"list_spaces"}'

# 列出节点
python3 skills/feishu-cli/run.py '{"action":"tool","module":"wiki","tool_action":"list_nodes","space_id":"7xxx"}'

Core Constraints

Document ID Sources

  • Extract from URL:https://xxx.feishu.cn/docx/doccnXXXX → document_id = "doccnXXXX"
  • Wiki URL: first use wiki get_node to get obj_token, then use as document_id Use
  • API returns: after creating a document, returns

Differences Between Lark Markdown and Standard Markdown

The Markdown supported by Feishu docs is Lark-flavored, with some differences from standard GFM:

  • Headings: supports # to ######
  • Code Blocks: supports ```language syntax
  • Tables: use | col1 | col2 | standard table syntax
  • Task Lists: use - [ ] and - [x]
  • Blockquotes: use > prefix
  • Special Blocks: supports callout、grid、mermaid、plantuml , etc.

Permissions and Default Behavior

  • Reading requires docx:document:readonly scope
  • Writing requires docx:document scope
  • Wiki operations require wiki:wiki -related scopes
  • When creating a document via CLI, it automatically returns url and applink_url
  • After creating a document, the CLI will attempt to grant the current user management permission (full_access)by default, with no additional parameters required; if the current call identity cannot modify collaborator permissions, it will provide in the return manage_permission_warning