AutomationFlowsGeneral › Simple File-Based Key Value Store Get Key

Simple File-Based Key Value Store Get Key

Original n8n title: Simple File Based Key Value Store Getkey

Simple File Based Key Value Store Getkey. Uses manualTrigger, functionItem, readBinaryFile, moveBinaryData. Event-driven trigger; 5 nodes.

Event trigger★★★★☆ complexity5 nodesFunction ItemRead Binary FileMove Binary Data
General Trigger: Event Nodes: 5 Complexity: ★★★★☆ Added:

The workflow JSON

Copy or download the full n8n JSON below. Paste it into a new n8n workflow, add your credentials, activate. Full import guide →

Download .json
{
  "nodes": [
    {
      "name": "On clicking 'execute'",
      "type": "n8n-nodes-base.manualTrigger",
      "position": [
        240,
        280
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "name": "Config",
      "type": "n8n-nodes-base.functionItem",
      "position": [
        420,
        280
      ],
      "parameters": {
        "functionCode": "return {\n  file: '/home/node/.n8n/local-files' + item.file,\n  key: item.key,\n  default: item.default\n}"
      },
      "typeVersion": 1
    },
    {
      "name": "Read Binary File",
      "type": "n8n-nodes-base.readBinaryFile",
      "position": [
        600,
        280
      ],
      "parameters": {
        "filePath": "={{$json[\"file\"]}}"
      },
      "typeVersion": 1,
      "continueOnFail": true,
      "alwaysOutputData": true
    },
    {
      "name": "BinaryToJSON",
      "type": "n8n-nodes-base.moveBinaryData",
      "position": [
        780,
        280
      ],
      "parameters": {
        "options": {}
      },
      "typeVersion": 1,
      "alwaysOutputData": true
    },
    {
      "name": "ReturnValue",
      "type": "n8n-nodes-base.functionItem",
      "position": [
        960,
        280
      ],
      "parameters": {
        "functionCode": "const key = $node[\"Config\"].json[\"key\"]\nconst defaultValue = $node[\"Config\"].json[\"default\"]\n\nlet value\nif (item) {\n  value = item[key] || defaultValue\n} else {\n  value = defaultValue\n}\n\nreturn {\n  [ key ]: value\n}"
      },
      "typeVersion": 1
    }
  ],
  "connections": {
    "Config": {
      "main": [
        [
          {
            "node": "Read Binary File",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "BinaryToJSON": {
      "main": [
        [
          {
            "node": "ReturnValue",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Read Binary File": {
      "main": [
        [
          {
            "node": "BinaryToJSON",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "On clicking 'execute'": {
      "main": [
        [
          {
            "node": "Config",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}
Pro

For the full experience including quality scoring and batch install features for each workflow upgrade to Pro

About this workflow

Simple File Based Key Value Store Getkey. Uses manualTrigger, functionItem, readBinaryFile, moveBinaryData. Event-driven trigger; 5 nodes.

Source: https://github.com/Zie619/n8n-workflows — original creator credit. Request a take-down →

More General workflows → · Browse all categories →

Related workflows

Workflows that share integrations, category, or trigger type with this one. All free to copy and import.

General

Simple File Based Key Value Store Writekey. Uses manualTrigger, writeBinaryFile, functionItem, readBinaryFiles. Event-driven trigger; 10 nodes.

Write Binary File, Function Item, Read Binary Files +1
General

Execute Multiple Command Lines Based On Text File Inputs. Uses manualTrigger, readBinaryFile, moveBinaryData, executeCommand. Event-driven trigger; 7 nodes.

Read Binary File, Move Binary Data, Execute Command
General

Standup Bot 2 4 Read Config. Uses manualTrigger, readBinaryFile, moveBinaryData. Event-driven trigger; 3 nodes.

Read Binary File, Move Binary Data
General

Standup Bot - Read Config. Uses manualTrigger, readBinaryFile, moveBinaryData. Event-driven trigger; 3 nodes.

Read Binary File, Move Binary Data
General

Using n8n a lot?

Execute Workflow Trigger, XML, Move Binary Data +1