Lark Files icon

Lark Files

Lark Files Management

Overview

This node is designed to update the permissions of a collaborator (member) on a file within the Lark Files system. It allows users to modify access rights for specific members by specifying their ID and the new permission level. This is particularly useful in collaborative environments where file access needs to be dynamically managed, such as granting edit rights to a team member or revoking view permissions.

Practical examples include:

  • Changing a team member's permission from "viewer" to "editor" on a shared document.
  • Updating access rights when a collaborator's role changes within a project.
  • Revoking permissions for a user who no longer requires access to a file.

Properties

Name Meaning
Authentication Method of authentication to use: either "Tenant Token" or "OAuth2".
Type The type of the file (e.g., document type or category).
Token The unique token identifier of the file whose permissions are being updated.
Member Id The identifier of the member whose permissions will be updated.
Member Type The type/category of the member (e.g., user, group).
Perm The new permission level to assign to the member (e.g., read, write).
Custom Body A JSON object allowing custom request body content to be sent instead of the standard fields.
Options Additional options including whether to use a custom request body (useCustomBody boolean flag).

Output

The node outputs JSON data representing the response from the Lark Files API after attempting to update the collaborator’s permissions. This typically includes confirmation of the update, details about the updated permissions, or error information if the operation failed.

If binary data were involved (not indicated here), it would represent files or attachments related to the operation, but this node focuses on permission metadata only.

Dependencies

  • Requires an active connection to the Lark Files API.
  • Needs either a Tenant Token or OAuth2 credentials configured in n8n for authentication.
  • Network access to https://open.larksuite.com/open-apis is necessary.

Troubleshooting

  • Invalid Token or Member ID: Errors may occur if the file token or member ID is incorrect or does not exist. Verify these values before running the node.
  • Insufficient Permissions: The authenticated user must have rights to modify permissions on the target file; otherwise, the API will reject the request.
  • Incorrect Permission Values: Ensure that the perm property uses valid permission strings supported by Lark Files.
  • Using Custom Body: If enabling the custom body option, ensure the JSON structure matches the API requirements to avoid malformed request errors.
  • Authentication Failures: Confirm that the selected authentication method is properly configured and the credentials are valid.

Links and References

Discussion