Skip to main content

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:

  1. Receives a JSON object through the Payload input
  2. Receives a file path through the Path input
  3. Converts the JSON object to a formatted string with indentation
  4. Creates or overwrites the file at the specified path
  5. 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

Usage Notes

  • This node is useful for saving JSON data to files for storage or export
  • The output file will be formatted with proper indentation for readability
  • If the file already exists, it will be overwritten
  • The file path can be absolute or relative
  • Useful for data export, configuration saving, and logging workflows
  • Can be combined with other JSON nodes to prepare data before writing
  • Works with nested JSON objects and arrays
  • The output file will be in standard JSON format with proper quotes and braces
  • Supports any valid JSON structure including objects, arrays, strings, numbers, and booleans