Actions61
- 电子表格 Actions
- 云空间 Actions
- 消息 Actions
- 云文档 Actions
- 日历 Actions
- 多维表格 Actions
Overview
This n8n custom node allows users to create nested (descendant) blocks within a Feishu (Lark) cloud document. It is designed for scenarios where you need to programmatically add structured content—such as paragraphs, tables, or other block elements—under a specific parent block in a Feishu document. This is particularly useful for automating document assembly, collaborative editing workflows, or integrating Feishu documents with other business processes.
Practical examples:
- Automatically appending meeting notes under a designated section in a shared document.
- Inserting generated reports or data tables into a project documentation file.
- Building hierarchical document structures from external data sources.
Properties
| Name | Type | Meaning |
|---|---|---|
| 文档 ID | string | The unique identifier of the Feishu document where the new blocks will be created. |
| 父块 ID | string | The block_id of the parent block under which descendant blocks will be created. To add blocks at the root level, use the document_id here. |
| 文档版本 | number | The version of the document to target. Use -1 to indicate the latest version. |
| 操作的唯一标识 | string | A unique identifier for the operation, used for idempotency. Leave empty to initiate a new request; provide a value to ensure repeated requests are treated as the same operation. |
| 用户 ID 类型 | options | Specifies the type of user ID to use. Options include Open_id, Union_id, and User_id. |
| 请求体JSON | json | The JSON body of the request, defining the structure and content of the blocks to be created. See Feishu API documentation for details. |
Output
The node outputs an array of objects in the json field. Each object represents the result of the block creation operation for an input item. If the operation succeeds, the output contains the response from the Feishu API, typically including information about the newly created blocks. If an error occurs and "Continue On Fail" is enabled, the output will contain an error field with the error message (and additional error details if available).
Example output (success):
[
{
"json": {
"data": {
"items": [
{
"block_id": "blk123",
"children": [/* ... */]
}
]
}
}
}
]
Example output (error):
[
{
"json": {
"error": "Invalid document ID"
}
}
]
Dependencies
- External Service: Requires access to the Feishu (Lark) Open Platform API.
- Credentials: Needs valid
feishuCredentialsApicredentials configured in n8n. - Environment: No special environment variables required beyond standard n8n credential setup.
Troubleshooting
Common issues:
- Invalid Credentials: If the provided Feishu credentials are incorrect or expired, the node will fail to authenticate.
- Incorrect Document or Block ID: Supplying an invalid or non-existent document/block ID will result in errors from the Feishu API.
- Malformed Request Body: If the
请求体JSONproperty does not match the expected schema, the API may return validation errors.
Error messages:
"未实现方法: doc.doc:block:createDescendant": Indicates that the selected resource/operation combination is not implemented in the node."Invalid document ID"or similar: Returned by the Feishu API when the document or block ID is incorrect."NodeApiError": General API error, often includes more details in theerrorfield.
How to resolve:
- Double-check all IDs and ensure they exist in your Feishu workspace.
- Validate your request body against the API documentation.
- Ensure your credentials are up-to-date and have sufficient permissions.