Lark Suite

Consume Lark Suite API

Overview

This node interacts with the Lark Suite API to manage documents and their content blocks. Specifically, the 'Get Blocks' operation retrieves all blocks of a specified document, supporting pagination and versioning. It is useful for workflows that need to extract structured content from Lark documents, such as content analysis, migration, or integration with other systems.

Use Case Examples

  1. Retrieve all content blocks from a document to analyze its structure.
  2. Paginate through document blocks to export content incrementally.
  3. Fetch blocks from a specific document revision for version comparison.

Properties

Name Meaning
Document ID Unique identification of the document to retrieve blocks from.
Page Size Number of blocks to retrieve per page, controlling pagination size.
Page Token Token to identify the page of results to retrieve, used for pagination.
Document Revision ID Specifies the document version for the query, allowing retrieval of blocks from a particular revision.
User ID Type Category of user ID to use in the query, such as Open ID, Union ID, or User ID.

Output

JSON

  • code - Status code of the API response, 0 indicates success.
  • msg - Message from the API response, typically error or success message.
  • data
    • children - Array of block objects representing the content blocks retrieved from the document.

Dependencies

  • Requires an API key credential for Lark Suite API authentication.

Troubleshooting

  • Common issues include authentication failures due to invalid or expired API credentials. Ensure the API key and secret are correct and have necessary permissions.
  • Pagination errors may occur if the page token is invalid or expired; verify the token before use.
  • API rate limits might cause request failures; implement retry logic or reduce request frequency.

Links

Discussion