Actions13
- File/Folder Actions
- File Actions
- Folder Actions
- Share Actions
Overview
This node operation "Share by Link (File or Folder)" allows users to create shareable links for files or folders stored in the Twake Drive system. It enables sharing access with configurable permissions, optional expiry times, password protection, and multiple independent share codes (labels). This is useful for scenarios where you want to securely share documents or directories with external collaborators or clients without giving them full account access.
Practical examples:
- Share a project folder with read-only access to a client, expiring after 7 days.
- Create multiple share links for a file, each labeled for different teams or clients, allowing independent revocation.
- Protect sensitive shared files with a password to add an extra layer of security.
Properties
| Name | Meaning |
|---|---|
| Target ID | The ID of the targeted file or directory to share. If left empty for a folder target, the root directory is used. |
| Access Level | The permission level granted via the share link. Options: "Read-Only" (read) or "Can Edit" (write). |
| Use Expiry | Boolean flag to enable expiration time for the share link. |
| Expiry (Duration) | When expiry is enabled, specify the duration amount and unit (Days, Hours, Minutes, Months, Seconds, Years) after which the share link will expire. |
| Protect with Password | Boolean flag to enable password protection on the share link. |
| Password | The password required to access the share link if password protection is enabled. |
| Codes (Comma-Separated Labels) | Comma-separated labels that define keys for created share codes. Each label creates a separate share link that can be revoked independently. Example: "link,clientA,clientB". |
Output
The node outputs JSON data representing the created share links and their metadata. This typically includes information such as:
- The generated share URLs or codes.
- Associated permissions and access levels.
- Expiry timestamps if set.
- Password protection status.
- Labels corresponding to each share code.
No binary data output is produced by this operation.
Dependencies
- Requires an API key credential for authenticating with the Twake Drive API.
- Needs proper configuration of the Twake Drive instance URL and API token within n8n credentials.
- Relies on the Twake Drive backend services to manage files, folders, and sharing permissions.
Troubleshooting
Common issues:
- Invalid or missing Target ID may cause failure to locate the file or folder to share.
- Incorrect API credentials or expired tokens will result in authentication errors.
- Setting expiry duration with invalid values (e.g., zero or negative numbers) may cause errors.
- Password protection enabled but no password provided will likely cause validation failures.
Error messages:
- "File or folder not found": Verify the Target ID is correct and accessible.
- "Unauthorized": Check API credentials and permissions.
- "Invalid expiry duration": Ensure the amount is a positive number and unit is valid.
- "Password required": Provide a non-empty password when password protection is enabled.
Resolving these usually involves verifying input parameters, ensuring valid credentials, and confirming resource availability.