Docs: n8n 노드 설정 상세화 — Mode, Send Body, Specify Body 등 누락 옵션 추가
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
27
CLAUDE.md
27
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": [{
|
||||
|
||||
@@ -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
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user