Lark Files icon

Lark Files

Lark Files Management

Overview

The node "Lark Files" provides management capabilities for files and comments within the Lark (Feishu) document ecosystem. Specifically, the "Update A Reply" operation under the "Comment" resource allows users to update the content of a reply to a comment on a document.

This operation is useful when you want to programmatically modify feedback or discussions attached to documents, such as correcting a reply, adding more information, or updating links and references in collaborative document workflows.

Practical examples:

  • Automatically updating replies in document comments based on external triggers or workflows.
  • Correcting typos or outdated information in comment replies without manual intervention.
  • Adding dynamic content like links or user mentions in replies during automated document review processes.

Properties

Name Meaning
Authentication Method of authentication to use: either "Tenant Token" or "OAuth2".
File Type Type of the document (string). Used as a query parameter in the request.
File Token Token identifying the specific document. Required to locate the document where the comment exists.
Comment Id Numeric ID of the comment to which the reply belongs.
Reply Id Numeric ID of the reply that will be updated.
Content JSON object representing the new content of the reply. It includes elements like text runs, links, and person mentions. This is parsed from a JSON string input.
Custom Body Allows sending a fully custom JSON body instead of the standard content structure. Useful for advanced or non-standard payloads. Only used if "Use Custom Body" option is enabled.
Options > Use Custom Body Boolean flag indicating whether to send the "Custom Body" JSON directly instead of the standard "Content" property.

Output

The node outputs the response from the Lark API after updating the reply. The main output is a JSON object containing details about the updated reply, typically including identifiers, updated content, timestamps, and status information.

If the API supports binary data in responses (not indicated here), it would be summarized accordingly, but this operation primarily deals with JSON data.

Dependencies

  • Requires an active connection to the Lark (Feishu) Open API.
  • Needs either a Tenant Token or OAuth2 credentials configured in n8n for authentication.
  • The base URL for API requests is https://open.larksuite.com/open-apis.
  • Proper permissions/scopes must be granted to the API credentials to allow comment reply updates.

Troubleshooting

  • Common issues:

    • Invalid or expired authentication tokens leading to authorization errors.
    • Incorrect or missing file_token, comment_id, or reply_id causing "not found" or "invalid parameter" errors.
    • Malformed JSON in the content property causing parsing or validation failures.
    • Using Custom Body incorrectly without enabling the corresponding option.
  • Error messages and resolutions:

    • 401 Unauthorized: Check that the API credentials are valid and have not expired.
    • 404 Not Found: Verify that the file token, comment ID, and reply ID are correct and exist.
    • 400 Bad Request: Ensure the JSON content is well-formed and matches the expected schema.
    • Invalid JSON parse error: When using the content field, ensure the JSON string is properly formatted; consider using the Custom Body option for complex payloads.

Links and References

Discussion