{
  "name": "Learn JavaScript data processing with code node: filtering, analysis & export examples",
  "nodes": [
    {
      "id": "735caeb3-82d9-4e58-aa90-d284a90a6100",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -600,
        -100
      ],
      "parameters": {
        "width": 460,
        "height": 700,
        "content": "## 🎯 WORKFLOW PURPOSE\nThis workflow demonstrates practical Code node usage for:\n\n• **Data filtering & transformation**\n• **Statistical calculations**  \n• **Formatting for external systems**\n• **Real-w"
      }
    },
    {
      "id": "69eeeaa0-490c-4cab-937c-edb266e6a0ed",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        620,
        -200
      ],
      "parameters": {
        "width": 680,
        "height": 340,
        "content": "## 🔧 CODE NODE BASICS\n\n**Key Points:**\n• Access input data via `items[0].json`\n• Always return array of objects\n• Use `.map()` to create multiple outputs\n• Return `[{ json: data }]` format\n\n**Common P"
      }
    },
    {
      "id": "d7cafddc-1fb0-47c0-80a5-9584c781432d",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        680,
        120
      ],
      "parameters": {
        "width": 480,
        "height": 180,
        "content": "## 📊 EXAMPLE 1: FILTER & TRANSFORM\n\n**What it does:**\n• Filters users over 18 years old\n• Adds calculated bonus field (10% of salary)\n• Creates formatted email addresses\n• Outputs each user as separat"
      }
    },
    {
      "id": "91e465df-24e5-49e9-8253-08d95c3d8860",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        680,
        320
      ],
      "parameters": {
        "width": 480,
        "height": null,
        "content": "## 📈 EXAMPLE 2: CALCULATE STATS\n\n**What it does:**\n• Aggregates team data into statistics\n• Calculates averages, totals, distributions\n• Creates single summary object\n\n**Use cases:**\n• Dashboard data "
      }
    },
    {
      "id": "15f8afd0-7694-490e-909a-1cccb1aad8b6",
      "name": "Sticky Note4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        700,
        540
      ],
      "parameters": {
        "width": 280,
        "height": 340,
        "content": "## 🔄 EXAMPLE 3: FORMAT FOR EXPORT\n\n**What it does:**\n• Formats data for multiple output types\n• Creates CSV, email lists, API payloads\n• Adds metadata and timestamps\n\n**Use cases:**\n• API integrations"
      }
    },
    {
      "id": "c56969b0-8ce9-4f12-a5ab-81571dfe5c37",
      "name": "Sticky Note5",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -40,
        -80
      ],
      "parameters": {
        "width": 300,
        "height": 280,
        "content": "## 🚀 QUICK START GUIDE\n\n**1. Click \"Test workflow\" to run**\n**2. Check each Code node's output**\n**3. Edit JavaScript code to experiment**\n**4. Copy patterns for your own workflows**\n\n**Pro Tips:**\n• "
      }
    },
    {
      "id": "11c7822e-f7ef-4417-a489-24528b50d189",
      "name": "When clicking ‘Execute workflow’",
      "type": "n8n-nodes-base.manualTrigger",
      "position": [
        -140,
        360
      ]
    },
    {
      "id": "8e750afa-737c-4cc9-bcd6-a886e247f545",
      "name": "Set Sample Data",
      "type": "n8n-nodes-base.set",
      "position": [
        100,
        340
      ]
    },
    {
      "id": "29e2b762-60ea-4262-b64b-691cafceacaa",
      "name": "Code: Filter & Transform",
      "type": "n8n-nodes-base.code",
      "position": [
        340,
        160
      ]
    },
    {
      "id": "14efb99d-7522-4c7b-bb84-4f96e67cbdba",
      "name": "Code: Calculate Stats",
      "type": "n8n-nodes-base.code",
      "position": [
        420,
        440
      ]
    },
    {
      "id": "f497b70c-805c-4efd-afb6-e1ec6c2adfa0",
      "name": "Code: Format for Export",
      "type": "n8n-nodes-base.code",
      "position": [
        380,
        720
      ]
    }
  ],
  "connections": {
    "Set Sample Data": {
      "main": [
        [
          {
            "node": "Code: Filter & Transform",
            "type": "main",
            "index": 0
          },
          {
            "node": "Code: Calculate Stats",
            "type": "main",
            "index": 0
          },
          {
            "node": "Code: Format for Export",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "When clicking ‘Execute workflow’": {
      "main": [
        [
          {
            "node": "Set Sample Data",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}