Feishu Document Sync for Openclaw

A high-performance synchronization tool for managing Feishu documents, spreadsheets, and complex block structures via Markdown.

deadblue22
v1.0.0
Mar 5, 2026
0
1.2k
0

Install & Download

1. ClawHub CLI

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

npx clawhub@latest install feishu-doc-sync

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-doc-sync 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 Document Sync?

The Feishu Document Sync skill provides a comprehensive interface for AI agents to interact with the Feishu (Lark) Docx platform. It allows for sophisticated document manipulation beyond simple text editing, including the ability to read, write, and append content while preserving Markdown formatting. By leveraging this tool within Openclaw Skills, developers can automate the transition of local documentation to a collaborative cloud environment with precision.

This skill is specifically designed to handle the nuances of the Feishu API, such as block-level addressing and specialized table operations. It bridges the gap between local development environments and corporate knowledge bases, ensuring that documentation remains synchronized, formatted, and accessible across teams.

Feishu Document Sync Use Cases

  • Automating the synchronization of local technical documentation or Git READMEs to Feishu Docx.
  • Generating automated project status reports that include dynamic tables and formatted statistics.
  • Managing team wikis programmatically by updating specific blocks without overwriting manual contributions.
  • Batch uploading images and file attachments to centralized document repositories.

How Feishu Document Sync Works

  1. The agent extracts the doc_token from a standard Feishu URL to target the specific document.
  2. A read or list_blocks action is performed to retrieve the current document state and block statistics.
  3. The skill analyzes the differences between the local source and the remote document using an LCS alignment strategy.
  4. Operations are executed in a three-phase sequence: updates to existing text blocks, followed by deletions in reverse order, and finally new insertions.
  5. Structured elements like tables are managed using a delete-and-reinsert workflow to maintain formatting integrity and header styling.

Feishu Document Sync Setup

To enable this skill, ensure your Feishu application has the required permissions: docx:document, docx:document:readonly, docx:document.block:convert, and drive:drive. Configure your credentials in your local environment:

# Add your Feishu App ID and Secret to your configuration
# Path: ~/.openclaw/openclaw.json
{
  "channels": {
    "feishu": {
      "appId": "cli_xxxxxxxx",
      "appSecret": "xxxxxxxxxxxxxxxx"
    }
  }
}

Enable the document tool in your configuration file:

channels:
  feishu:
    tools:
      doc: true

Feishu Document Sync Data Schema & Taxonomy

The skill organizes data around the Feishu Docx block model. Each document is identified by a doc_token, and internal elements are managed via unique block_ids.

Attribute Description Supporting Actions
doc_token Unique document identifier from URL All actions
block_id Unique ID for a specific block (text, table, etc.) update_block, delete_block, insert
content Markdown-formatted string write, append, insert
table_property Object containing row_size, column_size, and header_row create_table, insert_table_row

Feishu Document Sync Advanced Features

  • Incremental Sync Engine: Uses a signature-matching algorithm to detect changes at the block level, minimizing API calls and preventing unnecessary document rewrites.
  • Advanced Table Management: Supports a specialized delete-and-reinsert strategy to preserve inline formatting and apply header_row styling that is otherwise restricted by the standard PATCH API.
  • Intelligent Image Handling: Automatically uploads local images or remote URLs and scales them appropriately for high-quality display within Feishu.
  • Multi-Block Batch Replacement: Prevents index drift by managing deletions in reverse order and performing bulk insertions for complex content updates.
  • Raw API Integration: Capable of falling back to raw Feishu Open API calls for specific property updates like dark-background header rows in Openclaw Skills.

SKILL.md


Loading

Related Openclaw Skills

METADATA

Github Stars: 0
forks: 0

Featured*