Feishu Node icon

Feishu Node

Feishu Node

Actions106

Overview

This node integrates with the Feishu platform to create nested blocks within a document. Specifically, it supports the operation of creating descendant blocks under a specified parent block or directly under the root of a document tree. This is useful for programmatically building or modifying structured content in Feishu documents, such as adding sections, paragraphs, or other block elements in a hierarchical manner.

Practical scenarios include:

  • Automating document generation workflows where new content blocks need to be inserted dynamically.
  • Building collaborative document editing tools that interact with Feishu documents via API.
  • Managing complex document structures by programmatically nesting content blocks.

Properties

Name Meaning
文档 ID The unique identifier of the document. Required to specify which document to modify.
父块 ID The block ID of the parent block under which new child blocks will be created. To create children at the root level of the document tree, provide the document ID here instead.
文档版本 The version number of the document to query. Use -1 to indicate the latest version of the document.
操作的唯一标识 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 corresponding to this token.
用户 ID 类型 The type of user ID provided. Options are: Open_id, Union_id, User_id. This specifies how the user is identified in the request context.
请求体JSON The JSON body of the request containing the details of the blocks to create. This should follow the structure defined in the Feishu API documentation for creating descendant blocks.

Output

The node outputs an array of JSON objects representing the response from the Feishu API after creating the nested blocks. Each output item corresponds to one input item processed and contains the API response data, including any identifiers or metadata about the newly created blocks.

If the operation involves binary data (not indicated here), it would typically represent attachments or embedded media within the blocks, but this node focuses on JSON structured content.

Dependencies

  • Requires an API key credential for authenticating with the Feishu platform.
  • Needs network access to Feishu's open API endpoints.
  • The node depends on the Feishu API specification for document block operations, particularly the endpoint for creating descendant blocks.
  • No additional external libraries beyond those bundled with n8n and the Feishu SDK are required.

Troubleshooting

  • Common issues:

    • Invalid or missing document ID or block ID can cause the API call to fail.
    • Providing an incorrect document version may result in conflicts or errors.
    • Improperly formatted JSON in the request body can lead to validation errors.
    • Using an invalid or expired API authentication token will cause authorization failures.
  • Error messages:

    • Errors related to "未实现方法" (unimplemented method) indicate that the requested resource-operation combination is not supported by the node.
    • API errors returned from Feishu will be surfaced, often including error codes and messages describing the issue.
    • Network or timeout errors may occur if connectivity to Feishu API is interrupted.
  • Resolutions:

    • Verify all IDs and parameters before execution.
    • Ensure the JSON request body matches the expected schema.
    • Refresh or reconfigure API credentials if authorization errors occur.
    • Use the client_token property to safely retry operations without duplication.

Links and References

Discussion