Actions14
- File/Folder Actions
- File Actions
- Folder Actions
- Share Actions
File → Create File From Text
AI-generatedOverview
This node operation creates a new file from provided text content in a specified destination folder within Twake Drive. It supports specifying the destination folder either by browsing a dropdown or manually entering the folder ID. Users can set a new name for the created file, decide whether to overwrite an existing file with the same name, and optionally save the file as a Cozy Note instead of a plain text file. This operation is useful for automating the creation of text files or notes directly within Twake Drive, such as generating logs, reports, or notes from workflow data.
Use Case Examples
- Creating a text file with a summary report in a specific project folder.
- Automatically generating a note from form input data and saving it as a Cozy Note in Twake Drive.
Properties
| Name | Meaning |
|---|---|
| Destination Select Mode | Method to select the destination folder, either by browsing a dropdown or by manually entering the folder ID. |
| Parent Folder (Destination) Name or ID | The parent folder where the new file will be created, selectable from a list or via expression. Leave empty for root folder. |
| Destination Folder ID (Manual) | The ID of the destination folder specified manually when 'By ID' mode is selected. |
| New Name | The new name for the created file. |
| Text | The text content to be written into the new file. |
| Overwrite if Exists | Whether to overwrite an existing file with the same name in the destination folder. |
| Save as io.cozy.notes | Whether to save the created file as a Cozy Note instead of a plain text file. |
Output
JSON
id- The unique identifier of the created file.name- The name of the created file.parentId- The ID of the parent folder where the file was created.content- The text content of the created file.type- The type of the created file, e.g., plain text or Cozy Note.
Dependencies
- Requires Twake Drive API credentials (OAuth2) for authentication.
Troubleshooting
- Common issues include invalid folder ID or insufficient permissions to create files in the specified folder.
- Error messages may indicate authentication failures, invalid parameters, or conflicts if overwrite is false and a file with the same name exists.
- Ensure the destination folder exists and the API credentials have the necessary scopes to create files.