Write
Writes a JSON object to a file in the file system.
Common Properties
- Name - The custom name of the node.
- Color - The custom color of the node.
- Delay Before (sec) - Waits in seconds before executing the node.
- Delay After (sec) - Waits in seconds after executing node.
- Continue On Error - Automation will continue regardless of any error. The default value is false.
Inputs
- Payload - JSON object to write to a file.
- Path - File path where the JSON file will be written.
Options
This node does not have any options.
Outputs
This node does not have any outputs.
How It Works
The Write node converts a JSON object to its string representation and writes it to a file. When executed, the node:
- Receives a JSON object through the Payload input
- Receives a file path through the Path input
- Converts the JSON object to a formatted string with indentation
- Creates or overwrites the file at the specified path
- Writes the JSON string to the file
Requirements
- Valid JSON object as input
- Valid file path for writing
- Write permissions for the specified directory
Error Handling
The node will return specific errors in the following cases:
- Empty file path
- Invalid JSON object in the Payload input
- Insufficient write permissions
- File system access errors
- Invalid file path