인터랙티브 코드 튜토리얼
중급
이것은Engineering분야의자동화 워크플로우로, 11개의 노드를 포함합니다.주로 Code, ManualTrigger 등의 노드를 사용하며. 교환형 RPG 스타일 튜토리얼 게임을 통해 JavaScript 프로그래밍을 배우기
사전 요구사항
- •특별한 사전 요구사항 없이 가져와 바로 사용 가능합니다
사용된 노드 (11)
카테고리
워크플로우 미리보기
노드 연결 관계를 시각적으로 표시하며, 확대/축소 및 이동을 지원합니다
워크플로우 내보내기
다음 JSON 구성을 복사하여 n8n에 가져오면 이 워크플로우를 사용할 수 있습니다
{
"id": "KzoygRKiA5FU2t6W",
"meta": {
"instanceId": "2000c64071c20843606b95c63795bb0797c41036047055a6586498e855b96efc"
},
"name": "interactive code tutorial",
"tags": [],
"nodes": [
{
"id": "ff379455-2bfc-4b10-86d3-34e6061e8e75",
"name": "🎯 게임 시작",
"type": "n8n-nodes-base.manualTrigger",
"position": [
240,
280
],
"parameters": {},
"typeVersion": 1
},
{
"id": "342c8cd6-27af-4562-ba21-44576e76aa0a",
"name": "게임 헤더",
"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": "레벨 1 정보",
"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": "레벨 2 정보",
"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": "보스 정보",
"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": "🎲 레벨 1: 데이터 워리어",
"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: \"arthur@camelot.com\", class: \"Warrior\" },\n { id: 2, name: \"Wizard Merlin\", email: \"merlin@magic.com\", class: \"Mage\" },\n { id: 3, name: \"Knight Arthur\", email: \"arthur@camelot.com\", class: \"Warrior\" }, // Duplicate\n { id: 4, name: \"Archer Robin\", email: \"robin@forest.com\", class: \"Ranger\" },\n { id: 5, name: \"Rogue Shadow\", email: \"shadow@dark.com\", class: \"Assassin\" },\n { id: 6, name: \"Wizard Merlin\", email: \"merlin@magic.com\", class: \"Mage\" }, // Duplicate\n { id: 7, name: \"Paladin Grace\", email: \"grace@light.com\", class: \"Healer\" },\n { id: 8, name: \"Archer Robin\", email: \"robin@forest.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": "⚔️ 레벨 2: API 닌자",
"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: \"JOHN@EXAMPLE.COM\", age: \"25\", status: \"active\" },\n { id: \"2\", full_name: \"jane smith\", email_address: \"jane@example.com\", age: \"invalid\", status: \"INACTIVE\" },\n { id: \"3\", full_name: \"Bob Johnson\", email_address: \"bob@test.com\", age: \"30\", status: \"active\" },\n { id: \"4\", full_name: \"\", email_address: \"empty@test.com\", age: \"22\", status: \"pending\" },\n { id: \"5\", full_name: \"Alice Brown\", email_address: \"alice@domain.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": "🏆 최종 보스: 자동화 마스터",
"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": "🎊 게임 오버 화면",
"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: david@daexai.com\",\n consulting: \"📩 Get custom automation help: david@daexai.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": "게임 기능",
"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": "게임 초기화",
"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": {
"7cba2d2f-3838-4a9f-abd0-7e4cd0686f32": {
"main": [
[
{
"node": "00297d14-9d74-4a5e-a48c-3c2795aeda6a",
"type": "main",
"index": 0
}
]
]
},
"ff379455-2bfc-4b10-86d3-34e6061e8e75": {
"main": [
[
{
"node": "7cba2d2f-3838-4a9f-abd0-7e4cd0686f32",
"type": "main",
"index": 0
}
]
]
},
"98162e1a-8f3e-418d-b1d5-e1b03f518e1d": {
"main": [
[
{
"node": "3042b31c-2dec-45d3-8bdb-7487d8f22eaf",
"type": "main",
"index": 0
}
]
]
},
"00297d14-9d74-4a5e-a48c-3c2795aeda6a": {
"main": [
[
{
"node": "98162e1a-8f3e-418d-b1d5-e1b03f518e1d",
"type": "main",
"index": 0
}
]
]
},
"3042b31c-2dec-45d3-8bdb-7487d8f22eaf": {
"main": [
[
{
"node": "858b4392-6eb0-4e2d-a5a5-bcdc31f38fa8",
"type": "main",
"index": 0
}
]
]
}
}
}자주 묻는 질문
이 워크플로우를 어떻게 사용하나요?
위의 JSON 구성 코드를 복사하여 n8n 인스턴스에서 새 워크플로우를 생성하고 "JSON에서 가져오기"를 선택한 후, 구성을 붙여넣고 필요에 따라 인증 설정을 수정하세요.
이 워크플로우는 어떤 시나리오에 적합한가요?
중급 - 엔지니어링
유료인가요?
이 워크플로우는 완전히 무료이며 직접 가져와 사용할 수 있습니다. 다만, 워크플로우에서 사용하는 타사 서비스(예: OpenAI API)는 사용자 직접 비용을 지불해야 할 수 있습니다.
관련 워크플로우 추천
JavaScript 마스터 클래스 2
JavaScript 배열 메서드 사용하여 데이터 레코드 중복 제거
Code
Manual Trigger
Code
Manual Trigger
9 노드David Olusola
엔지니어링
코드 노드 이해
코드 노드를 통해 JavaScript 데이터 처리를 배우기: 필터링, 분석 및 내보내기 예제
Set
Code
Manual Trigger
+
Set
Code
Manual Trigger
11 노드David Olusola
엔지니어링
자동화된 리드 수집기: Apify에서 Google Sheets로
Apify에서 Google Sheets로의 데이터 정제를 통한 비즈니스 리드 수집 자동화
Set
Code
Http Request
+
Set
Code
Http Request
6 노드David Olusola
영업
Google Suite, PDF, 이메일을 사용한 비즈니스 보험 제출 자동화
Google Suite, PDF, 이메일을 통한 비즈니스 보험 제출 프로세스 자동화
If
Set
Code
+
If
Set
Code
37 노드David Olusola
문서 추출
HR 날짜 관리
JavaScript를 사용한 HR 직원 날짜 추적 및 알림 자동화
Set
Code
Gmail
+
Set
Code
Gmail
18 노드David Olusola
인사
AI 리드 봇 프로: Google Maps→Slack→HubSpot→$$$
Google 지도, GPT-4, HubSpot를 사용한 자동 잠재 고객 생성 및 자격 평가
If
Set
Code
+
If
Set
Code
16 노드David Olusola
영업
워크플로우 정보
난이도
중급
노드 수11
카테고리1
노드 유형3
저자
David Olusola
@dae221I help ambitious businesses eliminate operational bottlenecks and scale faster with AI automation. My clients typically see 40-60% efficiency gains within 90 days. Currently accepting 3 new projects this quarter - david@daexai.com
외부 링크
n8n.io에서 보기 →
이 워크플로우 공유