From 11b3a60be8bcbbb3f7bbb79a49ee717066b7de0e Mon Sep 17 00:00:00 2001 From: sm4640 Date: Wed, 25 Mar 2026 15:54:33 +0900 Subject: [PATCH] =?UTF-8?q?Docs:=20n8n=20=EB=85=B8=EB=93=9C=20=EC=84=A4?= =?UTF-8?q?=EC=A0=95=20=EC=83=81=EC=84=B8=ED=99=94=20=E2=80=94=20Mode,=20S?= =?UTF-8?q?end=20Body,=20Specify=20Body=20=EB=93=B1=20=EB=88=84=EB=9D=BD?= =?UTF-8?q?=20=EC=98=B5=EC=85=98=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Opus 4.6 --- CLAUDE.md | 27 +++++++++++++++++++-------- docs/n8n-setup.md | 30 ++++++++++++++++++++---------- 2 files changed, 39 insertions(+), 18 deletions(-) diff --git a/CLAUDE.md b/CLAUDE.md index 2c46681..de5f620 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -85,7 +85,9 @@ Schedule Trigger (매 정시) ─→ 머니코믹스 playlistItems ─→ Edit F - **Type**: HTTP Request - **Method**: GET - **URL**: `https://www.googleapis.com/youtube/v3/playlistItems` -- **Query Parameters**: +- **Send Query Parameters**: ON +- **Specify Query Parameters**: Using Individual Fields +- **Query Parameters (Add Parameter로 추가)**: - `part`: `snippet` - `playlistId`: 채널 업로드 목록 ID (채널 ID의 `UC` → `UU`로 변환) - `maxResults`: `5` @@ -121,6 +123,7 @@ Schedule Trigger (매 정시) ─→ 머니코믹스 playlistItems ─→ Edit F #### 5. Code (새 영상 필터링) - **Type**: Code - **Language**: JavaScript +- **Mode**: Run Once for All Items - 최근 1시간 이내 발행된 영상만 필터링: ```javascript const oneHourAgo = new Date(Date.now() - 60 * 60 * 1000); @@ -146,8 +149,10 @@ return $input.all().filter(item => { - **Type**: HTTP Request - **Method**: POST - **URL**: `https://<서버주소>/api/news/summarize` +- **Send Body**: ON - **Body Content Type**: JSON -- **Body**: +- **Specify Body**: Using JSON +- **Body (Expression 모드)**: ```json { "video_url": "{{ $json.video_url }}", @@ -159,18 +164,22 @@ return $input.all().filter(item => { #### 7. Switch (응답 분기) - **Type**: Switch -- **Field**: `{{ $json.status }}` +- **Mode**: Rules +- **Data Type**: String +- **Value**: `{{ $json.status }}` - **Rules**: - - `ok` → Discord 요약 전송 - - `skipped` → No Operation (무시) - - `error` → Discord 에러 알림 + - Rule 1: Equal `ok` → Discord 요약 전송 + - Rule 2: Equal `skipped` → No Operation (무시) + - Rule 3: Equal `error` → Discord 에러 알림 #### 8. Discord 요약 전송 (status=ok) - **Type**: HTTP Request - **Method**: POST - **URL**: Discord 웹훅 URL +- **Send Body**: ON - **Body Content Type**: JSON -- **Body**: +- **Specify Body**: Using JSON +- **Body (Expression 모드)**: ```json { "embeds": [{ @@ -190,8 +199,10 @@ return $input.all().filter(item => { - **Type**: HTTP Request - **Method**: POST - **URL**: Discord 웹훅 URL +- **Send Body**: ON - **Body Content Type**: JSON -- **Body**: +- **Specify Body**: Using JSON +- **Body (Expression 모드)**: ```json { "embeds": [{ diff --git a/docs/n8n-setup.md b/docs/n8n-setup.md index 1f46b1b..45f0598 100644 --- a/docs/n8n-setup.md +++ b/docs/n8n-setup.md @@ -50,8 +50,10 @@ Schedule Trigger (매 정시) | Type | HTTP Request | | Method | GET | | URL | `https://www.googleapis.com/youtube/v3/playlistItems` | +| Send Query Parameters | ON | +| Specify Query Parameters | Using Individual Fields | -**Query Parameters:** +**Query Parameters (Add Parameter로 추가):** | 파라미터 | 값 | |---|---| @@ -105,6 +107,7 @@ Schedule Trigger (매 정시) |---|---| | Type | Code | | Language | JavaScript | +| Mode | Run Once for All Items | 최근 1시간 이내 발행된 영상만 필터링합니다: @@ -137,8 +140,9 @@ return $input.all().filter(item => { | Type | HTTP Request | | Method | POST | | URL | `https://<서버주소>/api/news/summarize` | -| Body Content Type | JSON | | Send Body | ON | +| Body Content Type | JSON | +| Specify Body | Using JSON | **Body (Expression 모드):** @@ -165,15 +169,17 @@ return $input.all().filter(item => { | 설정 항목 | 값 | |---|---| | Type | Switch | -| Field | `{{ $json.status }}` | +| Mode | Rules | +| Data Type | String | +| Value | `{{ $json.status }}` | **Rules:** -| Rule | Value | Output | -|---|---|---| -| Rule 1 | `ok` | → Discord 요약 전송 | -| Rule 2 | `skipped` | → No Operation (무시) | -| Rule 3 | `error` | → Discord 에러 알림 | +| Rule | Operation | Value | Output | +|---|---|---|---| +| Rule 1 | Equal | `ok` | → Discord 요약 전송 | +| Rule 2 | Equal | `skipped` | → No Operation (무시) | +| Rule 3 | Equal | `error` | → Discord 에러 알림 | ### 8. Discord 요약 전송 (status=ok) @@ -182,9 +188,11 @@ return $input.all().filter(item => { | Type | HTTP Request | | Method | POST | | URL | Discord 웹훅 URL | +| Send Body | ON | | Body Content Type | JSON | +| Specify Body | Using JSON | -**Body:** +**Body (Expression 모드):** ```json { @@ -210,9 +218,11 @@ return $input.all().filter(item => { | Type | HTTP Request | | Method | POST | | URL | Discord 웹훅 URL | +| Send Body | ON | | Body Content Type | JSON | +| Specify Body | Using JSON | -**Body:** +**Body (Expression 모드):** ```json {