워크플로우 로직 학습: 병합, IF 및 스위치 연산
고급
이것은Engineering분야의자동화 워크플로우로, 22개의 노드를 포함합니다.주로 If, Set, Merge, Switch, ManualTrigger 등의 노드를 사용하며. 워크플로우 로직 배우기: 병합, IF 및 Switch 연산
사전 요구사항
- •특별한 사전 요구사항 없이 가져와 바로 사용 가능합니다
사용된 노드 (22)
카테고리
워크플로우 미리보기
노드 연결 관계를 시각적으로 표시하며, 확대/축소 및 이동을 지원합니다
워크플로우 내보내기
다음 JSON 구성을 복사하여 n8n에 가져오면 이 워크플로우를 사용할 수 있습니다
{
"meta": {
"instanceId": "e409ea34548a2afe2dffba31130cd1cf2e98ebe2afaeed2a63caf2a0582d1da0"
},
"nodes": [
{
"id": "d6cf9b3d-66b8-4022-8c9d-698e89cd22fd",
"name": "분류 시작",
"type": "n8n-nodes-base.manualTrigger",
"position": [
-880,
608
],
"parameters": {},
"typeVersion": 1
},
{
"id": "b8c72a1e-0268-4d99-8141-ca14e35cbd6a",
"name": "메모지",
"type": "n8n-nodes-base.stickyNote",
"position": [
-1264,
192
],
"parameters": {
"width": 624,
"height": 596,
"content": "### Tutorial: The Logic Trio (Merge, IF, Switch)\n\nWelcome! This workflow will teach you the three most important nodes for controlling the flow of your data.\n\n**The Analogy: A Package Sorting Center**\n- **Data Items:** Think of these as packages moving on a conveyor belt.\n- **Merge Node:** A point where multiple conveyor belts combine into one.\n- **IF Node:** A simple sorting gate with two paths (e.g., \"Fragile\" or \"Not Fragile\").\n- **Switch Node:** An advanced sorting machine with many paths (e.g., sorting by destination city).\n\n\n**How to use this tutorial:**\n1. Click **\"Execute Workflow\"**.\n2. Follow the flow from left to right, clicking on each node to see its output.\n3. Read the sticky notes to understand what each node does."
},
"typeVersion": 1
},
{
"id": "81532695-73c0-4357-a957-3d0ef580578f",
"name": "메모지1",
"type": "n8n-nodes-base.stickyNote",
"position": [
-272,
192
],
"parameters": {
"color": 4,
"width": 384,
"height": 604,
"content": "### 1. The Merge Node\n\n**Analogy:** A conveyor belt where packages from different loading docks (the `Set` nodes) come together.\n\n**What it does:** The Merge node combines multiple streams of data into a single stream.\n\nHere, it's set to **Append** mode, which is the most common. It waits for all incoming data and then passes it all through together.\n\n**➡️ Look at the output. We now have both the letter and the parcel in one list, ready for the next step!**"
},
"typeVersion": 1
},
{
"id": "dadbac54-6b31-4a0f-8d5e-b6121467e90e",
"name": "메모지2",
"type": "n8n-nodes-base.stickyNote",
"position": [
144,
192
],
"parameters": {
"color": 4,
"width": 384,
"height": 596,
"content": "### 2. The IF Node\n\n**Analogy:** A simple sorting gate with two paths: a \"true\" path and a \"false\" path.\n\n**What it does:** The IF node checks if a condition is met. If it's true, the data goes down the top output. If it's false, it goes down the bottom output.\n\nHere, we're asking a simple question: **\"Does this package have an `is_fragile` property?\"**\n\n**➡️ The parcel will go down the 'true' path, and the letters (which don't have that property) will go down the 'false' path.**"
},
"typeVersion": 1
},
{
"id": "0c330031-eab5-4ee3-8b11-91aee526952a",
"name": "'파손 주의' 처리 추가",
"type": "n8n-nodes-base.set",
"position": [
624,
512
],
"parameters": {
"options": {},
"assignments": {
"assignments": [
{
"id": "12345",
"name": "handling_instructions",
"type": "string",
"value": "Handle with care!"
}
]
},
"includeOtherFields": true
},
"typeVersion": 3.4
},
{
"id": "d14c0e68-3823-4f15-98eb-58a0d4983861",
"name": "'일반' 처리 추가",
"type": "n8n-nodes-base.set",
"position": [
624,
704
],
"parameters": {
"options": {},
"assignments": {
"assignments": [
{
"id": "12345",
"name": "handling_instructions",
"type": "string",
"value": "Standard handling"
}
]
},
"includeOtherFields": true
},
"typeVersion": 3.4
},
{
"id": "2ebde854-aa6b-48de-83b1-33950a1486e0",
"name": "메모지3",
"type": "n8n-nodes-base.stickyNote",
"position": [
816,
272
],
"parameters": {
"color": 5,
"width": 384,
"height": 552,
"content": "### Merge Again?\n\n**Why do we need another Merge node here?**\n\nAfter the IF node, our data was split into two different paths. Before we can perform the *next* sorting step on all packages, we need to get them back onto the same conveyor belt.\n\nThis is a very common and important pattern in n8n: \n**Split -> Process -> Merge.**"
},
"typeVersion": 1
},
{
"id": "66ca4ac5-aceb-426e-ab22-50c012602a85",
"name": "메모지4",
"type": "n8n-nodes-base.stickyNote",
"position": [
1232,
176
],
"parameters": {
"color": 4,
"width": 400,
"height": 648,
"content": "### 3. The Switch Node\n\n**Analogy:** An advanced sorting machine that can send packages to many different destinations.\n\n**What it does:** The Switch node is like an IF node with multiple doors. It checks the value of a single field (`destination` in this case) and sends the data down the path that matches the value.\n\n- If the destination is \"London\", it goes to output 0.\n- If it's \"New York\", it goes to output 1.\n- If it's something else, it goes to the **default** output.\n\n\n**➡️ This is much cleaner than using many IF nodes chained together!**"
},
"typeVersion": 1
},
{
"id": "10f56a78-85cd-4c8b-88e0-b6b3f0346e89",
"name": "런던 수거함으로 전송",
"type": "n8n-nodes-base.set",
"position": [
1776,
320
],
"parameters": {
"options": {},
"assignments": {
"assignments": [
{
"id": "12345",
"name": "sorting_bin",
"type": "string",
"value": "A1 (London)"
}
]
},
"includeOtherFields": true
},
"typeVersion": 3.4
},
{
"id": "2cba95bd-2c9b-42d1-90cb-74c2edf97ec7",
"name": "뉴욕 수거함으로 전송",
"type": "n8n-nodes-base.set",
"position": [
1776,
512
],
"parameters": {
"options": {},
"assignments": {
"assignments": [
{
"id": "12345",
"name": "sorting_bin",
"type": "string",
"value": "B2 (New York)"
}
]
},
"includeOtherFields": true
},
"typeVersion": 3.4
},
{
"id": "1531b4e3-eece-4c89-98bd-e9633fdd77f6",
"name": "도쿄 수거함으로 전송",
"type": "n8n-nodes-base.set",
"position": [
1776,
704
],
"parameters": {
"options": {},
"assignments": {
"assignments": [
{
"id": "12345",
"name": "sorting_bin",
"type": "string",
"value": "C3 (Tokyo)"
}
]
},
"includeOtherFields": true
},
"typeVersion": 3.4
},
{
"id": "d46604a8-663e-42bd-a175-a34edb8953fb",
"name": "기본 수거함",
"type": "n8n-nodes-base.set",
"position": [
1776,
896
],
"parameters": {
"options": {},
"assignments": {
"assignments": [
{
"id": "12345",
"name": "sorting_bin",
"type": "string",
"value": "Return to Sender"
}
]
},
"includeOtherFields": true
},
"typeVersion": 3.4
},
{
"id": "570040aa-3f8d-4f59-904a-ee3deb36a9df",
"name": "최종 분류된 패키지",
"type": "n8n-nodes-base.noOp",
"position": [
2160,
624
],
"parameters": {},
"typeVersion": 1
},
{
"id": "756313e7-d2f3-45cc-a4f5-f91e7a8f778a",
"name": "메모지5",
"type": "n8n-nodes-base.stickyNote",
"position": [
2032,
272
],
"parameters": {
"color": 6,
"width": 368,
"height": 560,
"content": "### All Packages Sorted!\n\nCongratulations! You've successfully used the three logic nodes to sort your packages.\n\n**You learned how to:**\n- **Merge** data from different sources.\n- Use **IF** for simple true/false decisions.\n- Use **Switch** for complex, multi-path routing.\n\n\nMastering these three nodes is the key to building powerful and intelligent workflows in n8n."
},
"typeVersion": 1
},
{
"id": "4466652f-cc2b-47b1-bf4f-98d89753881f",
"name": "3. Switch 노드",
"type": "n8n-nodes-base.switch",
"position": [
1392,
576
],
"parameters": {
"rules": {
"values": [
{
"outputKey": "London",
"conditions": {
"options": {
"version": 2,
"leftValue": "",
"caseSensitive": true,
"typeValidation": "strict"
},
"combinator": "and",
"conditions": [
{
"id": "8d43cde4-027a-4ca7-a24c-6f74f12d6238",
"operator": {
"type": "string",
"operation": "equals"
},
"leftValue": "={{ $json.destination }}",
"rightValue": "London"
}
]
},
"renameOutput": true
},
{
"outputKey": "New York",
"conditions": {
"options": {
"version": 2,
"leftValue": "",
"caseSensitive": true,
"typeValidation": "strict"
},
"combinator": "and",
"conditions": [
{
"id": "399a0fbd-6be5-48e9-9f66-04cf385cb418",
"operator": {
"name": "filter.operator.equals",
"type": "string",
"operation": "equals"
},
"leftValue": "={{ $json.destination }}",
"rightValue": "New York"
}
]
},
"renameOutput": true
},
{
"outputKey": "Tokyo",
"conditions": {
"options": {
"version": 2,
"leftValue": "",
"caseSensitive": true,
"typeValidation": "strict"
},
"combinator": "and",
"conditions": [
{
"id": "a69d387d-a174-42b3-bc5f-c8b46b7c2375",
"operator": {
"name": "filter.operator.equals",
"type": "string",
"operation": "equals"
},
"leftValue": "={{ $json.destination }}",
"rightValue": "Tokyo"
}
]
},
"renameOutput": true
}
]
},
"options": {
"fallbackOutput": "extra",
"renameFallbackOutput": "Default"
}
},
"typeVersion": 3.2
},
{
"id": "add68013-30a7-43db-93d4-5af691764684",
"name": "편지 생성",
"type": "n8n-nodes-base.set",
"position": [
-496,
416
],
"parameters": {
"options": {},
"assignments": {
"assignments": [
{
"id": "12345",
"name": "package_id",
"type": "string",
"value": "L-001"
},
{
"id": "67890",
"name": "type",
"type": "string",
"value": "letter"
},
{
"id": "abcde",
"name": "destination",
"type": "string",
"value": "London"
}
]
}
},
"typeVersion": 3.4
},
{
"id": "5af75a45-b912-41c6-b073-03188ae914ef",
"name": "1. Merge 노드",
"type": "n8n-nodes-base.merge",
"position": [
-128,
592
],
"parameters": {
"numberInputs": 3
},
"typeVersion": 3.2
},
{
"id": "11627c3b-465a-4a4a-bfe9-95c08d502f2f",
"name": "2. IF 노드",
"type": "n8n-nodes-base.if",
"position": [
272,
608
],
"parameters": {
"options": {},
"conditions": {
"options": {
"version": 2,
"leftValue": "",
"caseSensitive": true,
"typeValidation": "loose"
},
"combinator": "and",
"conditions": [
{
"id": "a68aad83-1d09-4ebe-9732-aaedc407bb4b",
"operator": {
"type": "boolean",
"operation": "true",
"singleValue": true
},
"leftValue": "={{ $json.is_fragile }}",
"rightValue": ""
}
]
},
"looseTypeValidation": true
},
"typeVersion": 2.2
},
{
"id": "4b5b5ba4-25e1-4ef0-93d8-50670dbc1ce0",
"name": "모든 패키지 재그룹화",
"type": "n8n-nodes-base.merge",
"position": [
960,
608
],
"parameters": {},
"typeVersion": 3.2
},
{
"id": "21d270c4-c19c-42ed-a6e3-67ecedd1c0c9",
"name": "두 번째 편지 생성",
"type": "n8n-nodes-base.set",
"position": [
-496,
608
],
"parameters": {
"options": {},
"assignments": {
"assignments": [
{
"id": "12345",
"name": "package_id",
"type": "string",
"value": "L-002"
},
{
"id": "67890",
"name": "type",
"type": "string",
"value": "letter"
},
{
"id": "abcde",
"name": "destination",
"type": "string",
"value": "Tokyo"
}
]
}
},
"typeVersion": 3.4
},
{
"id": "8a295323-9515-410c-9ac1-fb431d08cea2",
"name": "소포 생성",
"type": "n8n-nodes-base.set",
"position": [
-496,
800
],
"parameters": {
"options": {},
"assignments": {
"assignments": [
{
"id": "12345",
"name": "package_id",
"type": "string",
"value": "P-001"
},
{
"id": "67890",
"name": "type",
"type": "string",
"value": "parcel"
},
{
"id": "abcde",
"name": "destination",
"type": "string",
"value": "New York"
},
{
"id": "fghij",
"name": "is_fragile",
"type": "boolean",
"value": true
}
]
}
},
"typeVersion": 3.4
},
{
"id": "c06a0f40-cc18-4710-8b07-9d396e89a83d",
"name": "메모지10",
"type": "n8n-nodes-base.stickyNote",
"position": [
2432,
32
],
"parameters": {
"color": 3,
"width": 540,
"height": 800,
"content": "## Was this helpful? Let me know!\n\nI really hope this template helped you understand how Logical Operation Nodes work here in n8n. Your feedback is incredibly valuable and helps me create better resources for the n8n community.\n\n### **Share Your Thoughts & Ideas**\n\nWhether you have a suggestion, found a typo, or just want to say thanks, I'd love to hear from you!\nHere's a simple n8n form built for this purpose:\n\n#### ➡️ **[Click here to give feedback](https://api.ia2s.app/form/templates/feedback?template=Merge%20If%20Switch)**\n\n### **Ready to Build Something Great?**\n\nIf you're looking to take your n8n skills or business automation to the next level, I can help.\n\n**🎓 n8n Coaching:** Want to become an n8n pro? I offer one-on-one coaching sessions to help you master workflows, tackle specific problems, and build with confidence.\n#### ➡️ **[Book a Coaching Session](https://api.ia2s.app/form/templates/coaching?template=Merge%20If%20Switch)**\n\n**💼 n8n Consulting:** Have a complex project, an integration challenge, or need a custom workflow built for your business? Let's work together to create a powerful automation solution.\n#### ➡️ **[Inquire About Consulting Services](https://api.ia2s.app/form/templates/consulting?template=Merge%20If%20Switch)**\n\n---\n\nHappy Automating!\nLucas Peyrin"
},
"typeVersion": 1
}
],
"pinData": {},
"connections": {
"11627c3b-465a-4a4a-bfe9-95c08d502f2f": {
"main": [
[
{
"node": "0c330031-eab5-4ee3-8b11-91aee526952a",
"type": "main",
"index": 0
}
],
[
{
"node": "d14c0e68-3823-4f15-98eb-58a0d4983861",
"type": "main",
"index": 0
}
]
]
},
"d46604a8-663e-42bd-a175-a34edb8953fb": {
"main": [
[
{
"node": "570040aa-3f8d-4f59-904a-ee3deb36a9df",
"type": "main",
"index": 0
}
]
]
},
"5af75a45-b912-41c6-b073-03188ae914ef": {
"main": [
[
{
"node": "11627c3b-465a-4a4a-bfe9-95c08d502f2f",
"type": "main",
"index": 0
}
]
]
},
"add68013-30a7-43db-93d4-5af691764684": {
"main": [
[
{
"node": "5af75a45-b912-41c6-b073-03188ae914ef",
"type": "main",
"index": 0
}
]
]
},
"8a295323-9515-410c-9ac1-fb431d08cea2": {
"main": [
[
{
"node": "5af75a45-b912-41c6-b073-03188ae914ef",
"type": "main",
"index": 2
}
]
]
},
"d6cf9b3d-66b8-4022-8c9d-698e89cd22fd": {
"main": [
[
{
"node": "8a295323-9515-410c-9ac1-fb431d08cea2",
"type": "main",
"index": 0
},
{
"node": "21d270c4-c19c-42ed-a6e3-67ecedd1c0c9",
"type": "main",
"index": 0
},
{
"node": "add68013-30a7-43db-93d4-5af691764684",
"type": "main",
"index": 0
}
]
]
},
"4466652f-cc2b-47b1-bf4f-98d89753881f": {
"main": [
[
{
"node": "10f56a78-85cd-4c8b-88e0-b6b3f0346e89",
"type": "main",
"index": 0
}
],
[
{
"node": "2cba95bd-2c9b-42d1-90cb-74c2edf97ec7",
"type": "main",
"index": 0
}
],
[
{
"node": "1531b4e3-eece-4c89-98bd-e9633fdd77f6",
"type": "main",
"index": 0
}
],
[
{
"node": "d46604a8-663e-42bd-a175-a34edb8953fb",
"type": "main",
"index": 0
}
]
]
},
"21d270c4-c19c-42ed-a6e3-67ecedd1c0c9": {
"main": [
[
{
"node": "5af75a45-b912-41c6-b073-03188ae914ef",
"type": "main",
"index": 1
}
]
]
},
"1531b4e3-eece-4c89-98bd-e9633fdd77f6": {
"main": [
[
{
"node": "570040aa-3f8d-4f59-904a-ee3deb36a9df",
"type": "main",
"index": 0
}
]
]
},
"10f56a78-85cd-4c8b-88e0-b6b3f0346e89": {
"main": [
[
{
"node": "570040aa-3f8d-4f59-904a-ee3deb36a9df",
"type": "main",
"index": 0
}
]
]
},
"2cba95bd-2c9b-42d1-90cb-74c2edf97ec7": {
"main": [
[
{
"node": "570040aa-3f8d-4f59-904a-ee3deb36a9df",
"type": "main",
"index": 0
}
]
]
},
"4b5b5ba4-25e1-4ef0-93d8-50670dbc1ce0": {
"main": [
[
{
"node": "4466652f-cc2b-47b1-bf4f-98d89753881f",
"type": "main",
"index": 0
}
]
]
},
"0c330031-eab5-4ee3-8b11-91aee526952a": {
"main": [
[
{
"node": "4b5b5ba4-25e1-4ef0-93d8-50670dbc1ce0",
"type": "main",
"index": 0
}
]
]
},
"d14c0e68-3823-4f15-98eb-58a0d4983861": {
"main": [
[
{
"node": "4b5b5ba4-25e1-4ef0-93d8-50670dbc1ce0",
"type": "main",
"index": 1
}
]
]
}
}
}자주 묻는 질문
이 워크플로우를 어떻게 사용하나요?
위의 JSON 구성 코드를 복사하여 n8n 인스턴스에서 새 워크플로우를 생성하고 "JSON에서 가져오기"를 선택한 후, 구성을 붙여넣고 필요에 따라 인증 설정을 수정하세요.
이 워크플로우는 어떤 시나리오에 적합한가요?
고급 - 엔지니어링
유료인가요?
이 워크플로우는 완전히 무료이며 직접 가져와 사용할 수 있습니다. 다만, 워크플로우에서 사용하는 타사 서비스(예: OpenAI API)는 사용자 직접 비용을 지불해야 할 수 있습니다.
관련 워크플로우 추천
🎓 병행 처리를 사용하여 속도가 중요한 작업 흐름 최적화(확산-집합)
🎓 병렬 처리(확산/집합)를 사용하여 속도 중요한 작업 흐름 최적화
If
Set
Code
+
If
Set
Code
34 노드Lucas Peyrin
엔지니어링
대기 노드를 포함한 장기 실행 워크플로우 상태 관리 시스템
대기 노드를 포함한 장기 실행 워크플로우 상태 관리 시스템
If
Set
Code
+
If
Set
Code
42 노드Lucas Peyrin
엔지니어링
🧑🎓 진행식 표현 도전을 통해 데이터 접근 기술을 익히기
🧑🎓 진보적인 표현식 도전을 통해 데이터 접근 기술을 습득하세요
If
Set
Html
+
If
Set
Html
62 노드Lucas Peyrin
엔지니어링
데이터 동기화 학습: 창고 재고 감사 튜토리얼
데이터 동기화를 배우기: 저장소 재고 감사 튜토리얼
Set
Split Out
Manual Trigger
+
Set
Split Out
Manual Trigger
17 노드Lucas Peyrin
엔지니어링
AI 스마트 어시스턴트: Supabase 스토리지 및 Google Drive 파일과 대화
AI스마트어시스턴트:与Supabase存储및Google Drive文件对话
If
Set
Wait
+
If
Set
Wait
62 노드Mark Shcherbakov
엔지니어링
데이터와 대화: 텍스트를 SQL 쿼리 및 시각화 곡선으로 변환
데이터와 대화: 텍스트를 SQL 쿼리 및 시각화 곡선으로 변환
If
Set
Merge
+
If
Set
Merge
36 노드hippolyte-hu
엔지니어링
워크플로우 정보
난이도
고급
노드 수22
카테고리1
노드 유형7
저자
Lucas Peyrin
@lucaspeyrinInnovative builder with a passion for crafting automation solutions that solve real-world challenges. From streamlining workflows to driving efficiency, my work empowers teams and individuals to achieve more with less effort. Experienced in developing scalable tools and strategies that deliver results with n8n, supabase and cline.
외부 링크
n8n.io에서 보기 →
이 워크플로우 공유