FM
FlowMarket
General Automation Intermediate ⚡ 10 n8n Nodes

Simple file based key value store WriteKey

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...

🔌 Nodes & Integrations Used (4)

Write Binary File Function Item Read Binary Files Move Binary Data

📖 Implementation & Setup Guide

Store a key with a value in a local json file. Multiple keys could be saved in a single file.

Related workflow: [GetKey](https://n8n.io/workflows/1408)

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 the correct access rights `chmod 1000.1000 local-files`.

Put the workflow code in a new workflow named `WriteKey`.

Create another workflow with a `function item`:

```js return { file: '/4711.json', // 4711 should be your workflow id key: 'MyKey', value: 'MyValue' } ```

Pipe the `function item` to an `Execution Workflow` that calls the `WriteKey` workflow.

It would be nice if we could get someday a shiny built-in n8n node that does the job. :)

⚡ How to import this workflow into n8n:

  1. Click the Direct Download JSON button above to save Simple file based key value store _WriteKey_.json.
  2. Log in to your n8n Cloud or self-hosted n8n instance.
  3. In your workflow canvas, click the menu in top-right and select Import from File (or paste the JSON directly).
  4. Configure your credentials (e.g. API keys, database URLs) in the corresponding node settings.
  5. Click Execute Workflow to test and switch to Active!

Related General Automation Workflows

View All in General Automation →