Lark Files icon

Lark Files

Lark Files Management

Overview

This node, part of the "Lark Files" collection, facilitates file management operations within the Lark Suite environment. Specifically, the "Upload A Material In Blocks Upload Blocks" operation under the "Multipart Upload Media" resource enables uploading large media files in multiple blocks (chunks). This approach is useful for handling big files that need to be uploaded reliably and efficiently by splitting them into smaller parts.

Common scenarios include:

  • Uploading large video or audio files to Lark's cloud storage.
  • Incrementally sending file data to avoid timeouts or memory issues.
  • Resuming interrupted uploads by managing individual blocks.

Practical example: A user wants to upload a large training video to Lark Drive. Instead of uploading it in one go, the node splits the video into blocks and uploads each block sequentially, ensuring better reliability and control over the upload process.

Properties

Name Meaning
Authentication Method of authenticating API requests. Options: Tenant Token, OAuth2
Use Custom Body Boolean flag indicating whether to send a custom JSON body instead of the default format
Custom Body JSON object representing a fully customized request body to send when "Use Custom Body" is enabled

Output

The node outputs JSON data representing the response from the Lark Suite API after uploading a block of the media file. This typically includes metadata about the uploaded block such as block ID, status, and any relevant upload session information.

If binary data is involved (e.g., the actual file content), it is handled internally during the upload process but not outputted directly by this node.

Dependencies

  • Requires an API authentication token, either via a Tenant Token or OAuth2 credentials configured in n8n.
  • Connects to the Lark Suite Open APIs at https://open.larksuite.com/open-apis.
  • No additional external dependencies beyond standard HTTP requests.

Troubleshooting

  • Authentication errors: Ensure that the provided API token or OAuth2 credentials are valid and have sufficient permissions for file upload operations.
  • Invalid custom body: If using the "Custom Body" option, verify that the JSON structure matches the expected API schema; malformed JSON will cause request failures.
  • Network issues/timeouts: Large file uploads may fail due to network instability; consider retrying or splitting files into smaller blocks.
  • API rate limits: Frequent block uploads might hit API rate limits; monitor usage and implement delays if necessary.

Links and References

Discussion