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
- 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
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.
List of all available operations in this node.
- List files
- List all files in the specified folder
- Get a single file with it's binary (download is now possible)
- Upload files
- Possibility to overwrite an already existing file
- 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)
- Dynamic dropdown to select a permission ID
- Dynamic dropdown depending on the selected ID to select a specific label(s) to revoke share link from.
- Share by Link (File or Folder)
- With multi-label handling, 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.
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://<INSTANCE_URL>/auth/register" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
--data-raw '{
"redirect_uris": ["<N8N_REDIRECT_URL>"],
"client_name": "n8n Twake Drive",
"software_id": "github.com/cozy/n8n-nodes-twakedrive",
"client_kind": "web"
}'
- Replace
INSTANCE_URLwith your instance domain (e.ghttps://example.mycozy.cloudorhttps://example.twake.linagora.com) - Replace
N8N_REDIRECT_URLwith theOAuth Redirect URLyou copied from the credentials setup window - Send the modified cURL request in your terminal
- Copy both the
client_idand theclient_secretfrom the response - Paste those values into the appropriate fields in the credentials setup window
- Fill the remaining fields as shown in the examples under each field
- Connect to your instance
Doing it all in n8n is possible. Follow these steps:
- Replace
INSTANCE_URLby your instance domain (e.ghttps://example.mycozy.cloudorhttps://example.twake.linagora.com) - Replace
N8N_REDIRECT_URLwith theOAuth Redirect URLyou copied from the credentials setup window - Create a new workflow and add an
HTTP Requestnode from n8n node search panel. - Click Import cURL (currently located in the upper-right of the node panel).
- Paste the modified cURL request
- Execute the node
- Copy both the
client_idand theclient_secretfrom the response - Paste those values into the appropriate fields in the credentials setup window
- Fill the remaining fields as shown in the examples under each field
- Connect to your instance
Ta-da 🎉, you are now connected via OAuth2.
Client registration via the instance's settings is planned for future updates
Tested with:
- Cozy Stack v1.6.39+
- n8n v1.0+
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.
- Ensure
uploadFileoperation return all input binaries
getFileFolderreturn data structure has been changed. If you are using this operation in your workflow, you will need to make modifications accordingly
It was not meant to be pushed already, but this kind of changes will come in the future for every operations to harmonize returned items
- Little patch to fix the binary's return on
getFileFolderoperation
- Finally getting the actual OAuth2 authentication for the node
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
- Use
requestWithAuthenticationfor all operations and load-options - Standardize outputs: each operation returns a single top-level object named after the operation
- Add Rename File operation
- Files, Folder and Share operations: refactor, more robust JSON parsing and binary handling; clearer errors
- Load-options: permissions list fetched via authenticated requests with
- Add overwrite possibility in uploadFile if file with same name already exists
- Rename
listFilesoperation togetFileFolderand improve it- Remove
listAllFilesoption as it was not revelant - Remake the function to use two mode only :
FileandFolder.Filemode will return a single file with it's metadata and it's binary.Folderwill return the content of the specified folder, no binaries
- Remove
- Remove
getOneFileoperation, as it is now handle bygetFileFolder - Sanitize
instanceUrlinput from credential to avoid trailing slashes - Only one item return by operation, for UI clarity and usage
- Little modifications such as renaming some files or actions and descriptions for clearer UI
- Transfer repo ownership to Cozy Github organisation
- Using manual OAuth to get an app token instead of an admin token
- Folders operations (as listed above)
- Shares operations (as listed above)
- Add "byDirectory" option on
listFilesoperation - Move
ezlog(Little function to save an item during execution) in/utilsfolder for clarity - Split operations in ressource categories in the n8n UI
- Connect via a locally generated token
- Files operations (as listed above)