feishu-block-ops
Low-level Feishu document block operations via REST API. Use when feishu_doc built-in actions are insufficient: batch update cells, precise position insert, traverse block tree, table row/column manipulation, image replacement, or any operation requiring direct block-level control. Complements feishu-doc, not a replacement.
Install via CLI (Recommended)
clawhub install openclaw/skills/skills/deadblue22/feishu-block-opsFeishu Block Operations
Direct REST API operations for Feishu cloud documents when the feishu_doc tool's built-in actions don't cover your needs.
When to Use This (vs feishu_doc)
| Need | Use |
|---|---|
| Read/write/append document | feishu_doc |
| Create simple table | feishu_doc create_table_with_values |
| Upload image/file | feishu_doc upload_image/upload_file |
| Batch update 200 cells at once | This skill |
| Insert content at exact position | This skill (or feishu-md2blocks) |
| Traverse block tree | This skill |
| Table row/column insert/delete | This skill |
| Merge/unmerge table cells | This skill |
| Replace images in-place | This skill |
| Delete blocks by index range | This skill |
Authentication
Get tenant access token from OpenClaw config:
import json, urllib.request
def get_feishu_token():
with open(os.path.expanduser("~/.openclaw/openclaw.json")) as f:
c = json.load(f)["channels"]["feishu"]
payload = json.dumps({"app_id": c["appId"], "app_secret": c["appSecret"]}).encode()
req = urllib.request.Request(
"https://open.feishu.cn/open-apis/auth/v3/tenant_access_token/internal",
data=payload, headers={"Content-Type": "application/json"}, method="POST")
return json.loads(urllib.request.urlopen(req).read())["tenant_access_token"]
All API calls use header: Authorization: Bearer {token}
Rate Limits
| Operation | Limit |
|---|---|
| Read (GET) | 5 req/sec per app |
| Write (POST/PATCH/DELETE) | 3 req/sec per app, 3 req/sec per document |
Use time.sleep(0.35) between write calls. For reads, time.sleep(0.25).
API Reference
Base URL: https://open.feishu.cn/open-apis/docx/v1/documents
1. Get Block
GET /docx/v1/documents/{doc}/blocks/{block_id}
Returns single block with full content (type, elements, children IDs, styles).
2. Get Children (with optional full tree)
GET /docx/v1/documents/{doc}/blocks/{block_id}/children
?with_descendants=true # get ALL descendants, not just direct children
&page_size=500 # max 500
&document_revision_id=-1 # latest revision
Tip: Use with_descendants=true on table blocks to get all cells + cell content in one call.
3. Create Blocks (simple, flat only)
POST /docx/v1/documents/{doc}/blocks/{parent_id}/children
Body: {"children": [...blocks], "index": 0}
- Max 50 blocks per call
- Cannot create nested structures (e.g. table with cell content)
indexin body: 0=beginning, -1=end (default)
4. Create Nested Blocks (tables, grids, etc.)
POST /docx/v1/documents/{doc}/blocks/{parent_id}/descendant
Body: {
"children_id": ["temp_id_1", "temp_id_2"],
"descendants": [...all_blocks_with_parent_child_relations],
"index": 0
}
Metadata
Not sure this is the right skill?
Describe what you want to build — we'll match you to the best skill from 16,000+ options.
Find the right skillPaste this into your clawhub.json to enable this plugin.
{
"plugins": {
"official-deadblue22-feishu-block-ops": {
"enabled": true,
"auto_update": true
}
}
}Related Skills
feishu-comments
Read comments from Feishu documents. Use when: user asks to check/read/fetch comments on a Feishu doc, review feedback on a document, or collaborate on document revisions via comments.
feishu-api-lookup
Look up Feishu Open API documentation. Activate when: needing to find a specific Feishu API endpoint, understanding API parameters/response, writing scripts that call Feishu APIs, or troubleshooting Feishu API errors. Uses web_search + web_fetch to find and extract API docs in real-time.
feishu-bitable-query
Query Feishu Bitable (多维表格) with server-side filter, sort, field selection, and multiple output formats. Activate when querying bitable records with conditions, filtering multidimensional table data, or when data volume is large and client-side filtering is inefficient. Preferred over feishu_bitable_list_records tool when filter expressions or full pagination is needed.
feishu-thread-forward
Forward Feishu thread/topic to a user, group, or topic via REST API. Activate when: forwarding a thread/topic to another chat, sharing a topic post to a different group, or any scenario involving Feishu thread-level forwarding (转发话题). The built-in feishu message tool does NOT support thread forwarding — this skill fills that gap.
feishu-doc-sync
飞书文档增量同步与表格操作指南。覆盖:表格更新策略(delete+insert)、header_row 设置、insert action、列宽算法、三阶段 diff 同步。当需要同步本地文档到飞书、操作飞书表格、或做增量编辑时激活。