Twake Drive icon

Twake Drive

Basic Twake Drive

Overview

This node integrates with Twake Drive to manage files and directories within a Twake instance. Specifically, the Create File From Text operation allows users to create a new text file containing specified textual content. This is useful for automating the generation of notes, logs, or any textual data that needs to be saved as a file in Twake Drive.

Practical examples include:

  • Automatically creating a report file from workflow data.
  • Saving user input or form submissions as text files.
  • Generating configuration or script files dynamically during automation.

Properties

Name Meaning
Choose Destination Folder Boolean option to specify whether to save the new file in a custom directory.
Directory ID The ID of the target directory where the new file will be created (required if above is true).
New Name The name of the new text file to be created (e.g., myNewFile.txt).
Text The textual content to write inside the newly created file.

Output

The node outputs an array of items corresponding to each input item processed. Each item's .json property contains details about the created file, such as its metadata returned by the Twake Drive API. This typically includes file ID, name, path, creation date, and other relevant attributes.

No binary data output is produced by this operation since it deals exclusively with text content.

Dependencies

  • Requires an API key credential for authenticating with the Twake Drive service.
  • The node depends on internal helper functions (FilesHelpers) to interact with the Twake Drive API.
  • Proper configuration of the API credentials in n8n is necessary for successful operation.

Troubleshooting

  • Common issues:

    • Providing an invalid or empty directory ID when "Choose Destination Folder" is enabled will cause errors.
    • Missing or incorrect API credentials will prevent authentication.
    • Invalid file names or unsupported characters may cause the file creation to fail.
  • Error messages:

    • Errors returned from the Twake Drive API are captured and included in the output under errorMessage and errorResponse.
    • If the node is not set to continue on failure, it will throw an error stopping execution on the first failure.
  • Resolutions:

    • Verify the directory ID exists and is accessible.
    • Ensure the API key credential is valid and has sufficient permissions.
    • Use valid file names following Twake Drive naming conventions.

Links and References

Discussion