Lark Files icon

Lark Files

Lark Files Management

Overview

The "Lark Files" node enables interaction with Lark's file management API, specifically for managing media files within the Lark ecosystem. The "Upload A Material" operation allows users to upload media content (such as images, videos, or documents) to Lark's platform. This is useful in scenarios where automation workflows need to programmatically add or update media assets in Lark, for example, uploading a company logo, sharing documents in team chats, or storing media for later use in other automated processes.

Properties

Name Meaning
Authentication Method of authenticating API requests. Options: "Tenant Token" or "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 custom request body to be sent when "Use Custom Body" is true.
  • Authentication: Choose between two authentication methods to authorize the upload request.
  • Use Custom Body: When enabled, allows the user to specify a fully custom JSON payload for the upload request.
  • Custom Body: The actual JSON data sent in the request if "Use Custom Body" is enabled.

Output

The node outputs JSON data representing the response from the Lark API after attempting to upload the media. This typically includes metadata about the uploaded material such as its ID, URL, type, and status. The output does not explicitly mention binary data handling, so it is assumed that the node deals primarily with JSON metadata rather than raw binary streams.

Dependencies

  • Requires an active connection to Lark's Open API endpoint at https://open.larksuite.com/open-apis.
  • Needs either a Tenant Token or OAuth2 credentials configured in n8n to authenticate API requests.
  • No additional external dependencies are indicated beyond these API credentials.

Troubleshooting

  • Authentication Errors: If the node fails due to authentication, verify that the selected credential (Tenant Token or OAuth2) is valid and has sufficient permissions to upload media.
  • Invalid Custom Body: When using the custom body option, ensure the JSON is correctly formatted and matches the expected schema of the Lark API; otherwise, the request may fail.
  • API Rate Limits: Frequent uploads might hit rate limits imposed by Lark’s API, resulting in errors. Implement retry logic or reduce request frequency if needed.
  • Network Issues: Connectivity problems to the Lark API endpoint will cause failures; check network settings and proxy configurations if applicable.

Links and References

Discussion