fix: scheduled_daily_briefing n8n import 호환 형식으로 재작성 (09:10->daily_headlines->run_headlines_workflow->naver/sea->format->Slack)

Made-with: Cursor
This commit is contained in:
happybell80 2026-03-19 15:44:10 +09:00
parent 3930a70f3b
commit 337e2f16e7

View File

@ -1,87 +1,178 @@
{
"name": "robeing-daily-headlines-actual-runtime",
"nodes": [
{
"parameters": {
"height": 420,
"width": 2380
},
"type": "n8n-nodes-base.stickyNote",
"position": [
-220,
64
],
"typeVersion": 1,
"id": "aeb5f661-29a0-461b-9d7b-1d8f68a2c001",
"name": "Workflow Note"
},
{
"parameters": {
"rule": {
"cronExpression": "10 9 * * 1-5"
}
},
"id": "sched-headlines-001",
"id": "aeb5f661-29a0-461b-9d7b-1d8f68a2c002",
"name": "09:10 Trigger",
"type": "n8n-nodes-base.scheduleTrigger",
"typeVersion": 1,
"position": [220, 240]
"position": [
0,
224
]
},
{
"parameters": {
"jsCode": "return [{ json: { step: 'scheduled_jobs.daily_headlines', cron: '10 9 * * mon-fri', channel_id: 'C09C98KK2TT' } }];"
"jsCode": "return {\n scheduler_source: 'scheduled_jobs.daily_headlines',\n cron_expression: '10 9 * * mon-fri',\n channel_id: 'C09C98KK2TT',\n job_wrapper: 'app.scheduler.jobs.daily_headlines._run_headlines_with_logging',\n workflow_entry: 'run_headlines_workflow(channel_id)',\n state_store: '/code/state/headlines_graph.sqlite'\n};"
},
"id": "sched-headlines-002",
"name": "DB Job Config",
"id": "aeb5f661-29a0-461b-9d7b-1d8f68a2c003",
"name": "Build Runtime Context",
"type": "n8n-nodes-base.code",
"typeVersion": 2,
"position": [470, 240]
"position": [
240,
224
]
},
{
"parameters": {
"jsCode": "return [{ json: { step: 'app.scheduler.jobs.daily_headlines._run_headlines_with_logging(channel_id)', channel_id: $json.channel_id } }];"
"method": "POST",
"url": "=http://192.168.219.52:8505/api/news/naver/startup-headlines",
"sendBody": true,
"specifyBody": "json",
"jsonBody": "={\"format\":\"slack\"}",
"options": {
"response": {
"response": {
"fullResponse": true
}
}
}
},
"id": "sched-headlines-003",
"name": "daily_headlines Wrapper",
"type": "n8n-nodes-base.code",
"typeVersion": 2,
"position": [720, 240]
"id": "aeb5f661-29a0-461b-9d7b-1d8f68a2c004",
"name": "Call Naver Headlines API",
"type": "n8n-nodes-base.httpRequest",
"typeVersion": 4.2,
"position": [
512,
160
]
},
{
"parameters": {
"jsCode": "return [{ json: { step: 'run_headlines_workflow(channel_id)', state_store: '/code/state/headlines_graph.sqlite', nodes: ['fetch_naver', 'fetch_sea', 'extract_terms', 'format', 'send'], channel_id: $json.channel_id } }];"
"method": "POST",
"url": "=http://192.168.219.52:8505/api/news/sea/headlines",
"sendBody": true,
"specifyBody": "json",
"jsonBody": "={\"format\":\"json\"}",
"options": {
"response": {
"response": {
"fullResponse": true
}
}
}
},
"id": "sched-headlines-004",
"name": "LangGraph Workflow",
"type": "n8n-nodes-base.code",
"typeVersion": 2,
"position": [970, 240]
"id": "aeb5f661-29a0-461b-9d7b-1d8f68a2c005",
"name": "Call SEA Headlines API",
"type": "n8n-nodes-base.httpRequest",
"typeVersion": 4.2,
"position": [
512,
304
]
},
{
"parameters": {
"jsCode": "return [{ json: { step: 'skill-news POST /api/news/naver/startup-headlines', format: 'slack' } }];"
"jsCode": "const runtime = $('Build Runtime Context').item.json;\nconst naver = $('Call Naver Headlines API').item.json;\nconst sea = $('Call SEA Headlines API').item.json;\n\nreturn {\n channel_id: runtime.channel_id,\n summary: [\n 'DB scheduler -> daily_headlines wrapper',\n 'run_headlines_workflow(channel_id)',\n 'fetch_naver + fetch_sea + extract_terms + format + send',\n 'Naver Slack text + SEA section inserted',\n 'keyword summary hidden, final blank lines kept in formatter'\n ].join('\\n'),\n runtime,\n naver_status: naver.statusCode,\n sea_status: sea.statusCode,\n final_delivery: 'rb8001 headlines_workflow.send_node -> Slack chat_postMessage'\n};"
},
"id": "sched-headlines-005",
"name": "Naver Headlines API",
"id": "aeb5f661-29a0-461b-9d7b-1d8f68a2c006",
"name": "Describe Actual Path",
"type": "n8n-nodes-base.code",
"typeVersion": 2,
"position": [1220, 160]
"position": [
816,
224
]
},
{
"parameters": {
"jsCode": "return [{ json: { step: 'skill-news POST /api/news/sea/headlines', format: 'json' } }];"
"conditions": {
"number": [
{
"value1": "={{ $json.naver_status }}",
"operation": "equal",
"value2": 200
},
{
"value1": "={{ $json.sea_status }}",
"operation": "equal",
"value2": 200
}
]
},
"options": {}
},
"id": "sched-headlines-006",
"name": "SEA Headlines API",
"type": "n8n-nodes-base.code",
"id": "aeb5f661-29a0-461b-9d7b-1d8f68a2c007",
"name": "APIs Reachable?",
"type": "n8n-nodes-base.if",
"typeVersion": 2,
"position": [1220, 320]
"position": [
1088,
224
]
},
{
"parameters": {
"jsCode": "return [{ json: { step: 'rb8001 headlines_workflow.format_node', summary: ['네이버 Slack 텍스트 수신', '동남아 소식 섹션 삽입', '키워드 요약 미삽입', '클로징 후 명언, 마지막 빈줄 2줄'] } }];"
"jsCode": "return {\n channel: $json.runtime.channel_id,\n text: $json.summary\n};"
},
"id": "sched-headlines-007",
"name": "Format Briefing Text",
"id": "aeb5f661-29a0-461b-9d7b-1d8f68a2c008",
"name": "Build Runtime Summary",
"type": "n8n-nodes-base.code",
"typeVersion": 2,
"position": [1470, 240]
"position": [
1344,
160
]
},
{
"parameters": {
"jsCode": "return [{ json: { step: 'rb8001 headlines_workflow.send_node -> Slack chat_postMessage', channel_id: 'C09C98KK2TT' } }];"
"jsCode": "return {\n channel: $('Build Runtime Context').item.json.channel_id,\n text: 'Actual runtime path documented, but referenced APIs were not reachable in this visualization run.'\n};"
},
"id": "sched-headlines-008",
"name": "Slack Delivery",
"id": "aeb5f661-29a0-461b-9d7b-1d8f68a2c009",
"name": "Build Fallback Summary",
"type": "n8n-nodes-base.code",
"typeVersion": 2,
"position": [1720, 240]
"position": [
1344,
304
]
},
{
"parameters": {
"resource": "message",
"operation": "post",
"channel": "={{ $json.channel }}",
"text": "={{ $json.text }}",
"otherOptions": {}
},
"id": "aeb5f661-29a0-461b-9d7b-1d8f68a2c010",
"name": "Slack Delivery View",
"type": "n8n-nodes-base.slack",
"typeVersion": 2,
"position": [
1616,
224
]
}
],
"connections": {
@ -89,78 +180,96 @@
"main": [
[
{
"node": "DB Job Config",
"node": "Build Runtime Context",
"type": "main",
"index": 0
}
]
]
},
"DB Job Config": {
"Build Runtime Context": {
"main": [
[
{
"node": "daily_headlines Wrapper",
"type": "main",
"index": 0
}
]
]
},
"daily_headlines Wrapper": {
"main": [
[
{
"node": "LangGraph Workflow",
"type": "main",
"index": 0
}
]
]
},
"LangGraph Workflow": {
"main": [
[
{
"node": "Naver Headlines API",
"node": "Call Naver Headlines API",
"type": "main",
"index": 0
},
{
"node": "SEA Headlines API",
"node": "Call SEA Headlines API",
"type": "main",
"index": 0
}
]
]
},
"Naver Headlines API": {
"Call Naver Headlines API": {
"main": [
[
{
"node": "Format Briefing Text",
"node": "Describe Actual Path",
"type": "main",
"index": 0
}
]
]
},
"SEA Headlines API": {
"Call SEA Headlines API": {
"main": [
[
{
"node": "Format Briefing Text",
"node": "Describe Actual Path",
"type": "main",
"index": 0
}
]
]
},
"Format Briefing Text": {
"Describe Actual Path": {
"main": [
[
{
"node": "Slack Delivery",
"node": "APIs Reachable?",
"type": "main",
"index": 0
}
]
]
},
"APIs Reachable?": {
"main": [
[
{
"node": "Build Runtime Summary",
"type": "main",
"index": 0
}
],
[
{
"node": "Build Fallback Summary",
"type": "main",
"index": 0
}
]
]
},
"Build Runtime Summary": {
"main": [
[
{
"node": "Slack Delivery View",
"type": "main",
"index": 0
}
]
]
},
"Build Fallback Summary": {
"main": [
[
{
"node": "Slack Delivery View",
"type": "main",
"index": 0
}