Actions28
- File Actions
- Multipart Upload File Actions
- Permission Member Actions
- Permissionpublic Actions
- Statistic Actions
- Media Actions
- Multipart Upload Media Actions
- Comment Actions
- Subscription Actions
- Document Import Actions
Overview
The node "Lark Files" provides file management capabilities for the Lark platform, specifically allowing users to delete files stored in Lark Docs. This operation is useful when you want to programmatically remove documents or files from your Lark workspace, such as cleaning up outdated files, automating document lifecycle management, or integrating file deletion into broader workflows.
A practical example would be an automated process that deletes temporary or draft files after a certain event or time period, helping maintain an organized and clutter-free document repository.
Properties
Name | Meaning |
---|---|
Authentication | Method of authentication to use: either "Tenant Token" or "OAuth2". |
Type | (Optional) The type of the document in Docs. Used as a query string parameter in the request. |
File Token | Required. The unique token identifier of the file to delete. |
Options | Additional options: |
- Use Custom Body | Boolean flag indicating whether to send a custom request body instead of the default. |
Output
The node outputs JSON data representing the response from the Lark API after attempting to delete the specified file. Typically, this will include status information confirming whether the deletion was successful or if any errors occurred.
If the node supports binary data output, it is not indicated here; thus, the output is primarily JSON-based status/result information.
Dependencies
- Requires access to the Lark Open APIs at
https://open.larksuite.com/open-apis
. - Requires valid authentication credentials, either:
- A Tenant Token credential, or
- An OAuth2 credential.
- Proper configuration of these credentials within n8n is necessary for the node to authenticate requests successfully.
Troubleshooting
Common Issues:
- Invalid or expired authentication tokens can cause authorization failures.
- Providing an incorrect or non-existent file token will result in errors indicating the file could not be found.
- Network connectivity issues may prevent the node from reaching the Lark API endpoint.
Error Messages:
- Authorization errors typically indicate problems with the provided credentials; ensure tokens are valid and have appropriate permissions.
- "File not found" or similar errors suggest the file token is incorrect or the file has already been deleted.
- If using the "Use Custom Body" option incorrectly, the request may fail due to malformed payloads.
Resolution Tips:
- Verify and refresh authentication tokens as needed.
- Double-check the file token value before running the node.
- Avoid enabling "Use Custom Body" unless you intend to customize the request payload explicitly.
Links and References
- Lark Open Platform Documentation
- Lark Docs API Reference (for file management endpoints)