blokboard/ Open beta

Node reference

Work with text, JSON, and CSV files

Read file items, write structured data, and save the completed result.

Files

A value of type file identifies a file during the current run. Open file takes an absolute path on the Desktop machine. Create file makes a temporary writable file. Pass their complete output through an exact expression; a name or path string is not a file value.

Jump to a node: Open file | Read file | Create file | Write file | Save file.

Choose a file type

Read file and Write file select JSON, CSV, or TXT in the File type dropdown from the referenced file name. Changing the file updates the selection, and you can choose a different type yourself. Leave File empty to use the incoming file value. Without a known file, or for an unknown extension, the selection is Custom, which reads or appends raw text without adding line endings.

TypeRead file outputWrite file input
TXTOne {line, lineNumber} per lineText or a list of lines; each gets a line ending
CSVOne object per row, keyed by the headerOne object or an array of objects
JSONOne execution per array item, or one for a single object/valueA JSON-compatible value
CustomOne {text} containing the complete fileRaw text to append

CSV exposes editable delimiter, quote, and escape characters plus an empty-row setting. The delimiter starts as a comma; enter \t for tab-separated files. CSV values are text; convert numeric fields explicitly when calculating. Quoted fields can include line breaks.

Build a CSV report

Create the output file once before Read file starts emitting rows. Connect Read file.out to Code to transform each row, then Write file to append it to the output file. Connect Read file.done to Save file to save once, after all writes finish.

Write file keeps one CSV header across executions. New keys add columns, and earlier rows receive empty cells for those columns. Spreadsheet formula protection is enabled by default. Each JSON write keeps the file valid: a first value is written as supplied; subsequent values are accumulated into an array. Arrays contribute their items. An empty array adds nothing to existing content. Strings stay strings, even when they contain JSON-looking text.

Writes to the same file are serialized in arrival order. Parallel processing can change the order in which rows reach Write file. To preserve a specific order, use Merge in Collect items mode: connect processed rows and Read file.done to Merge, sort the resulting array with Code, then Write file once. Connect Save after that Write so sorting and writing finish first. TXT keeps each new item on its own line, including when the existing content has no final line ending.

Read file does not have Iterate's Execution mode setting. For work that must finish one row at a time, leave the reader's out port unconnected, connect done to Sequential Iterate, and set Items to the reader's complete out array, such as {{fileText.output.out}}. Put row actions after item and the final save after Iterate.done. This reads the file once, then processes its rows in order.

Try read and transform a CSV in the browser. It creates its own sample and output files.

File lifetime and validation

Open file by absolute path requires Desktop. Browser tab downloads a generated file through Save file when Destination path is blank. Desktop can save to a configured path. Save or send a temporary file before the run ends. A reference stored in State does not preserve its bytes. Temporary files and opened handles are released when the run finishes or stops. Saving to an existing Desktop path replaces its contents.

Invalid JSON or CSV input fails before changing the file. CSV writes require objects with at least one nonempty column name; missing cells are blank. A rejected batch leaves earlier successful writes intact. Use Create file to start a fresh document when changing formats. The done output includes itemCount and file, and waits for every downstream item path.

Under More options, Reset parameters restores the selected node defaults. The editor Undo action can restore your previous settings.

Open file

Open file makes an existing file on the Desktop machine available to this run. It returns a file reference; Read file is the next step when you need its contents.

Try it step by step

  1. Choose the Desktop runtime and create a small orders.csv on that machine.
  2. Connect Start → Open file and enter its absolute path, such as /home/you/orders.csv or C:\Users\you\orders.csv.
  3. Connect Read file and select Open file’s output in its File field using the expression picker.

What to expect

The output includes name, size, mediaType, and assetId. These describe the opened file; they are not the CSV rows.

Things to check

  • The path belongs to the machine running Desktop, which may be different from the device displaying the browser.
  • If opening fails, check the path, file existence, and operating-system read permissions.
  • Use Create file to make new temporary content. Opened source files are not the writable temporary files used by Write file.

Runtime: This operation requires Desktop.

Parameters

SettingDefaultWhat it does
File path(empty)Absolute path opened by Blokboard Desktop when this node runs.
On failurestopChoose whether a failed execution stops the workflow or only ends this path.
Retry attempts0How many additional attempts to make after the first failure.
Node name(empty)Custom display name. References and connections keep their existing identifiers.

On failure: Choices: Stop workflow (stop), Continue (continue). Available under More options.

Retry attempts: Available under More options. Limits: minimum 0.

Node name: Double-brace expressions are not resolved in this field.

Inputs

