Lark Files icon

Lark Files

Lark Files Management

Overview

The node manages subscriptions related to file documents in the Lark Files system, specifically allowing users to update the subscription status of a document. This is useful when you want to programmatically control whether a user or system is subscribed to notifications or updates for a particular file.

A common scenario is automating subscription management based on workflow conditions — for example, subscribing a user to a document when they are assigned a task related to it, or unsubscribing them when the task is completed.

Practical example:

  • Automatically subscribe team members to important project files when a new version is uploaded.
  • Unsubscribe users from notifications when they no longer need updates on a document.

Properties

Name Meaning
Authentication Method of authentication to use: either "Tenant Token" or "OAuth2".
File Token The unique token identifying the file for which the subscription status is being updated.
Subscription Id The unique identifier of the subscription to update.
Is Subscribe Boolean flag indicating whether to subscribe (true) or unsubscribe (false).
File Type String specifying the type of the file (e.g., document, spreadsheet).
Custom Body JSON object allowing custom request body content to be sent instead of the standard fields.
Options > Use Custom Body Boolean option to toggle between using the standard properties or sending a custom JSON body.

Output

The node outputs JSON data representing the response from the Lark Files API after attempting to update the subscription status. This typically includes confirmation of the updated subscription state or error details if the operation failed.

No binary data output is involved.

Dependencies

  • Requires an active connection to the Lark Suite Open APIs.
  • 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.

Troubleshooting

  • Invalid Credentials: If authentication fails, verify that the correct API key or OAuth2 token is provided and has sufficient permissions.
  • Subscription Not Found: Ensure the Subscription Id corresponds to an existing subscription; otherwise, the API will return an error.
  • File Token Issues: The File Token must be valid and correspond to the file associated with the subscription.
  • Custom Body Errors: When using the custom body option, ensure the JSON structure matches the API requirements; malformed JSON or missing required fields can cause failures.
  • Boolean Field Misuse: The Is Subscribe field must be a boolean; passing other types may lead to unexpected behavior.

Links and References

Discussion