Templates / Simple file based key value store (WriteKey)

Simple file based key value store (WriteKey)

Needs changes

by Peter · 1,693 views · created 2022-01-24 · File Management

Needs changes. This template uses 4 thing(s) that n8n 3.0 removes: Write Binary File, Function Item (legacy), Read Binary Files, Convert to/from binary data. 4 breaking item(s) found. Static check, last run 2026-10-19.

What this workflow does

This workflow has 10 nodes and runs manually, when you click “Execute workflow”. It uses only n8n's built-in nodes.

How it runs

Trigger: Manually, when you click “Execute workflow”.

  1. SplitInBatches (Loop Over Items (Split in Batches)): loops over the items in batches
  2. Config (Function Item): runs custom JavaScript per item (legacy Function Item node)
  3. Read Binary Files: uses Read Binary Files
  4. BinaryToJSON (Convert to/from binary data): uses Convert to/from binary data
  5. SetKeyValue (Function Item): runs custom JavaScript per item (legacy Function Item node)
  6. JSONToBinary (Convert to/from binary data): uses Convert to/from binary data
  7. Write Binary File: uses Write Binary File
  8. Repeat (If): checks a condition and branches into true / false
  9. Done (Function Item): runs custom JavaScript per item (legacy Function Item node)

Before you upgrade to n8n 3.0

4 things in this workflow are removed in n8n 3.0. Fix them before you upgrade:

  • Write Binary File: replace with Read/Write Files from Disk.
  • Function Item (legacy) in Config, SetKeyValue, Done: replace with Code node, mode 'Run Once for Each Item'.
  • Read Binary Files: replace with Read/Write Files from Disk.
  • Convert to/from binary data in BinaryToJSON, JSONToBinary: replace with Convert to File or Extract from File.

Rather not rewrite it? Many of these flows can be rebuilt in Make (free plan).

Removed in 3.0Replace with
Write Binary File
Write Binary File
Read/Write Files from Disk
Function Item (legacy)
Config, SetKeyValue, Done
Code node, mode 'Run Once for Each Item'
Read Binary Files
Read Binary Files
Read/Write Files from Disk
Convert to/from binary data
BinaryToJSON, JSONToBinary
Convert to File or Extract from File

Nodes used (7)

From the author

Store a key with a value in a local json file. Multiple keys could be saved in a single file. Related workflow: GetKey Create a subfolder in your n8n homedir: /home/node/.n8n/local-files. In docker look at the data path and create a subfolder local-files. Set…

Excerpt from Peter's description on n8n.io.

View the original on n8n.io → Check your own copy

Get the weekly “what broke” email

New templates, newly broken ones, and n8n release changes. One short email a week.

Form not loading? Subscribe here.