{
  "workflow": {
    "id": 5731,
    "name": "Learn JavaScript coding with an interactive RPG-style tutorial game",
    "views": 1482,
    "recentViews": 0,
    "totalViews": 1482,
    "createdAt": "2025-07-07T03:58:33.462Z",
    "description": "# 🎯 JavaScript Master Class - Interactive Code Tutorial\n\n## 📚 How It Works\n\nThis tutorial is designed as a **self-paced learning experience** where you explore working JavaScript code examples. Unlike traditional tutorials, you learn by **examining real implementations** and understanding how they work.\n\n### 🔍 **The Learning Method:**\n1. **Execute first** - See the workflow in action\n2. **Open each node** - This is where the real learning happens!\n3. **Study the code** - Read JavaScript implementations and comments\n4. **Understand the flow** - See how data transforms between nodes\n5. **Experiment** - Modify code to test your understanding\n\n### 🎮 **The \"Game\" Concept:**\n- It's not a real game - it's a **gamified learning experience**\n- Uses RPG elements (XP, levels, achievements) to make learning engaging\n- Simulates progression through 3 difficulty levels\n- **Main learning happens when you open nodes and read the code!**\n\n---\n\n## 🚀 Setup Steps\n\n### **Step 1: Import the Template**\n1. Copy the JSON template provided\n2. Open your n8n instance\n3. Create a new workflow\n4. Press `Ctrl+A` (or `Cmd+A` on Mac) to select all\n5. Press `Ctrl+V` (or `Cmd+V`) to paste the JSON\n6. Click **\"Save\"** and name it: `JavaScript Master Class - Interactive Tutorial`\n\n### **Step 2: Execute the Workflow**\n1. Click **\"Test workflow\"** or **\"Execute workflow\"**\n2. Watch it run through all nodes automatically\n3. See the final results and progression simulation\n\n### **Step 3: Start Learning (The Important Part!)**\nNow the real learning begins - **you must open each node manually:**\n\n#### **🔍 For Each Code Node:**\n1. **Double-click the node** to open it\n2. **Read the JavaScript code** carefully\n3. **Study the comments** - they explain key concepts\n4. **Understand the logic** - how input becomes output\n5. **Note the techniques** used in each challenge\n\n#### **📖 For Each Sticky Note:**\n1. **Read the explanations** and context\n2. **Understand the learning objectives**\n3. **Note the skills being taught**\n\n---\n\n## 🎯 Learning Path\n\n### **Level 1: Data Warrior (Beginner)**\n**📂 Open Node:** `🎲 Level 1: Data Warrior`\n- **Focus:** Data deduplication using `filter()` and `findIndex()`\n- **Key Skills:** Array methods, duplicate detection\n- **What to Study:** How the deduplication algorithm works\n\n### **Level 2: API Ninja (Intermediate)**\n**📂 Open Node:** `⚔️ Level 2: API Ninja`\n- **Focus:** Data transformation and validation\n- **Key Skills:** String manipulation, validation logic, error handling\n- **What to Study:** How to clean and validate messy API data\n\n### **Level 3: Automation Master (Advanced)**\n**📂 Open Node:** `🏆 Final Boss: Automation Master`\n- **Focus:** Complex workflow processing\n- **Key Skills:** Task orchestration, priority sorting, error handling\n- **What to Study:** How to build robust automation systems\n\n---\n\n## 💡 Learning Tips\n\n### **🔍 Active Exploration:**\n- **Don't just run it** - open every single node!\n- **Read all comments** - they contain key insights\n- **Compare approaches** - see how complexity increases\n- **Try modifications** - change values and see what happens\n\n### **📝 Study Techniques:**\n- **Take notes** on patterns you see\n- **Copy interesting code** snippets for reference\n- **Try to explain** each function to yourself\n- **Test your understanding** by modifying the code\n\n### **🧪 Experimentation:**\n- **Change filter conditions** in Level 1\n- **Modify validation rules** in Level 2\n- **Adjust workflow logic** in Level 3\n- **Break something** and fix it - great for learning!\n\n---\n\n## ⚠️ Important Notes\n\n### **🎮 \"Game\" Reality Check:**\n- This is **NOT** an interactive game where you make choices\n- It's a **code tutorial** with game-like progression themes\n- The \"game\" runs automatically when executed\n- **Real learning happens when you manually open and study each node**\n\n### **📚 Educational Value:**\n- **Primary learning:** Understanding JavaScript implementations\n- **Secondary learning:** n8n workflow patterns\n- **Bonus learning:** Problem-solving approaches\n\n### **🔧 Technical Requirements:**\n- Working n8n instance\n- Basic JavaScript knowledge helpful but not required\n- Willingness to explore and experiment\n\n---\n\n## 🎯 Success Metrics\n\n**You'll know you're learning when you can:**\n- ✅ Explain how each deduplication algorithm works\n- ✅ Identify the validation patterns used\n- ✅ Understand the workflow orchestration logic\n- ✅ Modify the code to handle different scenarios\n- ✅ Apply these patterns to your own projects\n\n---\n\n## 🤔 Next Steps\n\nAfter completing this tutorial:\n1. **Apply the patterns** to your own workflows\n2. **Experiment** with variations\n3. **Build something** using these techniques\n4. **Share your learnings** with the community\n\n---\n\n**Remember: The magic happens when you open each node and study the code! 🔍**",
    "workflow": {
      "id": "KzoygRKiA5FU2t6W",
      "meta": {
        "instanceId": "2000c64071c20843606b95c63795bb0797c41036047055a6586498e855b96efc"
      },
      "name": "interactive code tutorial",
      "tags": [],
      "nodes": [
        {
          "id": "ff379455-2bfc-4b10-86d3-34e6061e8e75",
          "name": "🎯 Start Game",
          "type": "n8n-nodes-base.manualTrigger",
          "position": [
            240,
            280
          ],
          "parameters": {},
          "typeVersion": 1
        },
        {
          "id": "342c8cd6-27af-4562-ba21-44576e76aa0a",
          "name": "Game Header",
          "type": "n8n-nodes-base.stickyNote",
          "position": [
            -40,
            -60
          ],
          "parameters": {
            "width": 400,
            "height": 580,
            "content": "#  Code Challenge Adventure\n\n**Author:** David Olusola\n\n## 🎯 Game Rules\n1. Complete coding challenges to earn points\n2. Each level teaches different n8n concepts\n3. Collect power-ups and achievements\n4. Beat the final boss with your coding skills!\n\n## 🚀 n8n Coaching\nLevel up your n8n skills with personalized coaching!\n👉 [Book Session](mailto:david@daexai.com?subject=n8n%20Coaching%20Request)\n\n## 🔧 n8n Consulting\nNeed custom automation solutions?\n📩 [Get Consulting](mailto:david@daexai.com?subject=n8n%20Consultation%20Request)"
          },
          "typeVersion": 1
        },
        {
          "id": "a64d11d1-e7e1-4f08-a130-5bca37f68e09",
          "name": "Level 1 Info",
          "type": "n8n-nodes-base.stickyNote",
          "position": [
            260,
            500
          ],
          "parameters": {
            "width": 250,
            "height": 330,
            "content": "## 🎲 Level 1: Data Warrior\n\n**Challenge:** Deduplicate the corrupted user database!\n\n**Skills Learned:**\n- Array filtering\n- Data deduplication\n- JSON manipulation\n\n**Reward:** 100 XP + Data Shield 🛡️"
          },
          "typeVersion": 1
        },
        {
          "id": "995b3576-696f-435b-a9fd-3e811e25815d",
          "name": "Level 2 Info",
          "type": "n8n-nodes-base.stickyNote",
          "position": [
            560,
            500
          ],
          "parameters": {
            "width": 250,
            "height": 290,
            "content": "## ⚔️ Level 2: API Ninja\n\n**Challenge:** Transform and validate API responses!\n\n**Skills Learned:**\n- Data transformation\n- Validation logic\n- Error handling\n\n**Reward:** 200 XP + Speed Boost ⚡"
          },
          "typeVersion": 1
        },
        {
          "id": "f862073b-d3e5-460e-8d4f-6c6f040d2c83",
          "name": "Boss Info",
          "type": "n8n-nodes-base.stickyNote",
          "position": [
            860,
            380
          ],
          "parameters": {
            "width": 250,
            "height": 330,
            "content": "## 🏆 Final Boss: Automation Master\n\n**Challenge:** Build a complete workflow system!\n\n**Skills Learned:**\n- Complex logic\n- Error handling\n- Performance optimization\n\n**Reward:** 500 XP + Master Badge 🏅"
          },
          "typeVersion": 1
        },
        {
          "id": "00297d14-9d74-4a5e-a48c-3c2795aeda6a",
          "name": "🎲 Level 1: Data Warrior",
          "type": "n8n-nodes-base.code",
          "position": [
            620,
            280
          ],
          "parameters": {
            "jsCode": "// 🎲 Level 1: Data Warrior Challenge\n// Challenge: Deduplicate corrupted user database\n\nconst gameData = items[0].json;\nconst player = gameData.player;\n\n// Corrupted database with duplicates (the challenge data)\nconst corruptedUsers = [\n  { id: 1, name: \"Knight Arthur\", email: \"user@example.com\", class: \"Warrior\" },\n  { id: 2, name: \"Wizard Merlin\", email: \"user@example.com\", class: \"Mage\" },\n  { id: 3, name: \"Knight Arthur\", email: \"user@example.com\", class: \"Warrior\" }, // Duplicate\n  { id: 4, name: \"Archer Robin\", email: \"user@example.com\", class: \"Ranger\" },\n  { id: 5, name: \"Rogue Shadow\", email: \"user@example.com\", class: \"Assassin\" },\n  { id: 6, name: \"Wizard Merlin\", email: \"user@example.com\", class: \"Mage\" }, // Duplicate\n  { id: 7, name: \"Paladin Grace\", email: \"user@example.com\", class: \"Healer\" },\n  { id: 8, name: \"Archer Robin\", email: \"user@example.com\", class: \"Ranger\" } // Duplicate\n];\n\n// THE CHALLENGE: Deduplicate based on email (player must implement this logic)\n// This is the solution - in a real game, the player would need to write this\nconst cleanedUsers = corruptedUsers.filter(\n  (user, index, self) => \n    index === self.findIndex(u => u.email === user.email)\n);\n\n// Calculate challenge results\nconst originalCount = corruptedUsers.length;\nconst cleanedCount = cleanedUsers.length;\nconst duplicatesRemoved = originalCount - cleanedCount;\n\n// Determine success and rewards\nconst isSuccess = duplicatesRemoved > 0;\nconst xpGained = isSuccess ? 100 : 0;\nconst powerUp = isSuccess ? \"Data Shield 🛡️\" : null;\n\n// Update player stats\nif (isSuccess) {\n  player.xp += xpGained;\n  player.level = Math.floor(player.xp / 100) + 1;\n  if (powerUp) player.inventory.push(powerUp);\n  player.achievements.push(\"Data Warrior\");\n}\n\nconst challengeResult = {\n  level: 1,\n  challengeName: \"Data Warrior Challenge\",\n  success: isSuccess,\n  stats: {\n    originalRecords: originalCount,\n    cleanedRecords: cleanedCount,\n    duplicatesRemoved: duplicatesRemoved\n  },\n  rewards: {\n    xp: xpGained,\n    powerUp: powerUp\n  },\n  message: isSuccess ? \n    `🎉 SUCCESS! You've cleaned the corrupted database and earned ${xpGained} XP!` :\n    \"💀 FAILED! The database is still corrupted. Try again!\"\n};\n\nreturn [{\n  json: {\n    ...challengeResult,\n    player,\n    cleanedData: cleanedUsers,\n    nextLevel: isSuccess ? 2 : 1\n  }\n}];"
          },
          "typeVersion": 2
        },
        {
          "id": "98162e1a-8f3e-418d-b1d5-e1b03f518e1d",
          "name": "⚔️ Level 2: API Ninja",
          "type": "n8n-nodes-base.code",
          "position": [
            900,
            280
          ],
          "parameters": {
            "jsCode": "// ⚔️ Level 2: API Ninja Challenge\n// Challenge: Transform and validate API responses\n\nconst gameData = items[0].json;\nconst player = gameData.player;\n\n// Mock API response with messy data (the challenge)\nconst apiResponse = {\n  users: [\n    { id: \"1\", full_name: \"  John Doe  \", email_address: \"user@example.com\", age: \"25\", status: \"active\" },\n    { id: \"2\", full_name: \"jane smith\", email_address: \"user@example.com\", age: \"invalid\", status: \"INACTIVE\" },\n    { id: \"3\", full_name: \"Bob Johnson\", email_address: \"user@example.com\", age: \"30\", status: \"active\" },\n    { id: \"4\", full_name: \"\", email_address: \"user@example.com\", age: \"22\", status: \"pending\" },\n    { id: \"5\", full_name: \"Alice Brown\", email_address: \"user@example.com\", age: \"28\", status: \"active\" }\n  ]\n};\n\n// THE CHALLENGE: Transform and validate the data\n// This is the solution - in a real game, player would implement this\nconst transformedUsers = apiResponse.users.map(user => {\n  const transformed = {\n    id: parseInt(user.id),\n    name: user.full_name.trim(),\n    email: user.email_address.toLowerCase(),\n    age: parseInt(user.age) || 0,\n    status: user.status.toLowerCase(),\n    isValid: true\n  };\n  \n  // Validation rules\n  if (!transformed.name || transformed.name.length < 2) {\n    transformed.isValid = false;\n    transformed.errors = (transformed.errors || []).concat(['Invalid name']);\n  }\n  \n  if (!transformed.email.includes('@')) {\n    transformed.isValid = false;\n    transformed.errors = (transformed.errors || []).concat(['Invalid email']);\n  }\n  \n  if (transformed.age < 18 || transformed.age > 120) {\n    transformed.isValid = false;\n    transformed.errors = (transformed.errors || []).concat(['Invalid age']);\n  }\n  \n  return transformed;\n});\n\n// Calculate challenge results\nconst validUsers = transformedUsers.filter(user => user.isValid);\nconst invalidUsers = transformedUsers.filter(user => !user.isValid);\n\nconst isSuccess = validUsers.length >= 3; // Need at least 3 valid users to pass\nconst xpGained = isSuccess ? 200 : 0;\nconst powerUp = isSuccess ? \"Speed Boost ⚡\" : null;\n\n// Update player stats\nif (isSuccess) {\n  player.xp += xpGained;\n  player.level = Math.floor(player.xp / 100) + 1;\n  if (powerUp) player.inventory.push(powerUp);\n  player.achievements.push(\"API Ninja\");\n}\n\nconst challengeResult = {\n  level: 2,\n  challengeName: \"API Ninja Challenge\",\n  success: isSuccess,\n  stats: {\n    totalUsers: transformedUsers.length,\n    validUsers: validUsers.length,\n    invalidUsers: invalidUsers.length,\n    transformationAccuracy: Math.round((validUsers.length / transformedUsers.length) * 100)\n  },\n  rewards: {\n    xp: xpGained,\n    powerUp: powerUp\n  },\n  message: isSuccess ? \n    `⚡ SUCCESS! You've mastered data transformation and earned ${xpGained} XP!` :\n    \"🥷 FAILED! Your ninja skills need more practice. Try again!\"\n};\n\nreturn [{\n  json: {\n    ...challengeResult,\n    player,\n    validUsers,\n    invalidUsers,\n    nextLevel: isSuccess ? 3 : 2\n  }\n}];"
          },
          "typeVersion": 2
        },
        {
          "id": "3042b31c-2dec-45d3-8bdb-7487d8f22eaf",
          "name": "🏆 Final Boss: Automation Master",
          "type": "n8n-nodes-base.code",
          "position": [
            1200,
            280
          ],
          "parameters": {
            "jsCode": "// 🏆 Final Boss: Automation Master Challenge\n// Challenge: Build a complete workflow system\n\nconst gameData = items[0].json;\nconst player = gameData.player;\n\n// Complex workflow challenge data\nconst workflowChallenge = {\n  tasks: [\n    { id: 1, name: \"Data Ingestion\", status: \"pending\", priority: \"high\", assignee: \"system\" },\n    { id: 2, name: \"Data Validation\", status: \"pending\", priority: \"high\", assignee: \"validator\" },\n    { id: 3, name: \"Data Transformation\", status: \"pending\", priority: \"medium\", assignee: \"transformer\" },\n    { id: 4, name: \"Error Handling\", status: \"pending\", priority: \"high\", assignee: \"error_handler\" },\n    { id: 5, name: \"Data Output\", status: \"pending\", priority: \"low\", assignee: \"output\" },\n    { id: 6, name: \"Notification\", status: \"pending\", priority: \"medium\", assignee: \"notifier\" }\n  ],\n  workflow: {\n    name: \"Master Automation Pipeline\",\n    steps: 6,\n    complexity: \"Expert\",\n    timeLimit: \"5 minutes\"\n  }\n};\n\n// THE FINAL CHALLENGE: Process tasks in correct order with error handling\n// This is the solution - the ultimate test of n8n skills\nconst processWorkflow = (tasks) => {\n  const results = [];\n  const errors = [];\n  \n  try {\n    // Step 1: Sort by priority (high -> medium -> low)\n    const priorityOrder = { 'high': 3, 'medium': 2, 'low': 1 };\n    const sortedTasks = tasks.sort((a, b) => priorityOrder[b.priority] - priorityOrder[a.priority]);\n    \n    // Step 2: Process each task with error handling\n    sortedTasks.forEach(task => {\n      try {\n        // Simulate processing\n        const processed = {\n          ...task,\n          status: 'completed',\n          completedAt: new Date().toISOString(),\n          processingTime: Math.random() * 1000 + 500 // Random processing time\n        };\n        \n        // Add some business logic\n        if (task.name.includes('Error')) {\n          processed.errorHandlingActive = true;\n        }\n        \n        if (task.priority === 'high') {\n          processed.fastTrack = true;\n        }\n        \n        results.push(processed);\n      } catch (error) {\n        errors.push({\n          taskId: task.id,\n          error: error.message,\n          timestamp: new Date().toISOString()\n        });\n      }\n    });\n    \n    // Step 3: Generate workflow summary\n    const summary = {\n      totalTasks: tasks.length,\n      completedTasks: results.length,\n      failedTasks: errors.length,\n      highPriorityTasks: results.filter(t => t.priority === 'high').length,\n      averageProcessingTime: Math.round(results.reduce((sum, t) => sum + t.processingTime, 0) / results.length),\n      workflowEfficiency: Math.round((results.length / tasks.length) * 100)\n    };\n    \n    return { results, errors, summary };\n  } catch (error) {\n    return { results: [], errors: [{ general: error.message }], summary: null };\n  }\n};\n\n// Execute the workflow\nconst workflowResult = processWorkflow(workflowChallenge.tasks);\n\n// Determine success (need 100% completion and efficiency > 80%)\nconst isSuccess = workflowResult.summary && \n                  workflowResult.summary.completedTasks === workflowChallenge.tasks.length &&\n                  workflowResult.summary.workflowEfficiency >= 80;\n\nconst xpGained = isSuccess ? 500 : 0;\nconst powerUp = isSuccess ? \"Master Badge 🏅\" : null;\nconst finalTitle = isSuccess ? \"🏆 AUTOMATION MASTER\" : \"🎯 Aspiring Automator\";\n\n// Update player stats for final time\nif (isSuccess) {\n  player.xp += xpGained;\n  player.level = Math.floor(player.xp / 100) + 1;\n  if (powerUp) player.inventory.push(powerUp);\n  player.achievements.push(\"Automation Master\");\n  player.title = finalTitle;\n}\n\n// Calculate final game score\nconst finalScore = player.xp + (player.achievements.length * 50);\n\nconst bossResult = {\n  level: 3,\n  challengeName: \"Automation Master Boss Battle\",\n  success: isSuccess,\n  workflowResult,\n  rewards: {\n    xp: xpGained,\n    powerUp: powerUp,\n    title: finalTitle\n  },\n  finalStats: {\n    totalXP: player.xp,\n    finalLevel: player.level,\n    achievements: player.achievements.length,\n    finalScore: finalScore,\n    inventory: player.inventory\n  },\n  message: isSuccess ? \n    `🎉 VICTORY! You've become the ultimate Automation Master with ${finalScore} points!` :\n    \"⚔️ The boss was too powerful! Train more and try again!\"\n};\n\nreturn [{\n  json: {\n    ...bossResult,\n    player,\n    gameComplete: isSuccess,\n    playAgain: \"Click 'Start Game' to play again!\"\n  }\n}];"
          },
          "typeVersion": 2
        },
        {
          "id": "858b4392-6eb0-4e2d-a5a5-bcdc31f38fa8",
          "name": "🎊 Game Over Screen",
          "type": "n8n-nodes-base.code",
          "position": [
            1500,
            280
          ],
          "parameters": {
            "jsCode": "// 🎊 Game Over Screen\n// Display final results and achievements\n\nconst gameData = items[0].json;\nconst player = gameData.player;\n\n// Create achievement showcase\nconst achievementShowcase = {\n  playerName: player.name,\n  finalTitle: player.title || \"n8n Apprentice\",\n  totalXP: player.xp,\n  finalLevel: player.level,\n  achievements: player.achievements,\n  inventory: player.inventory,\n  gameComplete: gameData.gameComplete\n};\n\n// Generate performance report\nconst performanceReport = {\n  levelsCompleted: player.achievements.length,\n  totalChallenges: 3,\n  completionRate: Math.round((player.achievements.length / 3) * 100),\n  skillsLearned: [\n    \"Data Deduplication\",\n    \"API Response Transformation\",\n    \"Workflow Automation\",\n    \"Error Handling\",\n    \"JavaScript Array Methods\",\n    \"n8n Code Node Mastery\"\n  ],\n  nextSteps: [\n    \"Explore advanced n8n nodes\",\n    \"Build real-world automations\",\n    \"Learn webhook integrations\",\n    \"Master database operations\",\n    \"Implement error handling patterns\"\n  ]\n};\n\n// Create motivational message based on performance\nlet motivationalMessage = \"\";\nif (gameData.gameComplete) {\n  motivationalMessage = `🌟 Congratulations! You've mastered the art of automation and proven yourself worthy of the title '${player.title}'. Your journey in n8n has just begun!`;\n} else {\n  motivationalMessage = `🎯 Great effort! You've learned valuable skills and earned ${player.xp} XP. Keep practicing to become the ultimate Automation Master!`;\n}\n\n// Special rewards based on performance\nconst specialRewards = [];\nif (player.xp >= 800) specialRewards.push(\"🏆 Perfect Score Bonus\");\nif (player.achievements.includes(\"Data Warrior\")) specialRewards.push(\"🛡️ Data Protection Expert\");\nif (player.achievements.includes(\"API Ninja\")) specialRewards.push(\"⚡ Speed Optimization Master\");\nif (player.achievements.includes(\"Automation Master\")) specialRewards.push(\"🎖️ Workflow Architect\");\n\n// Create final game summary\nconst gameSummary = {\n  title: \"🎮 Code Challenge Adventure - Game Over!\",\n  subtitle: `Final Score: ${gameData.finalStats ? gameData.finalStats.finalScore : player.xp} Points`,\n  achievementShowcase,\n  performanceReport,\n  specialRewards,\n  motivationalMessage,\n  coachingOffer: {\n    message: \"Want to level up your n8n skills in real life?\",\n    coaching: \"👉 Book a coaching session: user@example.com\",\n    consulting: \"📩 Get custom automation help: user@example.com\"\n  },\n  playAgain: \"🔄 Ready for another adventure? Click 'Start Game' to play again!\"\n};\n\nreturn [{\n  json: gameSummary\n}];"
          },
          "typeVersion": 2
        },
        {
          "id": "4d626c17-abaf-40e1-bebb-37e9f0861515",
          "name": "Game Features",
          "type": "n8n-nodes-base.stickyNote",
          "position": [
            920,
            -220
          ],
          "parameters": {
            "width": 460,
            "height": 540,
            "content": "## Game Features\n\n**🎯 3 Challenging Levels**\n- Progressive difficulty\n- Real n8n scenarios\n- Practical coding challenges\n\n**🏆 Reward System**\n- XP and level progression\n- Power-ups and achievements\n- Performance tracking\n\n**📚 Learning Outcomes**\n- Data deduplication\n- API transformation\n- Error handling\n- Workflow design\n\n**🎪 Fun Elements**\n- RPG-style progression\n- Story-driven challenges\n- Achievement badges\n- Leaderboard scoring"
          },
          "typeVersion": 1
        },
        {
          "id": "7cba2d2f-3838-4a9f-abd0-7e4cd0686f32",
          "name": "Initialize Game",
          "type": "n8n-nodes-base.code",
          "position": [
            460,
            280
          ],
          "parameters": {
            "jsCode": "// 🎮 Game Initialization\n// Create player profile and game state\n\nconst player = {\n  name: \"n8n Apprentice\",\n  level: 1,\n  xp: 0,\n  health: 100,\n  inventory: [],\n  achievements: []\n};\n\nconst gameState = {\n  currentLevel: 1,\n  totalLevels: 3,\n  startTime: new Date().toISOString(),\n  challenges: [\n    {\n      id: 1,\n      name: \"Data Warrior Challenge\",\n      description: \"Deduplicate the corrupted database\",\n      difficulty: \"Beginner\",\n      xpReward: 100,\n      powerUp: \"Data Shield 🛡️\"\n    },\n    {\n      id: 2,\n      name: \"API Ninja Challenge\",\n      description: \"Transform and validate API responses\",\n      difficulty: \"Intermediate\",\n      xpReward: 200,\n      powerUp: \"Speed Boost ⚡\"\n    },\n    {\n      id: 3,\n      name: \"Automation Master Boss\",\n      description: \"Build a complete workflow system\",\n      difficulty: \"Expert\",\n      xpReward: 500,\n      powerUp: \"Master Badge 🏅\"\n    }\n  ]\n};\n\n// Game introduction\nconst gameIntro = {\n  title: \"🎮 Welcome to Code Challenge Adventure!\",\n  story: \"The n8n kingdom is under attack by chaotic data! As a brave code warrior, you must complete challenges to restore order and become the ultimate Automation Master!\",\n  objective: \"Complete all 3 levels to save the kingdom!\"\n};\n\nreturn [{\n  json: {\n    ...gameIntro,\n    player,\n    gameState,\n    message: \"Game initialized! Ready to start your adventure?\"\n  }\n}];"
          },
          "typeVersion": 2
        }
      ],
      "active": false,
      "pinData": {},
      "settings": {
        "executionOrder": "v1"
      },
      "versionId": "f08679b5-b4f7-4de2-ade4-aabf10ad6fe6",
      "connections": {
        "Initialize Game": {
          "main": [
            [
              {
                "node": "🎲 Level 1: Data Warrior",
                "type": "main",
                "index": 0
              }
            ]
          ]
        },
        "🎯 Start Game": {
          "main": [
            [
              {
                "node": "Initialize Game",
                "type": "main",
                "index": 0
              }
            ]
          ]
        },
        "⚔️ Level 2: API Ninja": {
          "main": [
            [
              {
                "node": "🏆 Final Boss: Automation Master",
                "type": "main",
                "index": 0
              }
            ]
          ]
        },
        "🎲 Level 1: Data Warrior": {
          "main": [
            [
              {
                "node": "⚔️ Level 2: API Ninja",
                "type": "main",
                "index": 0
              }
            ]
          ]
        },
        "🏆 Final Boss: Automation Master": {
          "main": [
            [
              {
                "node": "🎊 Game Over Screen",
                "type": "main",
                "index": 0
              }
            ]
          ]
        }
      }
    },
    "lastUpdatedBy": 29,
    "workflowInfo": {
      "nodeCount": 11,
      "nodeTypes": {
        "n8n-nodes-base.code": {
          "count": 5
        },
        "n8n-nodes-base.stickyNote": {
          "count": 5
        },
        "n8n-nodes-base.manualTrigger": {
          "count": 1
        }
      }
    },
    "status": "published",
    "user": {
      "name": "David Olusola",
      "username": "dae221",
      "bio": "I design enterprise-grade automation systems that eliminate bottlenecks, cut manual work by 70%+, and unlock millions in lost revenue opportunities. My clients — typically achieve 5–10x ROI within the first 90 days. Currently partnering with select high-growth companies ready to scale faster with AI automation.  david@daexai.com",
      "verified": true,
      "links": [
        ""
      ],
      "avatar": "https://gravatar.com/avatar/2abbc4c9e828c54a8d8838beda1382e8e4a66684ef9fa8451dbeb3e72b0c9f9c?r=pg&d=retro&size=200"
    },
    "nodes": [
      {
        "id": 565,
        "icon": "fa:sticky-note",
        "name": "n8n-nodes-base.stickyNote",
        "codex": {
          "data": {
            "alias": [
              "Comments",
              "Notes",
              "Sticky"
            ],
            "categories": [
              "Core Nodes"
            ],
            "nodeVersion": "1.0",
            "codexVersion": "1.0",
            "subcategories": {
              "Core Nodes": [
                "Helpers"
              ]
            }
          }
        },
        "group": "[\"input\"]",
        "defaults": {
          "name": "Sticky Note",
          "color": "#FFD233"
        },
        "iconData": {
          "icon": "sticky-note",
          "type": "icon"
        },
        "displayName": "Sticky Note",
        "typeVersion": 1,
        "nodeCategories": [
          {
            "id": 9,
            "name": "Core Nodes"
          }
        ]
      },
      {
        "id": 834,
        "icon": "file:code.svg",
        "name": "n8n-nodes-base.code",
        "codex": {
          "data": {
            "alias": [
              "cpde",
              "Javascript",
              "JS",
              "Python",
              "Script",
              "Custom Code",
              "Function"
            ],
            "details": "The Code node allows you to execute JavaScript in your workflow.",
            "resources": {
              "primaryDocumentation": [
                {
                  "url": "https://docs.n8n.io/integrations/builtin/core-nodes/n8n-nodes-base.code/"
                }
              ]
            },
            "categories": [
              "Development",
              "Core Nodes"
            ],
            "nodeVersion": "1.0",
            "codexVersion": "1.0",
            "subcategories": {
              "Core Nodes": [
                "Helpers",
                "Data Transformation"
              ]
            }
          }
        },
        "group": "[\"transform\"]",
        "defaults": {
          "name": "Code"
        },
        "iconData": {
          "type": "file",
          "fileBuffer": "data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTEyIiBoZWlnaHQ9IjUxMiIgdmlld0JveD0iMCAwIDUxMiA1MTIiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMF8xMTcxXzQ0MSkiPgo8cGF0aCBkPSJNMTcwLjI4MyA0OEgxOTYuNUMyMDMuMTI3IDQ4IDIwOC41IDQyLjYyNzQgMjA4LjUgMzZWMTJDMjA4LjUgNS4zNzI1OCAyMDMuMTI3IDAgMTk2LjUgMEgxNzAuMjgzQzEyNi4xIDAgOTAuMjgzIDM1LjgxNzIgOTAuMjgzIDgwVjE3NkM5MC4yODMgMjA2LjkyOCA2NS4yMTA5IDIzMiAzNC4yODMgMjMySDIzQzE2LjM3MjYgMjMyIDExIDIzNy4zNzIgMTEgMjQ0VjI2OEMxMSAyNzQuNjI3IDE2LjM3MjQgMjgwIDIyLjk5OTYgMjgwTDM0LjI4MyAyODBDNjUuMjEwOSAyODAgOTAuMjgzIDMwNS4wNzIgOTAuMjgzIDMzNlY0NDBDOTAuMjgzIDQ3OS43NjQgMTIyLjUxOCA1MTIgMTYyLjI4MyA1MTJIMTk2LjVDMjAzLjEyNyA1MTIgMjA4LjUgNTA2LjYyNyAyMDguNSA1MDBWNDc2QzIwOC41IDQ2OS4zNzMgMjAzLjEyNyA0NjQgMTk2LjUgNDY0SDE2Mi4yODNDMTQ5LjAyOCA0NjQgMTM4LjI4MyA0NTMuMjU1IDEzOC4yODMgNDQwVjMzNkMxMzguMjgzIDMwOS4wMjIgMTI4LjAxMSAyODQuNDQzIDExMS4xNjQgMjY1Ljk2MUMxMDYuMTA5IDI2MC40MTYgMTA2LjEwOSAyNTEuNTg0IDExMS4xNjQgMjQ2LjAzOUMxMjguMDExIDIyNy41NTcgMTM4LjI4MyAyMDIuOTc4IDEzOC4yODMgMTc2VjgwQzEzOC4yODMgNjIuMzI2OSAxNTIuNjEgNDggMTcwLjI4MyA0OFoiIGZpbGw9IiNGRjk5MjIiLz4KPHBhdGggZD0iTTMwNSAzNkMzMDUgNDIuNjI3NCAzMTAuMzczIDQ4IDMxNyA0OEgzNDIuOTc5QzM2MC42NTIgNDggMzc0Ljk3OCA2Mi4zMjY5IDM3NC45NzggODBWMTc2QzM3NC45NzggMjAyLjk3OCAzODUuMjUxIDIyNy41NTcgNDAyLjA5OCAyNDYuMDM5QzQwNy4xNTMgMjUxLjU4NCA0MDcuMTUzIDI2MC40MTYgNDAyLjA5OCAyNjUuOTYxQzM4NS4yNTEgMjg0LjQ0MyAzNzQuOTc4IDMwOS4wMjIgMzc0Ljk3OCAzMzZWNDMyQzM3NC45NzggNDQ5LjY3MyAzNjAuNjUyIDQ2NCAzNDIuOTc5IDQ2NEgzMTdDMzEwLjM3MyA0NjQgMzA1IDQ2OS4zNzMgMzA1IDQ3NlY1MDBDMzA1IDUwNi42MjcgMzEwLjM3MyA1MTIgMzE3IDUxMkgzNDIuOTc5QzM4Ny4xNjEgNTEyIDQyMi45NzggNDc2LjE4MyA0MjIuOTc4IDQzMlYzMzZDNDIyLjk3OCAzMDUuMDcyIDQ0OC4wNTEgMjgwIDQ3OC45NzkgMjgwSDQ5MEM0OTYuNjI3IDI4MCA1MDIgMjc0LjYyOCA1MDIgMjY4VjI0NEM1MDIgMjM3LjM3MyA0OTYuNjI4IDIzMiA0OTAgMjMyTDQ3OC45NzkgMjMyQzQ0OC4wNTEgMjMyIDQyMi45NzggMjA2LjkyOCA0MjIuOTc4IDE3NlY4MEM0MjIuOTc4IDM1LjgxNzIgMzg3LjE2MSAwIDM0Mi45NzkgMEgzMTdDMzEwLjM3MyAwIDMwNSA1LjM3MjU4IDMwNSAxMlYzNloiIGZpbGw9IiNGRjk5MjIiLz4KPC9nPgo8ZGVmcz4KPGNsaXBQYXRoIGlkPSJjbGlwMF8xMTcxXzQ0MSI+CjxyZWN0IHdpZHRoPSI1MTIiIGhlaWdodD0iNTEyIiBmaWxsPSJ3aGl0ZSIvPgo8L2NsaXBQYXRoPgo8L2RlZnM+Cjwvc3ZnPgo="
        },
        "displayName": "Code",
        "typeVersion": 2,
        "nodeCategories": [
          {
            "id": 5,
            "name": "Development"
          },
          {
            "id": 9,
            "name": "Core Nodes"
          }
        ]
      },
      {
        "id": 838,
        "icon": "fa:mouse-pointer",
        "name": "n8n-nodes-base.manualTrigger",
        "codex": {
          "data": {
            "resources": {
              "generic": [],
              "primaryDocumentation": [
                {
                  "url": "https://docs.n8n.io/integrations/builtin/core-nodes/n8n-nodes-base.manualworkflowtrigger/"
                }
              ]
            },
            "categories": [
              "Core Nodes"
            ],
            "nodeVersion": "1.0",
            "codexVersion": "1.0"
          }
        },
        "group": "[\"trigger\"]",
        "defaults": {
          "name": "When clicking ‘Execute workflow’",
          "color": "#909298"
        },
        "iconData": {
          "icon": "mouse-pointer",
          "type": "icon"
        },
        "displayName": "Manual Trigger",
        "typeVersion": 1,
        "nodeCategories": [
          {
            "id": 9,
            "name": "Core Nodes"
          }
        ]
      }
    ],
    "categories": [
      {
        "id": 5,
        "name": "Engineering"
      }
    ],
    "image": []
  }
}