← 返回
未分类 Key

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...
OpenClaw 代理操作指南:通过 API 创建、读取和编辑飞书/Lark 文档。适用场景:(1) 新建飞书文档并写入内容;(2) 读取已有文档内容。
jmin1113
未分类 clawhub v1.0.0 1 版本 100000 Key: 需要
★ 0
Stars
📥 398
下载
💾 0
安装
1
版本
#latest

概述

Agent Feishu Doc Guide

Quick Reference

OperationAPI Endpoint
------------------------
Create docPOST /drive/v1/documents
Get doc metadataGET /drive/v1/documents/{id}
Get doc blocksGET /drive/v1/documents/{id}/blocks
Add blocksPOST /drive/v1/documents/{id}/blocks/{parent_id}/children
Set public permPATCH /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_fetch tool on https://feishu.cn/docx/{doc_id}
  • By ID: Call GET /drive/v1/documents/{id} then /blocks

Prerequisites

  1. Agent's Feishu app must be added as doc collaborator, OR doc set to public
  2. 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.

版本历史

共 1 个版本

  • v1.0.0 当前
    2026-05-07 12:24 安全 安全

安全检测

腾讯云安全 (Keen)

安全,无风险
查看报告

腾讯云安全 (Sanbu)

安全,无风险
查看报告

🔗 相关推荐

JMin Meeting Notes

jmin1113
智能整理会议记录,自动生成结构化会议纪要、待办事项与决策记录,适用于职场人士、会议组织者、项目管理者。
★ 0 📥 476

ComfyUI 多重扩散放大

jmin1113
ComfyUI 多重扩散放大自动化工具,用于放大 AI生成图片、处理高清图像、提升图片分辨率。支持文生图和图生图两种工作流,自动执行三重放大(潜空间放大→区块放大→模型放大)。适用场景:低分辨率 AI 绘画放大至 4K/8K、增强图片细节和
★ 0 📥 382

Prompt Generator Pack

jmin1113
爆款 Prompt 套装。50+ 精选 Prompt 模板,涵盖写作、代码、翻译、头脑风暴、运营文案等场景。复制即用,持续更新。
★ 1 📥 340