AutomationFlowsGeneral › Data with JSON Key

Data with JSON Key

Data with json key. Uses n8nTrainingCustomerDatastore. Event-driven trigger; 6 nodes.

Event trigger★★★★☆ complexity6 nodesN8N Training Customer Datastore
General Trigger: Event Nodes: 6 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
{
  "id": "1041",
  "name": "Data with json key",
  "nodes": [
    {
      "parameters": {},
      "id": "ffd50231-c023-42c8-87da-97aae4f46435",
      "name": "When clicking \"Execute Workflow\"",
      "type": "n8n-nodes-base.manualTrigger",
      "typeVersion": 1,
      "position": [
        720,
        580
      ]
    },
    {
      "parameters": {
        "jsCode": "return [\n  {\n    json: {\n      id: 1,\n      test: '1',\n      json: {\n        foo: 'bar'\n      }\n    }\n  }\n]"
      },
      "id": "ac85d269-5a1b-40de-a0e5-5466107bfd2c",
      "name": "Code",
      "type": "n8n-nodes-base.code",
      "typeVersion": 1,
      "position": [
        960,
        580
      ]
    },
    {
      "parameters": {
        "operation": "getAllPeople"
      },
      "id": "91907251-8f07-43bc-8004-792302ae8a8a",
      "name": "Customer Datastore (n8n training)",
      "type": "n8n-nodes-base.n8nTrainingCustomerDatastore",
      "typeVersion": 1,
      "position": [
        960,
        380
      ]
    },
    {
      "parameters": {
        "jsCode": "// Loop over input items and add a new field\n// called 'myNewField' to the JSON of each one\nfor (const item of $input.all()) {\n  item.json.myNewField = 1;\n  item.json.json = {test: 1};\n}\n\nreturn $input.all();"
      },
      "id": "f9d8c409-3b07-4a32-a9e1-f71993fdf532",
      "name": "Code1",
      "type": "n8n-nodes-base.code",
      "typeVersion": 1,
      "position": [
        1160,
        380
      ]
    },
    {
      "parameters": {
        "operation": "getAllPeople"
      },
      "id": "da9977a4-a767-4f41-92e4-0443b4ae2472",
      "name": "Customer Datastore (n8n training)1",
      "type": "n8n-nodes-base.n8nTrainingCustomerDatastore",
      "typeVersion": 1,
      "position": [
        960,
        760
      ]
    },
    {
      "parameters": {
        "jsCode": "// Loop over input items and add a new field\n// called 'myNewField' to the JSON of each one\nfor (const item of $input.all()) {\n  item.json.myNewField = 1;\n  item.json.arr = [\n    {\n      json: {\n        test: 1\n      }\n    }\n  ];\n}\n\nreturn $input.all();"
      },
      "id": "53449d53-7c7e-4093-b797-2a495704121b",
      "name": "Code2",
      "type": "n8n-nodes-base.code",
      "typeVersion": 1,
      "position": [
        1160,
        760
      ]
    }
  ],
  "connections": {
    "When clicking \"Execute Workflow\"": {
      "main": [
        [
          {
            "node": "Code",
            "type": "main",
            "index": 0
          },
          {
            "node": "Customer Datastore (n8n training)",
            "type": "main",
            "index": 0
          },
          {
            "node": "Customer Datastore (n8n training)1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Customer Datastore (n8n training)": {
      "main": [
        [
          {
            "node": "Code1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Customer Datastore (n8n training)1": {
      "main": [
        [
          {
            "node": "Code2",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  },
  "settings": {
    "saveManualExecutions": true,
    "callerPolicy": "workflowsFromSameOwner"
  },
  "triggerCount": 0,
  "versionId": "760718ce-bcc0-447b-b82a-6f8551fe5368",
  "owner": {
    "type": "personal",
    "personalEmail": "csaba@n8n.io"
  }
}
Pro

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

About this workflow

Data with json key. Uses n8nTrainingCustomerDatastore. Event-driven trigger; 6 nodes.

Source: https://github.com/cstuncsik/n8n-env-test/blob/e63c9d292c1cf01fac4030bd5c388d1625448b9a/workflows/1041.json — 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

Items length test. Uses stopAndError, n8nTrainingCustomerDatastore. Event-driven trigger; 26 nodes.

Stop And Error, N8N Training Customer Datastore
General

Rate Limiting And Waiting For External Events. Uses manualTrigger, stickyNote, noOp, n8nTrainingCustomerDatastore. Event-driven trigger; 13 nodes.

N8N Training Customer Datastore, N8N Training Customer Messenger
General

Workflow 1749. Uses n8nTrainingCustomerDatastore, n8nTrainingCustomerMessenger. Event-driven trigger; 13 nodes.

N8N Training Customer Datastore, N8N Training Customer Messenger
General

1749. Uses n8nTrainingCustomerDatastore, n8nTrainingCustomerMessenger. Event-driven trigger; 13 nodes.

N8N Training Customer Datastore, N8N Training Customer Messenger
General

Merge multiple runs into one. Uses manualTrigger, n8nTrainingCustomerDatastore, noOp, splitInBatches. Event-driven trigger; 7 nodes.

N8N Training Customer Datastore