feishu-create-doc
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
Chinesefeishu_mcp_create_doc
feishu_mcp_create_doc
通过 MCP 调用 ,从 Lark-flavored Markdown 内容创建一个新的飞书云文档。
create-docCall via MCP to create a new Feishu Cloud Document from Lark-flavored Markdown content.
create-doc返回值
Return Value
工具成功执行后,返回一个 JSON 对象,包含以下字段:
- (string):文档的唯一标识符(token),格式如
doc_iddoxcnXXXXXXXXXXXXXXXXXXX - (string):文档的访问链接,可直接在浏览器中打开,格式如
doc_urlhttps://www.feishu.cn/docx/doxcnXXXXXXXXXXXXXXXXXXX - (string):操作结果消息,如"文档创建成功"
message
After successful execution of the tool, a JSON object is returned containing the following fields:
- (string): Unique identifier (token) of the document, formatted like
doc_iddoxcnXXXXXXXXXXXXXXXXXXX - (string): Access link of the document, which can be opened directly in a browser, formatted like
doc_urlhttps://www.feishu.cn/docx/doxcnXXXXXXXXXXXXXXXXXXX - (string): Operation result message, e.g., "Document created successfully"
message
参数
Parameters
markdown(必填)
markdown (required)
文档的 Markdown 内容,使用 Lark-flavored Markdown 格式。
调用本工具的markdown内容应当尽量结构清晰,样式丰富, 有很高的可读性. 合理的使用callout高亮块, 分栏,表格等能力,并合理的运用插入图片与mermaid的能力,做到图文并茂..
你需要遵循以下原则:
- 结构清晰:标题层级 ≤ 4 层,用 Callout 突出关键信息
- 视觉节奏:用分割线、分栏、表格打破大段纯文字
- 图文交融:流程和架构优先用 Mermaid/PlantUML 可视化
- 克制留白:Callout 不过度、加粗只强调核心词
当用户有明确的样式,风格需求时,应当以用户的需求为准!!
重要提示:
- 禁止重复标题:markdown 内容开头不要写与 title 相同的一级标题!title 参数已经是文档标题,markdown 应直接从正文内容开始
- 目录:飞书自动生成,无需手动添加
- Markdown 语法必须符合 Lark-flavored Markdown 规范,详见下方"内容格式"章节
- 创建较长的文档时,强烈建议配合update-doc中的append mode, 进行分段的创建,提高成功率.
Markdown content of the document, using Lark-flavored Markdown format.
The markdown content used to call this tool should be as structurally clear, stylistically rich, and highly readable as possible. Use callout highlight blocks, columns, tables, etc., appropriately, and make use of image insertion and Mermaid capabilities to achieve a combination of text and images..
You need to follow these principles:
- Clear Structure: Title levels ≤ 4, use Callout to highlight key information
- Visual Rhythm: Use dividers, columns, and tables to break up large blocks of plain text
- Text-Image Integration: Prioritize visualization of processes and architectures using Mermaid/PlantUML
- Restrained White Space: Do not overuse Callout, only bold core terms for emphasis
When users have clear style and format requirements, those requirements shall take precedence!!
Important Notes:
- Duplicate Titles Prohibited: Do not write a level 1 title in the markdown content that is the same as the title parameter! The title parameter already serves as the document title, so the markdown should start directly with the body content
- Table of Contents: Automatically generated by Feishu, no need to add manually
- Markdown syntax must comply with Lark-flavored Markdown specifications, see the "Content Format" section below
- When creating longer documents, it is strongly recommended to use the append mode in update-doc for segmented creation to improve success rate.
title(可选)
title (optional)
文档标题。
Title of the document.
folder_token(可选)
folder_token (optional)
父文件夹的 token。如果不提供,文档将创建在用户的个人空间根目录。
folder_token 可以从飞书文件夹 URL 中获取,格式如:,其中 即为 folder_token。
https://xxx.feishu.cn/drive/folder/fldcnXXXXfldcnXXXXToken of the parent folder. If not provided, the document will be created in the root directory of the user's personal space.
folder_token can be obtained from the Feishu folder URL, formatted like: , where is the folder_token.
https://xxx.feishu.cn/drive/folder/fldcnXXXXfldcnXXXXwiki_node(可选)
wiki_node (optional)
知识库节点 token 或 URL(可选,传入则在该节点下创建文档,与 folder_token 和 wiki_space 互斥)
wiki_node 可以从飞书知识库页面 URL 中获取,格式如:,其中 即为 wiki_node token。
https://xxx.feishu.cn/wiki/wikcnXXXXwikcnXXXXToken or URL of the knowledge base node (optional; if provided, the document will be created under this node, mutually exclusive with folder_token and wiki_space)
wiki_node can be obtained from the Feishu knowledge base page URL, formatted like: , where is the wiki_node token.
https://xxx.feishu.cn/wiki/wikcnXXXXwikcnXXXXwiki_space(可选)
wiki_space (optional)
知识空间 ID(可选,传入则在该空间根目录下创建文档。特殊值 表示用户的个人知识库。与 wiki_node 和 folder_token 互斥)
my_librarywiki_space 可以从知识空间设置页面 URL 中获取,格式如:,其中 即为 wiki_space ID。
https://xxx.feishu.cn/wiki/settings/74480000000000093007448000000000009300参数优先级:wiki_node > wiki_space > folder_token
Knowledge space ID (optional; if provided, the document will be created in the root directory of this space. The special value refers to the user's personal knowledge base. Mutually exclusive with wiki_node and folder_token)
my_librarywiki_space can be obtained from the knowledge space settings page URL, formatted like: , where is the wiki_space ID.
https://xxx.feishu.cn/wiki/settings/74480000000000093007448000000000009300Parameter Priority: wiki_node > wiki_space > folder_token
示例
Examples
示例 1:创建简单文档
Example 1: Create a Simple Document
json
{
"title": "项目计划",
"markdown": "# 项目概述\n\n这是一个新项目。\n\n## 目标\n\n- 目标 1\n- 目标 2"
}json
{
"title": "Project Plan",
"markdown": "# Project Overview\n\nThis is a new project.\n\n## Objectives\n\n- Objective 1\n- Objective 2"
}示例 2:创建到指定文件夹
Example 2: Create in a Specified Folder
json
{
"title": "会议纪要",
"folder_token": "fldcnXXXXXXXXXXXXXXXXXXXXXX",
"markdown": "# 周会 2025-01-15\n\n## 讨论议题\n\n1. 项目进度\n2. 下周计划"
}json
{
"title": "Meeting Minutes",
"folder_token": "fldcnXXXXXXXXXXXXXXXXXXXXXX",
"markdown": "# Weekly Meeting 2025-01-15\n\n## Discussion Topics\n\n1. Project Progress\n2. Next Week's Plan"
}示例 3:使用飞书扩展语法
Example 3: Use Feishu Extended Syntax
使用高亮块、表格等飞书特有功能:
json
{
"title": "产品需求",
"markdown": "<callout emoji=\"💡\" background-color=\"light-blue\">\n重要需求说明\n</callout>\n\n## 功能列表\n\n<lark-table header-row=\"true\">\n| 功能 | 优先级 |\n|------|--------|\n| 登录 | P0 |\n| 导出 | P1 |\n</lark-table>"
}Use Feishu-specific features like highlight blocks, tables, etc.:
json
{
"title": "Product Requirements",
"markdown": "<callout emoji=\"💡\" background-color=\"light-blue\">\nImportant Requirement Notes\n</callout>\n\n## Feature List\n\n<lark-table header-row=\"true\">\n| Feature | Priority |\n|------|--------|\n| Login | P0 |\n| Export | P1 |\n</lark-table>"
}示例 4:创建到知识库节点下
Example 4: Create Under a Knowledge Base Node
json
{
"title": "技术文档",
"wiki_node": "wikcnXXXXXXXXXXXXXXXXXXXXXX",
"markdown": "# API 接口说明\n\n这是一个知识库文档。"
}json
{
"title": "Technical Documentation",
"wiki_node": "wikcnXXXXXXXXXXXXXXXXXXXXXX",
"markdown": "# API Interface Description\n\nThis is a knowledge base document."
}示例 5:创建到知识空间根目录
Example 5: Create in the Root Directory of a Knowledge Space
json
{
"title": "项目概览",
"wiki_space": "7448000000000009300",
"markdown": "# 项目概览\n\n这是知识空间根目录下的一级文档。"
}json
{
"title": "Project Overview",
"wiki_space": "7448000000000009300",
"markdown": "# Project Overview\n\nThis is a level 1 document in the root directory of the knowledge space."
}示例 6:创建到个人知识库
Example 6: Create in Personal Knowledge Base
json
{
"title": "学习笔记",
"wiki_space": "my_library",
"markdown": "# 学习笔记\n\n这是创建在个人知识库中的文档。"
}json
{
"title": "Study Notes",
"wiki_space": "my_library",
"markdown": "# Study Notes\n\nThis is a document created in the personal knowledge base."
}内容格式
Content Format
文档内容使用 Lark-flavored Markdown 格式,这是标准 Markdown 的扩展版本,支持飞书文档的所有块类型和富文本格式。
Document content uses Lark-flavored Markdown format, an extended version of standard Markdown that supports all block types and rich text formats of Feishu Documents.
通用规则
General Rules
- 使用标准 Markdown 语法作为基础
- 使用自定义 XML 标签实现飞书特有功能(具体标签见各功能章节)
- 需要显示特殊字符时使用反斜杠转义:$ [ ] < > { } | ^`
* ~
- Use standard Markdown syntax as the base
- Use custom XML tags to implement Feishu-specific features (see respective feature sections for specific tags)
- Use backslashes to escape special characters when needed: $ [ ] < > { } | ^`
* ~
📝 基础块类型
📝 Basic Block Types
文本(段落)
Text (Paragraph)
markdown
普通文本段落
段落中的**粗体文字**
多个段落之间用空行分隔。
居中文本 {align="center"}
右对齐文本 {align="right"}段落对齐:支持 语法。可与颜色组合:
{align="left|center|right"}{color="blue" align="center"}markdown
Normal text paragraph
**Bold text** within a paragraph
Separate multiple paragraphs with blank lines.
Centered text {align="center"}
Right-aligned text {align="right"}Paragraph Alignment: Supports syntax. Can be combined with color:
{align="left|center|right"}{color="blue" align="center"}标题
Headings
飞书支持 9 级标题。H1-H6 使用标准 Markdown 语法,H7-H9 使用 HTML 标签:
markdown
undefinedFeishu supports 9 levels of headings. H1-H6 use standard Markdown syntax, H7-H9 use HTML tags:
markdown
undefined一级标题
Level 1 Heading
二级标题
Level 2 Heading
三级标题
Level 3 Heading
四级标题
Level 4 Heading
五级标题
Level 5 Heading
六级标题
Level 6 Heading
<h7>七级标题</h7>
<h8>八级标题</h8>
<h9>九级标题</h9>
<h7>Level 7 Heading</h7>
<h8>Level 8 Heading</h8>
<h9>Level 9 Heading</h9>
带颜色的标题 {color="blue"}
Colored Heading {color="blue"}
红色标题 {color="red"}
Red Heading {color="red"}
居中标题 {align="center"}
Centered Heading {align="center"}
蓝色居中标题 {color="blue" align="center"}
Blue Centered Heading {color="blue" align="center"}
**标题属性**:支持 `{color="颜色名"}` 和 `{align="left|center|right"}` 语法,可组合使用。颜色值:red, orange, yellow, green, blue, purple, gray。请谨慎使用该能力.
**Heading Attributes**: Supports `{color="color-name"}` and `{align="left|center|right"}` syntax, which can be used in combination. Color values: red, orange, yellow, green, blue, purple, gray. Use this capability cautiously.列表
Lists
有序列表,无序列表嵌套使用tab或者 2 空格缩进
markdown
- 无序项1(
- 无序项1.a
- 无序项1.b
1. 有序项1
2. 有序项2
- [ ] 待办
- [x] 已完成Use tabs or 2-space indentation for nested ordered and unordered lists
markdown
- Unordered item 1 (
- Unordered item 1.a
- Unordered item 1.b
1. Ordered item 1
2. Ordered item 2
- [ ] To-do
- [x] Completed引用块
Quote Blocks
markdown
> 这是一段引用
> 可以跨多行
> 引用中支持**加粗**和*斜体*等格式markdown
> This is a quote
> It can span multiple lines
> Quotes support **bold** and *italic* formats代码块
Code Blocks
⚠️ 只支持围栏代码块(),不支持缩进代码块。
```markdown
```python
print("Hello")
```支持语言:python, javascript, go, java, sql, json, yaml, shell 等。
⚠️ Only fence code blocks (```) are supported; indented code blocks are not supported.
markdown
```python
print("Hello")
```Supported languages: python, javascript, go, java, sql, json, yaml, shell, etc.
分割线
Dividers
markdown
---markdown
---🎨 富文本格式
🎨 Rich Text Formats
文本样式
Text Styles
**粗体***斜体*~~删除线~~`行内代码`<u>下划线</u>**Bold***Italic*~~Strikethrough~~`Inline Code`<u>Underline</u>文字颜色
Text Colors
<text color="red">红色</text><text background-color="yellow">黄色背景</text>支持: red, orange, yellow, green, blue, purple, gray
<text color="red">Red</text><text background-color="yellow">Yellow Background</text>Supported colors: red, orange, yellow, green, blue, purple, gray
链接
Links
[链接文字](https://example.com)[Link Text](https://example.com)行内公式(LaTeX)
Inline Formulas (LaTeX)
$E = mc^2$$<equation>E = mc^2</equation>$E = mc^2$$<equation>E = mc^2</equation>🚀 高级块类型
🚀 Advanced Block Types
高亮块(Callout)
Highlight Block (Callout)
html
<callout emoji="✅" background-color="light-green" border-color="green">
支持**格式化**的内容,可包含多个块
</callout>属性: emoji (使用emoji 字符如 ✅ ⚠️ 💡), background-color, border-color, text-color
背景色: light-red/red, light-blue/blue, light-green/green, light-yellow/yellow, light-orange/orange, light-purple/purple, pale-gray/light-gray/dark-gray
常用: 💡light-blue(提示) ⚠️light-yellow(警告) ❌light-red(危险) ✅light-green(成功)
限制: callout子块仅支持文本、标题、列表、待办、引用。不支持代码块、表格、图片。
html
<callout emoji="✅" background-color="light-green" border-color="green">
Content with **formatting** support, can contain multiple blocks
</callout>Attributes: emoji (use emoji characters like ✅ ⚠️ 💡), background-color, border-color, text-color
Background Colors: light-red/red, light-blue/blue, light-green/green, light-yellow/yellow, light-orange/orange, light-purple/purple, pale-gray/light-gray/dark-gray
Common Uses: 💡light-blue (tip) ⚠️light-yellow (warning) ❌light-red (danger) ✅light-green (success)
Restrictions: Callout child blocks only support text, headings, lists, to-dos, and quotes. Code blocks, tables, and images are not supported.
分栏(Grid)
Grid Columns
适合对比、并列展示场景。支持 2-5 列:
Suitable for comparison and side-by-side display scenarios. Supports 2-5 columns:
两栏(等宽)
Two Columns (Equal Width)
html
<grid cols="2">
<column>
左栏内容
</column>
<column>
右栏内容
</column>
</grid>html
<grid cols="2">
<column>
Left column content
</column>
<column>
Right column content
</column>
</grid>三栏自定义宽度
Three Columns with Custom Widths
html
<grid cols="3">
<column width="20">左栏(20%)</column>
<column width="60">中栏(60%)</column>
<column width="20">右栏(20%)</column>
</grid>属性: (列数 2-5), (列宽百分比,总和为100,等宽时可省略)
colswidthhtml
<grid cols="3">
<column width="20">Left Column (20%)</column>
<column width="60">Middle Column (60%)</column>
<column width="20">Right Column (20%)</column>
</grid>Attributes: (number of columns, 2-5), (column width percentage, sum must be 100; can be omitted for equal width)
colswidth表格
Tables
标准 Markdown 表格
Standard Markdown Tables
markdown
| 列 1 | 列 2 | 列 3 |
|------|------|------|
| 单元格 1 | 单元格 2 | 单元格 3 |
| 单元格 4 | 单元格 5 | 单元格 6 |markdown
| Column 1 | Column 2 | Column 3 |
|------|------|------|
| Cell 1 | Cell 2 | Cell 3 |
| Cell 4 | Cell 5 | Cell 6 |飞书增强表格
Feishu Enhanced Tables
当单元格需要复杂内容(列表、代码块、高亮块等)时使用。
层级结构(必须严格遵守):
<lark-table> ← 表格容器
<lark-tr> ← 行(直接子元素只能是 lark-tr)
<lark-td>内容</lark-td> ← 单元格(直接子元素只能是 lark-td)
<lark-td>内容</lark-td> ← 每行的 lark-td 数量必须相同!
</lark-tr>
</lark-table>属性:
- :列宽,逗号分隔像素值,总宽≈730
column-widths - :首行是否为表头(
header-row或"true")"false" - :首列是否为表头(
header-column或"true")"false"
单元格写法:内容前后必须空行
html
<lark-td>
这里写内容
</lark-td>完整示例(2行3列):
html
<lark-table column-widths="200,250,280" header-row="true">
<lark-tr>
<lark-td>
**表头1**
</lark-td>
<lark-td>
**表头2**
</lark-td>
<lark-td>
**表头3**
</lark-td>
</lark-tr>
<lark-tr>
<lark-td>
普通文本
</lark-td>
<lark-td>
- 列表项1
- 列表项2
</lark-td>
<lark-td>
代码内容
</lark-td>
</lark-tr>
</lark-table>限制:单元格内不支持 Grid 和嵌套表格
合并单元格:读取时返回 属性,创建暂不支持
rowspan/colspan禁止:
- 混用 Markdown 表格语法()
|---| - 使用 换行
<br/> - 遗漏 标签
<lark-td>
Use this when cells require complex content (lists, code blocks, highlight blocks, etc.).
Hierarchical Structure (must be strictly followed):
<lark-table> ← Table container
<lark-tr> ← Row (direct child elements can only be lark-tr)
<lark-td>Content</lark-td> ← Cell (direct child elements can only be lark-td)
<lark-td>Content</lark-td> ← The number of lark-td elements per row must be the same!
</lark-tr>
</lark-table>Attributes:
- : Column widths, comma-separated pixel values, total width ≈730
column-widths - : Whether the first row is a header (
header-rowor"true")"false" - : Whether the first column is a header (
header-columnor"true")"false"
Cell Writing: Must leave blank lines before and after content
html
<lark-td>
Write content here
</lark-td>Complete Example (2 rows, 3 columns):
html
<lark-table column-widths="200,250,280" header-row="true">
<lark-tr>
<lark-td>
**Header 1**
</lark-td>
<lark-td>
**Header 2**
</lark-td>
<lark-td>
**Header 3**
</lark-td>
</lark-tr>
<lark-tr>
<lark-td>
Normal text
</lark-td>
<lark-td>
- List item 1
- List item 2
</lark-td>
<lark-td>
Code content
</lark-td>
</lark-tr>
</lark-table>Restrictions: Grid and nested tables are not supported within cells
Cell Merging: Returns attributes when reading; not supported for creation
rowspan/colspanProhibited:
- Mixing Markdown table syntax ()
|---| - Using for line breaks
<br/> - Omitting tags
<lark-td>
图片
Images
html
<image url="https://example.com/image.png" width="800" height="600" align="center" caption="图片描述文字"/>属性: url (必需,系统会自动下载并上传), width, height, align (left/center/right), caption
⚠️ 重要: 不支持直接使用 属性(如 ),只支持 URL 方式。系统会自动下载图片并上传到飞书。
token<image token="xxx"/>支持 PNG/JPG/GIF/WebP/BMP,最大 10MB
图片/文件插入方式选择:
-
有公开可访问的图片 URL → 直接在 create-doc / update-doc 的 markdown 中使用一步到位
<image url="..."/> -
本地图片或文件(如用户在聊天中发送的图片/文件) → 先用 create-doc / update-doc 创建或更新文档文本内容,再用工具将本地图片或文件追加到文档末尾。如需媒体出现在文档中间特定位置,可先用 create-doc 写好之前的内容,调用
feishu_doc_media追加图片/文件,最后用 update-doc 的 append 模式追加后续内容feishu_doc_media
html
<image url="https://example.com/image.png" width="800" height="600" align="center" caption="Image description text"/>Attributes: url (required, the system will automatically download and upload), width, height, align (left/center/right), caption
⚠️ Important: Direct use of the attribute (e.g., ) is not supported; only the URL method is allowed. The system will automatically download the image and upload it to Feishu.
token<image token="xxx"/>Supports PNG/JPG/GIF/WebP/BMP, maximum 10MB
Image/File Insertion Options:
-
Publicly accessible image URL → Usedirectly in the markdown of create-doc / update-doc for one-step completion
<image url="..."/> -
Local images or files (e.g., images/files sent by users in chats) → First use create-doc / update-doc to create or update the document text content, then use thetool to append the local image or file to the end of the document. If the media needs to appear at a specific position in the middle of the document, first use create-doc to write the preceding content, call
feishu_doc_mediato append the image/file, and finally use the append mode of update-doc to append the subsequent contentfeishu_doc_media
文件
Files
html
<file url="https://example.com/document.pdf" name="文档.pdf" view-type="1"/>属性:
- url (文件 URL,必需,系统会自动下载并上传)
- name (文件名,必需)
- view-type (1=卡片视图, 2=预览视图,可选)
⚠️ 重要: 不支持直接使用 属性(如 )
token<file token="xxx"/>html
<file url="https://example.com/document.pdf" name="Document.pdf" view-type="1"/>Attributes:
- url (file URL, required, the system will automatically download and upload)
- name (file name, required)
- view-type (1=card view, 2=preview view, optional)
⚠️ Important: Direct use of the attribute (e.g., ) is not supported
token<file token="xxx"/>画板(Mermaid / PlantUML 图表)
Diagrams (Mermaid / PlantUML)
支持两种图表语法:Mermaid 和 PlantUML。
Supports two diagram syntaxes: Mermaid and PlantUML.
Mermaid 图表
Mermaid Diagrams
图表优先选择此格式. mermaid图表会被渲染为可视化的画板, 如果能用mermaid实现的图表,应当优先选择mermaid.
markdown
```mermaid
graph TD
A[开始] --> B{判断}
B -->|是| C[处理]
B -->|否| D[结束]
```支持图表类型: flowchart, sequenceDiagram, classDiagram, stateDiagram, gantt, mindmap, erDiagram
Prioritize this format for diagrams. Mermaid diagrams will be rendered as visual diagrams; if a diagram can be implemented with Mermaid, Mermaid should be prioritized.
markdown
```mermaid
graph TD
A[Start] --> B{Decision}
B -->|Yes| C[Process]
B -->|No| D[End]
```Supported Diagram Types: flowchart, sequenceDiagram, classDiagram, stateDiagram, gantt, mindmap, erDiagram
PlantUML 图表
PlantUML Diagrams
PlantUML图表会被渲染为可视化的画板. mermaid满足不了的场景可以选择plantUML进行绘图.
markdown
```plantuml
@startuml
Alice -> Bob: Hello
Bob --> Alice: Hi!
@enduml
```支持图表类型: sequence, usecase, class, activity, component, state, object, deployment
PlantUML diagrams will be rendered as visual diagrams. Use PlantUML for scenarios that Mermaid cannot satisfy.
markdown
```plantuml
@startuml
Alice -> Bob: Hello
Bob --> Alice: Hi!
@enduml
```Supported Diagram Types: sequence, usecase, class, activity, component, state, object, deployment
读取画板
Reading Diagrams
读取时返回 标签:
<whiteboard>html
<whiteboard token="xxx" align="center" width="800" height="600"/>属性: token (画板标识), align (left/center/right), width, height
重要说明:
- create-doc时用 Mermaid/PlantUML 代码块,系统自动转换为画板; 禁止以的方式写入!!
<whiteboard> - 读取时只能获取 token,可通过fetch-file工具进行查看内容。无法获取原始源码
Returns tag when reading:
<whiteboard>html
<whiteboard token="xxx" align="center" width="800" height="600"/>Attributes: token (diagram identifier), align (left/center/right), width, height
Important Notes:
- Use Mermaid/PlantUML code blocks when creating documents; the system will automatically convert them to diagrams; it is prohibited to write using !!
<whiteboard> - Only the token can be obtained when reading; use the fetch-file tool to view the content. Original source code cannot be obtained
多维表格(Bitable)
Bitable (Multidimensional Table)
html
<bitable view="table"/>
<bitable view="kanban"/>属性: view (table/kanban,默认 table)
注意: token 是只读属性,创建时不能指定只能创建空的多维表格,创建后再手动添加数据。
html
<bitable view="table"/>
<bitable view="kanban"/>Attributes: view (table/kanban, default table)
Note: token is a read-only attribute; only empty multidimensional tables can be created, and data must be added manually after creation.
会话卡片(ChatCard)
ChatCard
html
<chat-card id="oc_xxx" align="center"/>属性: id (格式 oc_xxx, 必需), align (left/center/right)
html
<chat-card id="oc_xxx" align="center"/>Attributes: id (formatted as oc_xxx, required), align (left/center/right)
内嵌网页(Iframe)
Iframe (Embedded Webpage)
html
<iframe url="https://example.com/survey?id=123" type="12"/>属性: url (必需), type (组件类型数字, 必需)
type 枚举: 1=Bilibili, 2=西瓜, 3=优酷, 4=Airtable, 5=百度地图, 6=高德地图, 8=Figma, 9=墨刀, 10=Canva, 11=CodePen, 12=飞书问卷, 13=金数据
重要提示: 仅支持上述列出的网页类型。其他类型的网页不支持嵌入,请不要使用 iframe。对于普通网页链接,请使用 Markdown 链接格式 代替。
[链接文字](URL)html
<iframe url="https://example.com/survey?id=123" type="12"/>Attributes: url (required), type (component type number, required)
type Enumeration: 1=Bilibili, 2=Xigua, 3=Youku, 4=Airtable, 5=Baidu Maps, 6=Amap, 8=Figma, 9=MockingBot, 10=Canva, 11=CodePen, 12=Feishu Questionnaire, 13=JindoForm
Important Note: Only the webpage types listed above are supported. Other types of webpages are not supported for embedding, so do not use iframe. For regular webpage links, use the Markdown link format instead.
[Link Text](URL)链接预览(LinkPreview)
LinkPreview
html
<link-preview url="消息链接" type="message"/>属性: url (必需, 只写属性), type (message=消息链接)
目前仅支持消息链接, 只支持读取, 不支持创建
html
<link-preview url="Message Link" type="message"/>Attributes: url (required, write-only attribute), type (message=message link)
Currently only supports message links; only supported for reading, not for creation
引用容器(QuoteContainer)
QuoteContainer
html
<quote-container>
引用容器内容
</quote-container>与 quote 引用块不同,引用容器是容器类型,可包含多个子块
html
<quote-container>
Quote container content
</quote-container>Unlike quote blocks, QuoteContainer is a container type that can contain multiple child blocks
🔧 高级功能块
🔧 Advanced Feature Blocks
电子表格(Sheet)
Sheet (Spreadsheet)
html
<sheet rows="5" cols="5"/>
<sheet/>属性: rows (行数,默认 3,最大 9), cols (列数,默认 3)
注意: token 是只读属性,创建时不能指定。只能创建空的电子表格,创建后使用 Sheet API 操作数据。
html
<sheet rows="5" cols="5"/>
<sheet/>Attributes: rows (number of rows, default 3, maximum 9), cols (number of columns, default 3)
Note: token is a read-only attribute; cannot be specified during creation. Only empty spreadsheets can be created, and data must be manipulated using the Sheet API after creation.
只读块类型 🔒
Read-Only Block Types 🔒
以下块类型仅支持读取,不支持创建:
| 块类型 | 标签 | 说明 |
|---|---|---|
| 思维笔记 | | 仅获取占位信息 |
| 流程图/UML | | type: 1=流程图, 2=UML |
| AI 模板 | | 无内容占位块 |
The following block types are only supported for reading, not for creation:
| Block Type | Tag | Description |
|---|---|---|
| Mindnote | | Only placeholder information can be obtained |
| Flowchart/UML | | type: 1=flowchart, 2=UML |
| AI Template | | Empty placeholder block |
任务块
Task Block
html
<task task-id="xxx" members="ou_123, ou_456" due="2025-01-01">任务标题</task>属性: task-id, members (成员ID列表), due (截止日期)
html
<task task-id="xxx" members="ou_123, ou_456" due="2025-01-01">Task Title</task>Attributes: task-id, members (list of member IDs), due (due date)
同步块
Sync Blocks
html
<!-- 源同步块:内容在子块中 -->
<source-synced align="1">子块内容...</source-synced>
<!-- 引用同步块:自动获取源文档内容 -->
<reference-synced source-block-id="xxx" source-document-id="yyy">源内容...</reference-synced>属性: source-synced 有 align;reference-synced 有 source-block-id, source-document-id
html
<!-- Source Sync Block: Content is in child blocks -->
<source-synced align="1">Child block content...</source-synced>
<!-- Reference Sync Block: Automatically retrieves content from source document -->
<reference-synced source-block-id="xxx" source-document-id="yyy">Source content...</reference-synced>Attributes: source-synced has align; reference-synced has source-block-id, source-document-id
文档小组件(AddOns)
Document AddOns
html
<add-ons component-type-id="blk_xxx" record='{"key":"value"}'/>属性: component-type-id (小组件类型ID), record (JSON数据)
包含多种类型:问答互动、日期提醒等。部分组件如 Mermaid 已专门封装为 board 块
html
<add-ons component-type-id="blk_xxx" record='{"key":"value"}'/>Attributes: component-type-id (add-on type ID), record (JSON data)
Includes multiple types: Q&A interactions, date reminders, etc. Some components like Mermaid have been specifically encapsulated as board blocks
旧版小组件(ISV)
Legacy ISV AddOns
html
<isv id="comp_xxx" type="type_xxx"/>属性: component_id, component_type_id
旧版开放平台小组件,新版请使用 AddOns
html
<isv id="comp_xxx" type="type_xxx"/>Attributes: component_id, component_type_id
Legacy open platform add-ons; use AddOns for new versions
Wiki 子目录(WikiCatalog)🕰️
WikiCatalog 🕰️
html
<wiki-catalog token="wiki_xxx"/>属性: wiki_token (知识库节点token)
🕰️ 旧版,建议使用新版 sub-page-list
html
<wiki-catalog token="wiki_xxx"/>Attributes: wiki_token (knowledge base node token)
🕰️ Legacy version; it is recommended to use the new sub-page-list
Wiki 子页面列表(SubPageList)
SubPageList
html
<sub-page-list wiki="wiki_xxx"/>属性: wiki_token (当前页面的wiki token)
仅支持知识库文档创建,需传入当前页面的 wiki token
html
<sub-page-list wiki="wiki_xxx"/>Attributes: wiki_token (wiki token of the current page)
Only supported for knowledge base document creation; must pass the wiki token of the current page
议程(Agenda)
Agenda
html
<agenda>
<agenda-item>
<agenda-title>议程标题</agenda-title>
<agenda-content>议程内容</agenda-content>
</agenda-item>
</agenda>结构: agenda (容器) → agenda_item (议程项) → agenda_title (标题) + agenda_content (内容)
html
<agenda>
<agenda-item>
<agenda-title>Agenda Title</agenda-title>
<agenda-content>Agenda Content</agenda-content>
</agenda-item>
</agenda>Structure: agenda (container) → agenda_item (agenda item) → agenda_title (title) + agenda_content (content)
Jira 问题(JiraIssue)
JiraIssue
html
<jira-issue id="xxx" key="PROJECT-123"/>属性: id (Jira问题ID), key (Jira问题Key)
html
<jira-issue id="xxx" key="PROJECT-123"/>Attributes: id (Jira issue ID), key (Jira issue Key)
OKR 系列⚠️
OKR Series ⚠️
html
<okr id="okr_xxx">
<objective id="obj_1">
<kr id="kr_1"/>
</objective>
</okr>⚠️ 仅支持 user_access_token 创建,需使用 OKR API 进行详细操作
结构: okr → okr_objective (目标) → okr_key_result (关键结果) + okr_progress (进展)
html
<okr id="okr_xxx">
<objective id="obj_1">
<kr id="kr_1"/>
</objective>
</okr>⚠️ Only supported for creation with user_access_token; detailed operations require using the OKR API
Structure: okr → okr_objective (objective) → okr_key_result (key result) + okr_progress (progress)
📎 提及和引用
📎 Mentions and References
提及用户
Mention User
html
<mention-user id="ou_xxx"/>属性: id (用户 open_id,格式 ou_xxx)
注意不要直接在文档中写 这类格式,应当使用search-user获取用户的id,并使用.
@张三mention-userhtml
<mention-user id="ou_xxx"/>Attributes: id (user open_id, formatted as ou_xxx)
Note: Do not directly write formats like in the document; instead, use search-user to obtain the user's id and use .
@Zhang Sanmention-user提及文档
Mention Document
html
<mention-doc token="doxcnXXX" type="docx">文档标题</mention-doc>属性: token (文档 token), type (docx/sheet/bitable)
html
<mention-doc token="doxcnXXX" type="docx">Document Title</mention-doc>Attributes: token (document token), type (docx/sheet/bitable)
📅 日期和时间
📅 Dates and Times
日期提醒(Reminder)
Reminder
html
<reminder date="2025-12-31T18:00+08:00" notify="true" user-id="ou_xxx"/>属性:
- date (必需): , ISO 8601 带时区偏移
YYYY-MM-DDTHH:mm+HH:MM - notify (true/false): 是否发送通知
- user-id (必需): 创建者用户 ID
html
<reminder date="2025-12-31T18:00+08:00" notify="true" user-id="ou_xxx"/>Attributes:
- date (required): , ISO 8601 with time zone offset
YYYY-MM-DDTHH:mm+HH:MM - notify (true/false): whether to send notifications
- user-id (required): user ID of the creator
📐 数学表达式
📐 Mathematical Expressions
块级公式(LaTeX)
Block-Level Formulas (LaTeX)
markdown
$$
\int_{0}^{\infty} e^{-x^2} dx = \frac{\sqrt{\pi}}{2}
$$markdown
$$
\int_{0}^{\infty} e^{-x^2} dx = \frac{\sqrt{\pi}}{2}
$$行内公式
Inline Formulas
markdown
爱因斯坦方程:$E = mc^2$(注意 $ 前后需空格,紧邻位置不能有空格)markdown
Einstein's equation: $E = mc^2$ (note that spaces are required before and after $; no spaces allowed in adjacent positions)✍️ 写作指南
✍️ Writing Guidelines
场景速查
Scenario Quick Reference
| 场景 | 推荐组件 | 说明 |
|---|---|---|
| 重点提示/警告 | Callout | 蓝色提示、黄色警告、红色危险 |
| 对比/并列展示 | Grid 分栏 | 2-3 列最佳,配合 Callout 更醒目 |
| 数据汇总 | 表格 | 简单用 Markdown,复杂嵌套用 lark-table |
| 步骤说明 | 有序列表 | 可嵌套子步骤 |
| 时间线/版本 | 有序列表 + 加粗日期 | 或用 Mermaid timeline |
| 代码展示 | 代码块 | 标注语言,适当添加注释 |
| 知识卡片 | Callout + emoji | 用于概念解释、小贴士 |
| 引用说明 | 引用块 > | 引用原文、名言 |
| 术语对照 | 两列表格 | 中英文、缩写全称等 |
| Scenario | Recommended Component | Description |
|---|---|---|
| Key Tips/Warnings | Callout | Blue for tips, yellow for warnings, red for dangers |
| Comparison/Side-by-Side Display | Grid Columns | 2-3 columns are optimal; more eye-catching when combined with Callout |
| Data Summary | Table | Use Markdown for simple data, lark-table for complex nesting |
| Step-by-Step Instructions | Ordered List | Can nest sub-steps |
| Timeline/Version | Ordered List + Bold Dates | Or use Mermaid timeline |
| Code Display | Code Block | Label the language, add appropriate comments |
| Knowledge Cards | Callout + emoji | Used for concept explanations, tips |
| Reference Explanations | Quote Block > | Quote original text, famous sayings |
| Term Comparison | Two-Column Table | Chinese-English, abbreviations and full names, etc. |
🎯 最佳实践
🎯 Best Practices
- 空行分隔:不同块类型之间用空行分隔
- 转义字符:特殊字符用 转义:
\\*```\~ - 图片:使用 URL,系统自动下载上传
- 分栏:列宽总和必须为 100
- 表格选择:简单数据用 Markdown,复杂嵌套用
<lark-table> - 提及:@用户用 ,@文档用
<mention-user><mention-doc> - 目录:飞书自动生成,无需手动添加
- Blank Line Separation: Separate different block types with blank lines
- Escape Characters: Escape special characters with :
\\*```\~ - Images: Use URLs; the system will automatically download and upload
- Grid Columns: The sum of column widths must be 100
- Table Selection: Use Markdown for simple data, for complex nesting
<lark-table> - Mentions: Use for @users,
<mention-user>for @documents<mention-doc> - Table of Contents: Automatically generated by Feishu, no need to add manually
📖 补充说明
📖 Supplementary Notes
- 图片、画板、多维表格需要 token(URL 会自动上传转换)
- 提及用户和会话卡片需要相应访问权限
- 完全兼容标准 Markdown
- Tokens are required for images, diagrams, and Bitable (URLs will be automatically uploaded and converted)
- Corresponding access permissions are required for mentioning users and ChatCards
- Fully compatible with standard Markdown