Actions106
- 日历 Actions
- 多维表格 Actions
- 知识库 Actions
- 通讯录 Actions
- 任务 Actions
- 电子表格 Actions
- 云空间 Actions
- 消息 Actions
- 云文档 Actions
Overview
This node integrates with Feishu's document service to update the content of a specific block within a cloud document. It is useful when you want to programmatically modify parts of a document, such as updating text, images, or other embedded elements inside a block structure.
Typical use cases include:
- Automating document updates based on external data changes.
- Batch editing or patching sections of documents without manual intervention.
- Implementing workflows that require dynamic document content modification.
For example, you might use this node to update a paragraph block in a meeting notes document whenever new information becomes available, ensuring the document stays current without manual edits.
Properties
| Name | Meaning |
|---|---|
| 文档 ID | The unique identifier of the document to be updated. |
| 父块 ID | The parent block's ID under which child blocks are created or updated. To create or update blocks at the root of the document tree, provide the document ID here. |
| 文档版本 | 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 provided, the update operation is performed idempotently using this token. |
| 用户 ID 类型 | The type of user ID used for identification. Options are: Open_id, Union_id, User_id. |
| 请求体JSON | The JSON body of the request specifying the content and changes to apply to the block. This should follow the API specification detailed at: https://open.feishu.cn/document/server-docs/docs/docs/docx-v1/document-block/patch#1b8abd5d |
Output
The node outputs an array of JSON objects representing the response from the Feishu document API after attempting to update the block content. Each output item corresponds to an input item processed.
The json output typically contains confirmation details about the update operation, including any returned tokens or status indicators confirming success or failure.
This node does not output binary data.
Dependencies
- Requires an API key credential for authenticating with Feishu's API.
- Needs network access to Feishu's document service endpoints.
- The node depends on the Feishu API's document block update endpoint as specified in the official documentation.
Troubleshooting
Common issues:
- Invalid or expired API credentials will cause authentication failures.
- Providing incorrect document or block IDs may result in "not found" errors.
- Sending malformed JSON in the request body can lead to validation errors.
- Using an outdated document version number might cause conflicts or rejection by the API.
Error messages:
- Errors related to idempotency token misuse (e.g., duplicate tokens) require generating a new unique token or clearing the existing one.
- Network or timeout errors suggest checking connectivity or retrying later.
- Permission denied errors indicate insufficient API permissions or scopes.
To resolve these, verify credentials, ensure correct property values, validate JSON syntax, and consult Feishu API error codes for more details.
Links and References
- Feishu Document Block Update API:
https://open.feishu.cn/document/server-docs/docs/docs/docx-v1/document-block/patch#1b8abd5d