Actions106
- 日历 Actions
- 多维表格 Actions
- 知识库 Actions
- 通讯录 Actions
- 任务 Actions
- 电子表格 Actions
- 云空间 Actions
- 消息 Actions
- 云文档 Actions
Overview
This node integrates with Feishu's document service to create new blocks within a document. It is designed to add content or structure to existing documents by specifying the parent block under which new child blocks will be created. This operation is useful for automating document editing, dynamically generating content, or programmatically managing document structures in Feishu.
Practical examples include:
- Automatically appending sections or paragraphs to a collaborative document.
- Creating nested content blocks under specific headings or sections.
- Managing document versions and ensuring idempotent updates using unique operation tokens.
Properties
| Name | Meaning |
|---|---|
| 文档 ID (document_id) | The unique identifier of the document where blocks will be created. |
| 父块 ID (block_id) | The block_id of the parent block under which new child blocks will be created. To create blocks at the root of the document tree, use the document_id here. |
| 文档版本 (document_revision_id) | The version number of the document to query. Use -1 to indicate the latest version of the document. |
| 操作的唯一标识 (client_toke) | A unique identifier for the operation, used for idempotency. If empty, a new request is initiated; if non-empty, the update operation is performed idempotently matching this token. |
| 用户 ID 类型 (user_id_type) | The type of user ID provided. Options are: Open_id, Union_id, or User_id. This specifies how the user is identified in the request. |
| 请求体JSON (body) | The JSON body of the request defining the block(s) to create. This should follow the structure specified in Feishu's API documentation for creating document blocks. |
Output
The node outputs an array of JSON objects representing the response from the Feishu API after creating the block(s). Each output item corresponds to one input item processed and contains the details of the created block(s), including identifiers and metadata returned by the API.
If the operation fails on any item and "Continue On Fail" is enabled, the output will include error information for that item instead of throwing an exception.
No binary data output is indicated.
Dependencies
- Requires an API key credential for authenticating with Feishu's API.
- The node depends on Feishu's document API endpoint for creating blocks.
- Proper configuration of credentials and network access to Feishu's API is necessary.
- The JSON body must conform to Feishu's documented schema for block creation: https://open.feishu.cn/document/server-docs/docs/docs/docx-v1/document-block/create#1b8abd5d
Troubleshooting
Common issues:
- Invalid or missing
document_idorblock_idcan cause the API to reject the request. - Incorrect JSON structure in the
bodyproperty may lead to validation errors. - Using an outdated
document_revision_idmight cause conflicts if the document has changed. - Missing or invalid API credentials will result in authentication errors.
- Invalid or missing
Error messages:
- Errors from the Feishu API are surfaced as node errors with messages describing the issue.
- If "Continue On Fail" is disabled, the node execution stops on the first error.
- To resolve errors, verify all required properties, ensure the JSON body matches the API spec, and confirm valid credentials.
Links and References
- Feishu Document Block Create API Documentation:
https://open.feishu.cn/document/server-docs/docs/docs/docx-v1/document-block/create#1b8abd5d