PortValueDescription
inanyTrigger that opens the configured local file.

Outputs

PortValueDescription
outfileReusable local file reference.

out fields

FieldTypeDescription
assetIdstringInternal file reference.
namestringFile name.
mediaTypestringFile type.
sizenumberFile size in bytes.
lastModifiednumberLast changed time.
writablebooleanWhether this temporary file can be changed.
cursornumberCurrent write position in bytes.

Read file

Read file detects the extension and emits text lines, CSV row objects, or JSON items. Choose a different File type to override detection.

Try it step by step

  1. Select an Open file or Create file output in File.
  2. For CSV, set the delimiter, quote, and escape characters; the first row supplies field names.
  3. Connect out to per-item work and done to the final save or summary.

What to expect

CSV emits one object per row. TXT emits {line, lineNumber}. JSON arrays emit each item; other JSON values emit once. Custom emits {text}. done includes itemCount and file.

Things to check

  • Custom reads the full decoded text for unsupported formats.
  • Quoted CSV cells can contain newlines.
  • Select the correct encoding under More options.

Keep learning

Parameters

SettingDefaultWhat it does
File{{file.output}}Opened or temporary file to read.
File typecustomDetect the type from the file extension, or choose a type yourself. Unknown extensions use Custom.
Delimiter,Character or text separating columns. Enter \t for a tab.
Quote character"One character wrapping values that contain delimiters or newlines.
Escape character"One character used to escape quotes inside quoted values. By default, quotes are doubled.
Skip empty rowstrueIgnore blank CSV rows.
Encodingutf-8Character encoding used to decode the file.
On failurestopChoose whether a failed execution stops the workflow or only ends this path.
Retry attempts0How many additional attempts to make after the first failure.
Node name(empty)Custom display name. References and connections keep their existing identifiers.

File type: Choices: Custom (raw text) (custom), TXT (plain text) (txt), JSON (json), CSV (csv).

Delimiter: Shown when format is csv. Double-brace expressions are not resolved in this field.

Quote character: Shown when format is csv. Double-brace expressions are not resolved in this field.

Escape character: Shown when format is csv. Double-brace expressions are not resolved in this field.

Skip empty rows: Shown when format is csv. Available under More options.

Encoding: Choices: UTF-8 (utf-8), Windows-1252 (windows-1252), UTF-16 LE (utf-16le). Available under More options.

On failure: Choices: Stop workflow (stop), Continue (continue). Available under More options.

Retry attempts: Available under More options. Limits: minimum 0.

Node name: Double-brace expressions are not resolved in this field.

Inputs

PortValueDescription
inanyTrigger or an opened file reference.

Outputs

PortValueDescription
outanyOne CSV row object, JSON array item, or text line per execution. A JSON object or custom text emits once.
doneobjectEmitted after every item and its downstream path complete.

The out port can emit more than once. Each emitted value starts its connected path.

done fields

FieldTypeDescription
itemCountnumberNumber of emitted items.
filefileThe opened runtime file.

The done port waits for the descendant paths of out to finish.

Create file

Create file makes a writable temporary file for this run.

Try it step by step

  1. Connect Start to Create file and choose a filename such as output.csv.
  2. Leave Content empty when Write file will populate it.
  3. Select its output in Read file or Write file using the File expression picker.

What to expect

A reusable file reference with writable: true. Creating a file does not save it to disk.

Things to check

  • Create a shared output once before per-item work begins.
  • The filename extension supplies the default format for Read file and Write file.

Keep learning

Parameters

SettingDefaultWhat it does
File nameoutput.txtName of the temporary file, including its extension.
Content(empty)Initial file contents. Leave empty for a new output file.
Media typetext/plainContent type for the temporary file, such as text/plain or text/csv.
On failurestopChoose whether a failed execution stops the workflow or only ends this path.
Retry attempts0How many additional attempts to make after the first failure.
Node name(empty)Custom display name. References and connections keep their existing identifiers.

Media type: Available under More options.

On failure: Choices: Stop workflow (stop), Continue (continue). Available under More options.

Retry attempts: Available under More options. Limits: minimum 0.

Node name: Double-brace expressions are not resolved in this field.

Inputs

PortValueDescription
inanyOptional content to place in the new memory file.

Outputs

PortValueDescription
outfileFile available for the rest of this run.

out fields

FieldTypeDescription
assetIdstringInternal file reference.
namestringFile name.
mediaTypestringFile type.
sizenumberFile size in bytes.
lastModifiednumberLast changed time.
writablebooleanWhether this temporary file can be changed.
cursornumberCurrent write position in bytes.

