/install agent-feishu-doc
Agent Feishu Doc Guide
Quick Reference
| Operation | API Endpoint |
|---|---|
| Create doc | POST /drive/v1/documents |
| Get doc metadata | GET /drive/v1/documents/{id} |
| Get doc blocks | GET /drive/v1/documents/{id}/blocks |
| Add blocks | POST /drive/v1/documents/{id}/blocks/{parent_id}/children |
| Set public perm | PATCH /drive/v1/permissions/{id}/public?type=docx |
Workflow
1. Create Document
curl -X POST "https://open.feishu.cn/open-apis/drive/v1/documents" \
-H "Authorization: Bearer {token}" \
-H "Content-Type: application/json" \
-d '{"title": "文档标题"}'
2. Write Content (Block API)
curl -X POST "https://open.feishu.cn/open-apis/drive/v1/documents/{doc_id}/blocks/{block_id}/children" \
-H "Authorization: Bearer {token}" \
-H "Content-Type: application/json" \
-d '{"children": [{"block_type": 2, "text": {"elements": [{"text_run": {"content": "内容"}}]}}]}'
Block types: 2=text, 3=h1, 4=h2, 7=bullet (⚠️ may error, use text instead)
3. Set Public Permissions
curl -X PATCH "https://open.feishu.cn/open-apis/drive/v1/permissions/{doc_id}/public?type=docx" \
-H "Authorization: Bearer {token}" \
-H "Content-Type: application/json" \
-d '{
"link_share_entity": "anyone_editable",
"external_access_entity": "anyone_can_edit",
"security_entity": "anyone_can_edit",
"comment_entity": "anyone_can_edit",
"share_entity": "anyone"
}'
Reading Docs
- By URL: Use
web_fetchtool onhttps://feishu.cn/docx/{doc_id} - By ID: Call GET
/drive/v1/documents/{id}then/blocks
Prerequisites
- Agent's Feishu app must be added as doc collaborator, OR doc set to public
- For cross-agent collaboration: set
tools.sessions.visibility: "all"in openclaw.json
Troubleshooting
- Cannot access doc: Add agent's app as collaborator in Feishu, or set doc to public
- Block API error 9499: Avoid
block_type: 7(bullet), use plain text blocks instead - Cross-agent visibility: Add
"tools": {"sessions": {"visibility": "all"}}to openclaw.json
For detailed API specs, permissions guide, and example workflows, see references/guide.md.
- Make sure OpenClaw is installed (local or Docker)
- Run the install command in chat:
/install agent-feishu-doc - After installation, invoke the skill by name or use
/agent-feishu-doc - Provide required inputs per the skill's parameter spec and get structured output
What is Agent Feishu Doc?
Guide for OpenClaw agents to create, read, and edit Feishu/Lark documents via API. Use when: (1) creating a new Feishu doc and writing content, (2) reading a... It is an AI Agent Skill for Claude Code / OpenClaw, with 91 downloads so far.
How do I install Agent Feishu Doc?
Run "/install agent-feishu-doc" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.
Is Agent Feishu Doc free?
Yes, Agent Feishu Doc is completely free, licensed under MIT-0. You can download, install and use it at no cost.
Which platforms does Agent Feishu Doc support?
Agent Feishu Doc is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).
Who created Agent Feishu Doc?
It is built and maintained by JMin1113 (@jmin1113); the current version is v1.0.0.