{
  "meta": {
    "templateCredsSetupCompleted": true
  },
  "nodes": [
    {
      "id": "934a8c2f-845f-4f88-8355-48ef17e50f32",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1120,
        1984
      ],
      "parameters": {
        "color": 7,
        "width": 1696,
        "height": 1056,
        "content": "### Create sample records with Code and split to items in n8n (Code + Split Out)\n\nA minimal, plug-and-play workflow that generates **sample data** using n8n\u2019s **Code** node (both JavaScript and Python versions included) and then **fans out** those records into individual items with **Split Out**. Perfect for testing downstream nodes, mapping, pagination, or prototyping list-based logic without connecting to real data sources.\n"
      },
      "typeVersion": 1
    },
    {
      "id": "34f6b8c5-171b-4027-907b-cc8a41bd75a4",
      "name": "Sticky Note10",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1552,
        1984
      ],
      "parameters": {
        "width": 400,
        "height": 1056,
        "content": "\n## \u2705 What this template does\n- **Generates 20 sample records** with fields: `index`, `num`, and `test`\n- Writes the array to `item.json.barr`\n- Uses **Split Out** to convert the array into **one item per record**\n- Includes **both JavaScript and Python** implementations side-by-side\n\n---\n\n- \ud83d\udce7 **rbreen@ynteractive.com**  \n- \ud83d\udd17 **Robert Breen** \u2014 https://www.linkedin.com/in/robert-breen-29429625/  \n- \ud83c\udf10 **ynteractive.com** \u2014 https://ynteractive.com\n\n"
      },
      "typeVersion": 1
    },
    {
      "id": "2dab6b4d-2d05-4294-8d6d-620513a777fc",
      "name": "Generate Data Javascript",
      "type": "n8n-nodes-base.code",
      "position": [
        -480,
        2368
      ],
      "parameters": {
        "jsCode": "// In n8n Code node, \"items\" is an array of input objects\n// You must return an array of items at the end\n\nreturn items.map(item => {\n  const arr = [];\n\n  for (let i = 0; i < 20; i++) {\n    arr.push({\n      index: i,\n      num: i + 1,\n      test: \"asdasd\"\n    });\n  }\n\n  // attach to item.json\n  item.json.barr = arr;\n  return item;\n});\n"
      },
      "typeVersion": 2
    },
    {
      "id": "c12e4e24-e1bd-4f32-98fd-876d91e79661",
      "name": "Generate Data Python",
      "type": "n8n-nodes-base.code",
      "position": [
        -480,
        2560
      ],
      "parameters": {
        "language": "python",
        "pythonCode": "arr = [{\"index\": i, \"num\": i + 1, \"test\": \"asdasd\"} for i in range(20)]\nreturn [{\"json\": {\"barr\": arr}}]\n"
      },
      "typeVersion": 2
    },
    {
      "id": "5128ea0a-8d3d-49d1-bba2-102881725941",
      "name": "Start Workflow",
      "type": "n8n-nodes-base.manualTrigger",
      "position": [
        -848,
        2368
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "50e53b82-2556-4f8a-9b41-ed911d7319cc",
      "name": "Split Out Javascript",
      "type": "n8n-nodes-base.splitOut",
      "position": [
        -272,
        2368
      ],
      "parameters": {
        "options": {},
        "fieldToSplitOut": "barr"
      },
      "typeVersion": 1
    },
    {
      "id": "ee5064bc-a511-4d63-9cef-67ff348d76a2",
      "name": "Split Out Python",
      "type": "n8n-nodes-base.splitOut",
      "position": [
        -272,
        2560
      ],
      "parameters": {
        "options": {},
        "fieldToSplitOut": "barr"
      },
      "typeVersion": 1
    }
  ],
  "connections": {
    "Start Workflow": {
      "main": [
        [
          {
            "node": "Generate Data Javascript",
            "type": "main",
            "index": 0
          },
          {
            "node": "Generate Data Python",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Generate Data Python": {
      "main": [
        [
          {
            "node": "Split Out Python",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Generate Data Javascript": {
      "main": [
        [
          {
            "node": "Split Out Javascript",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}