Feishu Markdown to Blocks for Openclaw

A specialized tool for converting Markdown content into Feishu block structures and inserting them into existing documents with precise positioning.

deadblue22
v1.0.0
Mar 4, 2026
0
853
0

Install & Download

1. ClawHub CLI

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

npx clawhub@latest install feishu-md2blocks

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-md2blocks 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 Markdown to Blocks?

Feishu Markdown to Blocks is a powerful utility designed to overcome the common limitations of standard document APIs. While basic operations often overwrite entire documents or fail when handling complex tables, this skill provides a granular approach to content management. As a key component of the Openclaw Skills library, it allows developers to convert Markdown source—including headers, nested lists, and intricate tables—directly into Feishu-native block formats.

By utilizing the Feishu descendant API instead of the simpler children API, this tool ensures that complex nested structures are preserved and rendered correctly. It is an essential asset for teams using Openclaw Skills to automate technical documentation, synchronize repository content with internal wikis, or generate dynamic reports within the Feishu ecosystem.

Feishu Markdown to Blocks Use Cases

  • Appending technical documentation or system logs to the end of an existing Feishu document.
  • Inserting complex Markdown tables that require precise cell formatting and block conversion.
  • Updating specific sections of a document by targeting block IDs with the position-aware insertion feature.
  • Integrating automated content updates into Openclaw Skills workflows to maintain up-to-date internal knowledge bases.
  • Replacing document content entirely while ensuring that rich formatting like code blocks and todo items remain intact.

How Feishu Markdown to Blocks Works

  1. The skill accepts Markdown content from a file or standard input and sends it to the Feishu convert API to generate block structures.
  2. It automatically cleans the output, specifically removing the merge_info field from table blocks which is known to cause insertion errors in the Feishu API.
  3. The script identifies the target location within the document, either appending to the end or calculating the index after a specific block ID.
  4. It leverages the descendant API to perform the insertion, ensuring that complex hierarchies like tables containing text elements are correctly handled.
  5. The process integrates seamlessly with other Openclaw Skills to facilitate end-to-end automation of document management tasks.

Feishu Markdown to Blocks Setup

To get started with this skill, ensure your Feishu application has the docx:document.block:convert permission. Use the following commands to execute the conversion and insertion script:

# Basic usage to append a file to a document
python3 scripts/md2blocks.py <doc_token> content.md

# Inserting content after a specific block ID
python3 scripts/md2blocks.py <doc_token> content.md --after <block_id>

# Using stdin to pipe content directly
echo "# New Content" | python3 scripts/md2blocks.py <doc_token> -

Feishu Markdown to Blocks Data Schema & Taxonomy

The skill maps standard Markdown elements to Feishu document blocks as follows:

Markdown Syntax Feishu Block Type Capability
# to ####### Heading 1-9 Automatic hierarchy conversion
` col `
- or 1. Bullet/Ordered List Supports nested indentation
code Code Block Preserves syntax highlighting
- [ ] Todo Item Creates interactive checklists

This data schema allows Openclaw Skills to maintain high fidelity when moving content from technical environments into collaborative documents.

Feishu Markdown to Blocks Advanced Features

  • Support for the --after flag which automatically calculates the block index for precise insertion within large documents.
  • Includes a --replace mode that clears existing document content before inserting the new Markdown structure.
  • Built-in sanitation logic to handle Feishu-specific API quirks, such as the read-only merge_info field in tables.
  • Seamless stdin integration, making it compatible with complex Openclaw Skills automation pipelines and shell scripts.
  • Optimized for bulk operations with support for up to 1000 blocks per API call.

SKILL.md


Loading

Related Openclaw Skills

METADATA

Github Stars: 0
forks: 0

Featured*