Lark Files icon

Lark Files

Lark Files Management

Overview

The node "Lark Files" provides functionality to manage files and comments within the Lark (Feishu) ecosystem. Specifically, the operation Obtain A Comment List under the Comment resource allows users to retrieve a list of comments associated with a particular document.

This node is beneficial in scenarios where you want to programmatically access feedback, discussions, or annotations made on documents stored in Lark Docs. For example, it can be used to:

  • Aggregate all comments on a document for review or reporting.
  • Monitor new comments for notifications or workflow triggers.
  • Extract comment data for analysis or integration with other systems.

Properties

Name Meaning
Authentication Method of authenticating API requests. Options: Tenant Token, OAuth2
File Type Type of the document (e.g., doc, sheet). Optional query parameter to specify file type.
File Token Token identifier of the document whose comments are to be retrieved. Required.
Options Additional options for the request. Currently supports: Use Custom Body (boolean flag)

Output

The output contains a JSON field representing the list of comments retrieved from the specified document. Each comment typically includes details such as the comment content, author information, timestamps, and possibly metadata about replies or status.

If the node supports binary data output, it would relate to any attachments or media linked to comments, but based on the provided code and properties, the primary output is structured JSON data containing comment details.

Dependencies

  • Requires an active connection to the Lark (Feishu) Open API.
  • Needs authentication credentials configured in n8n, either via:
    • A tenant token credential, or
    • An OAuth2 credential.
  • The base URL for API requests is https://open.larksuite.com/open-apis.
  • Proper permissions/scopes must be granted to the credentials to read document comments.

Troubleshooting

  • Missing or invalid File Token: The node requires a valid file token to identify the document. Ensure this token is correct and corresponds to an accessible document.
  • Authentication errors: If the credentials are incorrect, expired, or lack necessary scopes, the API will reject requests. Verify that the tenant token or OAuth2 token is valid and has permission to read comments.
  • Incorrect File Type: Providing an unsupported or incorrect file type may result in empty results or errors. Confirm the file type matches the document.
  • API Rate Limits: Excessive requests might trigger rate limiting by the Lark API. Implement retries or backoff strategies if needed.
  • Use Custom Body option: If enabled incorrectly, it may cause malformed requests. Only use this option if you intend to provide a custom request body.

Links and References

Discussion