Write file

Write file adds text, JSON values, or CSV rows to a temporary file. File type follows its extension unless you select an override.

Try it step by step

  1. Create an empty output.txt, output.json, or output.csv once before the item loop.
  2. Select that file in Write file and connect the data to write to its input.
  3. Use the reader or iterator done output to save after all writes finish.

What to expect

CSV merges new column names into one header without dropping earlier rows. JSON stays valid across writes, accumulating subsequent values into an array. TXT adds a line ending per item; Custom appends raw text.

Things to check

  • CSV accepts row objects or arrays of objects, including rows with different keys.
  • JSON input must be a JSON-compatible value; unsupported values leave the file unchanged.
  • Keep spreadsheet formula protection enabled for untrusted text.
  • Changing a format does not convert existing content. Start a new temporary file for a new format.

Keep learning

Parameters

SettingDefaultWhat it does
File{{createdFile.output}}Temporary file to update. Create it once before processing multiple items.
File typecustomDetect the type from the file extension, or choose a type yourself. Unknown extensions use Custom.
Delimiter,Character or text separating columns. Enter \t for a tab.
Quote character"One character wrapping values that contain delimiters or newlines.
Escape character"One character used to escape quotes inside quoted values. By default, quotes are doubled.
Protect spreadsheet formulastruePrefix formula-like text with an apostrophe so spreadsheet apps treat it as text.
Pretty printtrueIndent JSON for readability.
New linelfLine ending for plain text and CSV.
On failurestopChoose whether a failed execution stops the workflow or only ends this path.
Retry attempts0How many additional attempts to make after the first failure.
Node name(empty)Custom display name. References and connections keep their existing identifiers.

File type: Choices: Custom (raw text) (custom), TXT (plain text) (txt), JSON (json), CSV (csv).

Delimiter: Shown when format is csv. Double-brace expressions are not resolved in this field.

Quote character: Shown when format is csv. Double-brace expressions are not resolved in this field.

Escape character: Shown when format is csv. Double-brace expressions are not resolved in this field.

Protect spreadsheet formulas: Shown when format is csv. Available under More options.

Pretty print: Shown when format is json.

New line: Choices: LF (lf), CRLF (crlf). Shown when format is one of txt, csv. Available under More options.

On failure: Choices: Stop workflow (stop), Continue (continue). Available under More options.

Retry attempts: Available under More options. Limits: minimum 0.

Node name: Double-brace expressions are not resolved in this field.

Inputs

PortValueDescription
inanyText, a JSON value, or CSV row objects to add.

Outputs

PortValueDescription
outfileThe updated temporary file.

out fields

FieldTypeDescription
assetIdstringInternal file reference.
namestringFile name.
mediaTypestringFile type.
sizenumberFile size in bytes.
lastModifiednumberLast changed time.
writablebooleanWhether this temporary file can be changed.
cursornumberCurrent write position in bytes.

Save file

Save file downloads a temporary file in Browser tab or writes it to a path in Desktop.

Try it step by step

  1. Connect Create file or Write file to Save file.
  2. Select that node’s file output in File, or clear the field to use the incoming file.
  3. Leave Destination path blank for a browser download. On Desktop, enter an absolute path such as /home/you/totals.csv.

What to expect

The browser downloads the file under its name, or Desktop writes it to the destination. The node returns the file reference.

Things to check

  • Check browser download permissions or the Desktop directory and write permissions when a save fails.
  • For one file after processing, connect the reader’s or iterator’s done path to Save file.
  • Saving workflow JSON does not save temporary file contents.

Parameters

SettingDefaultWhat it does
File{{createdFile.output}}Temporary file to save.
Destination path(empty)Leave blank to download in Browser tab. Enter an absolute path to save through Desktop.
On failurestopChoose whether a failed execution stops the workflow or only ends this path.
Retry attempts0How many additional attempts to make after the first failure.
Node name(empty)Custom display name. References and connections keep their existing identifiers.

On failure: Choices: Stop workflow (stop), Continue (continue). Available under More options.

Retry attempts: Available under More options. Limits: minimum 0.

Node name: Double-brace expressions are not resolved in this field.

Inputs

PortValueDescription
inanyTrigger or a temporary file reference.

Outputs

PortValueDescription
outfileThe temporary file after it has been saved.

out fields

FieldTypeDescription
assetIdstringInternal file reference.
namestringFile name.
mediaTypestringFile type.
sizenumberFile size in bytes.
lastModifiednumberLast changed time.
writablebooleanWhether this temporary file can be changed.
cursornumberCurrent write position in bytes.