Description
n8n-nodes-twakedrive
This is an n8n community node. It lets you use Twake Drive in your n8n workflows.
Twake Drive is an open source file sharing and storage platform focused on privacy and security. It’s built for efficient team collaboration with shared spaces, real-time editing, and seamless file organization. The Twake Drive app relies ont the Cozy stack API for permissions management and files operations.
n8n is a fair-code licensed workflow automation platform.
Installation
Operations
Credentials
Compatibility
Resources
Version history
Installation
- Go to Settings > Community Nodes
- Click Install a community node
- Enter
n8n-nodes-twakedrivein the “Enter npm package name” field - Acknowledge the risk: check “I understand the risks…”
- Click Install
byDropdown: Displays a dynamic list that updates as you navigate through folders. Each selection refreshes the available children, allowing you to browse the tree. The final selected item is used by the operation.byId: A simple input where the user can paste a file or folder ID. The provided ID is used directly by the operation.- List files
- Upload files
- Copy files
- Create file from text
- Delete files
- Update files
- Move files
- Rename files
- Create Folder
- Delete Folder
- Move Folder
- Rename Folder
- Delete Share (by Permissions ID)
- Share by Link (File or Folder)
Once installed, you can find it like any other node. Just search for “Twake Drive” in the node panel.
Or follow the installation guide in the n8n community nodes documentation.
Operations
List of all available operations in this node.
All operations provide a selectMode setting with two options:
Files operations
– List all files in the specified folder
– Get a single file with it’s binary (download is now possible)
– Possibility to overwrite an already existing file
– Possibility to overwrite an already existing file
– Possibility to save whether an io.cozy.notes or a .txt
– Content as Markdown supported for io.cozy.notes files
Folders operations
Shares operations
– Dynamic dropdown to select a permission ID
– With expiration possibility and password protection.
Different improvements (like dynamic lists when relevant on files and folders operations or Triggers operations) are planned for future updates.
Credentials
This node uses an OAuth 2.0 authentication.
> Note:
> For now, client creation is only possible via a cURL or HTTP request. See the tutorial below.
In both cases, the first step is to create a new credential in your n8n app. Select Twake Drive OAuth2 API in the list.
You must do this first, because you’ll need the OAuth Redirect URL shown in the credential setup window.
curl -X POST "https:///auth/register"
-H "Content-Type: application/json"
-H "Accept: application/json"
--data-raw '{
"redirecturis": ["REDIRECT_URL>"],
"client_name": "n8n Twake Drive",
"software_id": "github.com/cozy/n8n-nodes-twakedrive",
"client_kind": "web"
}'
#### CURL method
INSTANCE_URL with your instance domain (e.g https://example.mycozy.cloud or https://example.twake.linagora.com)N8NREDIRECTURL with the OAuth Redirect URL you copied from the credentials setup windowclientid and the clientsecret from the response#### N8N node method
Doing it all in n8n is possible. Follow these steps:
INSTANCE_URL by your instance domain (e.g https://example.mycozy.cloud or https://example.twake.linagora.com)N8NREDIRECTURL with the OAuth Redirect URL you copied from the credentials setup windowHTTP Request node from n8n node search panel.clientid and the clientsecret from the responseTa-da 🎉, you are now connected via OAuth2.
Client registration via the instance’s settings is on the way, coming very soon …
Compatibility
Tested with:
Resources
This is a community node. If you encounter issues or have feature requests, feel free to open an issue or PR on the GitHub repository.
Version history
1.6.0
1.5.0
1.4.2
shareByLink, preventing permissions from being created without a usable share link.deleteShareByLink, since each share operation now produces a single share link per permission.1.4.0
#### 🚨 Breaking changes
createFileFromText has been improved. Users can now choose to save a new file as io.cozy.notes or as a simple .txt file. In the case of a Cozy Note, markdown is supported for the file content.data object), just like getFileFolder in the previous-to-last version (1.3.1). No more “embellishments”. This will affect existing workflows, as expression paths inside operations will no longer be the same.TwakeDriveNode.node.ts file, with properties, descriptions and option loaders separated into dedicated directories.1.3.2
uploadFile operation return all input binaries1.3.1
#### 🚨 Breaking changes
getFileFolder return data structure has been changed. If you are using this operation in your workflow, you will need to make modifications accordinglyIt was not meant to be pushed already, but this kind of changes will come in the future for every operations to harmonize returned items
getFileFolder operation1.3.0
#### 🚨 Breaking changes
You will no longer be able to run your workflow from v1.2.0 and under, authentication method has changed, all operation have been rebuilt accordingly
requestWithAuthentication for all operations and load-options1.2.0
listFiles operation to getFileFolder and improve it – Remove listAllFiles option as it was not revelant
– Remake the function to use two mode only : File and Folder. File mode will return a single file with it’s metadata and it’s binary. Folder will return the content of the specified folder, no binaries
getOneFile operation, as it is now handle by getFileFolderinstanceUrl input from credential to avoid trailing slashes1.1.1
1.1.0
listFiles operationezlog (Little function to save an item during execution) in /utils folder for clarity