Feishu Block Operations for Openclaw

Advanced low-level block management for Feishu cloud documents via direct REST API integration.

deadblue22
v1.0.0
Mar 4, 2026
0
987
0

Install & Download

1. ClawHub CLI

The fastest way to install a skill directly from the registry.

npx clawhub@latest install feishu-block-ops

2. Manual Installation

Copy the skill folder to one of these locations

Global
~/.openclaw/skills/
Workspace
<project>/skills/

Priority: Workspace > Local > Bundled

3. Prompt Installation

Copy this prompt to OpenClaw to install it automatically.

Help me install feishu-block-ops using Clawhub. If Clawhub is not installed, install it first (npm i -g clawhub).

Prefer to download?

Get the raw skill files in a ZIP archive.

What is Feishu Block Operations?

This skill provides granular control over Feishu (Lark) document blocks, extending beyond basic document editing. It allows developers to interact directly with the Feishu Docx API to perform high-precision operations such as traversing complex block trees, manipulating table structures, and executing batch updates.

By leveraging Openclaw Skills, users can automate sophisticated document workflows that require direct block-level manipulation, such as replacing images in-place or performing bulk cell updates. It serves as a powerful technical complement to high-level document tools, providing the precision needed for complex enterprise automation.

Feishu Block Operations Use Cases

  • Performing batch updates on up to 200 table cells simultaneously for automated reporting.
  • Inserting content at exact positions within a document structure using index-based control.
  • Traversing entire block trees to extract specific metadata or content from complex documents.
  • Programmatically merging or unmerging table cells for dynamic layout customization.
  • Replacing images in-place without disrupting the surrounding document flow.

How Feishu Block Operations Works

  1. Retrieve the Feishu tenant access token from the OpenClaw configuration file using provided credentials.
  2. Identify the target document and specific block IDs or parent containers for the operation.
  3. Formulate the REST API request body using the specific block type schema required by the Feishu Docx v1 endpoint.
  4. Execute the operation (GET, POST, PATCH, or DELETE) while adhering to strict body-index requirements for nested structures.
  5. Handle API rate limits by implementing mandatory delays between sequential read or write operations to ensure stability.

Feishu Block Operations Setup

Ensure your OpenClaw configuration contains valid Feishu credentials (appId and appSecret).

To authenticate and use this within Openclaw Skills, you can use the following pattern:

import json, urllib.request, os

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"]

Feishu Block Operations Data Schema & Taxonomy

The skill interacts with the Feishu Docx v1 data model. Blocks are categorized by specific integer IDs and structured as JSON objects within the API lifecycle.

Block Type ID Description
Page 1 The document root, containing all other blocks
Text 2 Standard paragraph block containing text elements
Table 31 A container for grid-based data structures
TableCell 32 A child block of a table that contains content
Image 27 A block specifically for media and file tokens
Grid 24 A multi-column layout container

Feishu Block Operations Advanced Features

  • Full Tree Traversal: Fetch an entire document structure or all table contents in a single GET call using the with_descendants parameter.
  • Nested Block Support: Create complex, multi-level structures like tables and grids using the descendant endpoint with temporary IDs.
  • High-Performance Batching: Update multiple blocks, styles, or table properties in a single request to optimize against rate limits.
  • Precise Deletion: Utilize index-based range deletion to remove specific segments of content relative to a parent container.
  • Text Element Precision: Manipulate specific text runs, user mentions, document links, and LaTeX equations within a single text block.

SKILL.md


Loading

Related Openclaw Skills

METADATA

Github Stars: 0
forks: 0

Featured*