Actions106
- 日历 Actions
- 多维表格 Actions
- 知识库 Actions
- 通讯录 Actions
- 任务 Actions
- 电子表格 Actions
- 云空间 Actions
- 消息 Actions
- 云文档 Actions
Overview
This node interacts with a cloud document service to retrieve all content blocks from a specified document. It supports pagination, allowing users to fetch large documents in manageable chunks by specifying page size and using page tokens for subsequent requests. Users can also specify the document version and the type of user ID used for identification.
Common scenarios include:
- Extracting the full structure or content of a document for processing or analysis.
- Synchronizing document content with other systems.
- Building custom views or reports based on document blocks.
Practical example:
- A user wants to export all sections (blocks) of a project document to another platform. They set the document ID, choose a page size (e.g., 100), and repeatedly call the node using the returned page token until all blocks are retrieved.
Properties
| Name | Meaning |
|---|---|
| 文档 ID | The unique identifier of the document to retrieve blocks from. |
| 分页大小 | Page size for each request; maximum allowed value is 500. |
| 分页标记 | Pagination token for fetching subsequent pages. Leave empty for the first request; use the returned token for next calls. |
| 文档版本 | Document version to query; -1 means the latest version. |
| 用户 ID 类型 | Type of user ID used for identification. Options: Open_id, Union_id, User_id. |
Output
The node outputs an array of JSON objects representing the document blocks retrieved. Each item corresponds to a block within the document, containing its data and metadata as provided by the cloud document service.
If the document contains binary data blocks (e.g., images), those would be included in the output's binary field, representing the actual binary content of those blocks.
Dependencies
- Requires an API key credential for authenticating with the cloud document service.
- The node depends on the external cloud document API to fetch document blocks.
- Proper network access and permissions to the document are necessary.
- No additional environment variables are explicitly required beyond the API authentication.
Troubleshooting
Common issues:
- Invalid or missing document ID will cause errors.
- Exceeding the maximum page size (over 500) may result in API errors.
- Using an incorrect or expired API key will lead to authentication failures.
- Incorrect pagination token usage can cause incomplete or repeated data retrieval.
Error messages:
- Errors indicating "未实现方法" (method not implemented) suggest that the requested resource-operation combination is unsupported.
- Authentication errors typically require checking the API key credential.
- Pagination-related errors often mean the page token is invalid or expired; resetting the token (empty string) starts a fresh traversal.
Links and References
- Refer to the official cloud document API documentation for details on document block structures and pagination.
- Consult the API provider’s authentication guide for setting up the required API key credentials.
- n8n documentation on pagination patterns and error handling for best practices.