n8n 표준 에이전트 워크플로우 JSON 구현하기 |가나 투데이
n8n 표준 에이전트 워크플로우 JSON 구현하기 |가나 투데이
실습의 마무리를 위해 n8n에서 즉시 불러와(Import) 사용할 수 있는 표준 템플릿 JSON 코드를 준비했습니다.
이 코드는 앞서 설계한 [구글 시트 트리거 - 데이터 정제 - 조건 분기 - 디스코드 알림]의 핵심 로직을 모두 포함하고 있습니다. 아래 코드를 복사해서 사용해 보세요.
[실습용] n8n 표준 에이전트 워크플로우 JSON 코드
아래 코드를 복사한 뒤, n8n 워크플로우 빈 화면에서 Ctrl + V(붙여넣기)를 하면 노드 구조가 자동으로 생성됩니다.
JSON
{
"nodes": [
{
"parameters": {
"pollTimes": {
"item": [
{
"mode": "everyMinute"
}
]
},
"documentId": {
"__rl": true,
"mode": "id"
},
"sheetName": {
"__rl": true,
"mode": "name"
},
"options": {}
},
"id": "1e28b12e-8394-4b5a-9c7d-8f2c3d4e5f6g",
"name": "Google Sheets Trigger",
"type": "n8n-nodes-base.googleSheetsTrigger",
"typeVersion": 1,
"position": [400, 300]
},
{
"parameters": {
"fields": {
"values": [
{
"name": "user_name",
"stringValue": "={{ $json.이름 }}"
},
{
"name": "user_feedback",
"stringValue": "={{ $json.내용 }}"
},
{
"name": "user_score",
"numberValue": "={{ $json.점수 }}"
}
]
},
"options": {}
},
"id": "2f39c23f-94a5-5c6b-0d8e-9g3d4e5f6g7h",
"name": "Data Refinement",
"type": "n8n-nodes-base.set",
"typeVersion": 3,
"position": [620, 300]
},
{
"parameters": {
"conditions": {
"number": [
{
"value1": "={{ $json.user_score }}",
"operation": "smaller",
"value2": 3
}
]
}
},
"id": "3g40d34g-05b6-6d7c-1e9f-0h4e5f6g7h8i",
"name": "Risk Check (If)",
"type": "n8n-nodes-base.if",
"typeVersion": 1,
"position": [840, 300]
},
{
"parameters": {
"content": "=🚨 **긴급 피드백 발생!**\n\n작성자: {{ $json.user_name }}\n내용: {{ $json.user_feedback }}\n점수: {{ $json.user_score }}점\n\n즉시 확인이 필요합니다."
},
"id": "4h51e45h-16c7-7e8d-2f0g-1i5e6f7g8h9j",
"name": "Discord (Warning)",
"type": "n8n-nodes-base.discord",
"typeVersion": 1,
"position": [1060, 200]
},
{
"parameters": {
"content": "=✅ **새로운 긍정 피드백**\n\n작성자: {{ $json.user_name }}님이 {{ $json.user_score }}점을 남겼습니다.\n내용: {{ $json.user_feedback }}"
},
"id": "5i62f56i-27d8-8f9e-3g1h-2j6f7g8h9i0k",
"name": "Discord (Success)",
"type": "n8n-nodes-base.discord",
"typeVersion": 1,
"position": [1060, 400]
}
],
"connections": {
"Google Sheets Trigger": {
"main": [
[
{
"node": "Data Refinement",
"type": "main",
"index": 0
}
]
]
},
"Data Refinement": {
"main": [
[
{
"node": "Risk Check (If)",
"type": "main",
"index": 0
}
]
]
},
"Risk Check (If)": {
"main": [
[
{
"node": "Discord (Warning)",
"type": "main",
"index": 0
}
],
[
{
"node": "Discord (Success)",
"type": "main",
"index": 0
}
]
]
}
}
}
코드 적용 후 꼼꼼하게 챙겨야 할 루틴(Routine)
코드를 불러온 뒤에는 반드시 다음의 내부 연결 세팅을 마무리해야 에이전트가 정상적으로 숨을 쉽니다.
Credential 연결: 각 노드의 'Credential' 항목에서 본인의 구글 계정과 디스코드 웹훅(Webhook) 정보를 연결하세요.
데이터 매핑 확인: 구글 시트의 실제 열 이름이 '이름', '내용', '점수'가 맞는지 확인하세요. 만약 다르다면
Data Refinement노드에서 이름을 수정해야 합니다.동작 테스트: 우측 하단의
Execute Workflow를 눌러 신호가 막힘없이 분기점(If)을 지나 목적지까지 도달하는지 스캔하세요.
#가나 투데이 #ganatoday
그린아프로




