Actions15
Overview
The node provides comprehensive file and folder management capabilities on the local disk. It supports a variety of operations such as appending data to files, reading, writing, copying, moving, compressing, extracting archives, changing permissions, listing directory contents, checking existence, retrieving metadata, searching files by pattern, renaming, creating, and removing files or folders.
The Append operation specifically allows users to add content to the end of an existing file without overwriting its current contents. This is useful in scenarios like logging incremental data, accumulating results over time, or updating configuration files dynamically.
Practical example:
You have a log file that collects events throughout the day. Using this node with the Append operation, you can add new log entries each time the workflow runs without erasing previous logs.
Properties
| Name | Meaning |
|---|---|
| Source Path | Path of the source file or folder (not used directly in Append but part of node inputs). |
| Target Path | Path of the file or folder to operate on; for Append, this is the file to append data to. |
| Data | The string content to append to the target file. |
| Encoding | File encoding used when appending data (default is "utf8"). |
Output
The output JSON object for the Append operation includes:
operation: The string"append"indicating the performed operation.success: A booleantrueindicating the operation succeeded.targetPath: The path of the file to which data was appended.
No file content is returned in the output JSON. The node does not output binary data for this operation.
Example output JSON snippet:
{
"operation": "append",
"success": true,
"targetPath": "/path/to/target/file.txt"
}
Dependencies
- Requires access to the local filesystem where the n8n instance runs.
- No external services or API keys are needed.
- Node uses standard Node.js modules (
fs,path) for file operations. - Ensure the n8n process has appropriate read/write permissions on the target paths.
Troubleshooting
File Not Found or Permission Denied:
If the target file does not exist or the node lacks write permission, the append operation will fail. Verify the file path and ensure the n8n user has sufficient permissions.Invalid Encoding:
Specifying an unsupported encoding may cause errors. Use common encodings likeutf8.Appending to a Directory:
Attempting to append data to a directory path will result in an error. Confirm the target path points to a regular file.Error Messages:
Errors thrown during the append operation will be reported as node execution errors. Enabling "Continue On Fail" allows the workflow to proceed while capturing the error details in the output.