Write JSON File
Controlled node
Overview
The Write JSON File node serializes input data as formatted JSON and saves it as a .json file in the project library. It is useful for exporting structured workflow output, API responses, configuration data, extracted records, or AI-generated structured data.
Inputs
| Input | Type | Description | Default |
|---|---|---|---|
| Run | Event | Triggers the JSON file creation and upload. | - |
| Data | Data | The data to serialize as JSON. | - |
| Name | Data | The filename for the generated JSON file. If the name does not end with .json, the extension is appended automatically. | - |
| Path | Data | Optional folder path in the library where the JSON file should be saved. Missing folders are created automatically. If omitted, the file is saved in the root library folder. | root |
Outputs
| Output | Type | Description |
|---|---|---|
| Done | Event | Fires when the node has finished running. |
| File | Data | The generated library file reference. If serialization or upload fails, this output contains an error object. |
Runtime Behavior and Defaults
- Controlled Node: The node runs only when the Run event fires.
- Project Requirement: A runtime project ID is required so the JSON file can be uploaded to the project library.
- Filename Handling: The node requires a non-empty Name input.
.jsonis appended if the extension is missing. - Directory Creation: If Path is provided, the node creates or resolves that library folder path before uploading.
- JSON Serialization: Data is serialized with indentation for readability.
- Error Handling: If data, project ID, filename, JSON serialization, or upload fails, File contains an error object instead of a file reference.
Example Usage
Export Structured Data
- Connect output from AI Write Data, Dictionary, or another structured data node to Data.
- Set Name to
"extracted-records". - Optionally set Path to
"exports/json". - Trigger Run from a Start node or another event.
The node saves extracted-records.json to the library and outputs the generated file reference.
tip
Use Read JSON File later in another workflow to parse the saved JSON file back into data.