# (유즈케이스) 유튜브 RSS - 채널 알림 (⭐)

![Image](https://upload.cafenono.com/image/slashpageHome/20250422/094343_U5m8fq2gR515Dh9VOS?q=80&s=1280x180&t=outside&f=webp)

![Image](https://upload.cafenono.com/image/slashpageHome/20250422/094344_73B1x2jWbPFXTPbnUH?q=80&s=1280x180&t=outside&f=webp)

## 전제조건

- 없음.

## 시나리오

> 한줄 요약

이 워크플로우는 YouTube RSS 피드를 통해 새 영상 업로드를 감지하고, 이를 Discord Webhook으로 알림합니다.

---

## 1. 작동 방식

이 워크플로우는 YouTube 채널의 RSS 피드를 주기적으로 확인하여 새로운 영상이 업로드되면 Discord Webhook을 통해 알림을 전송합니다.

### 주요 단계:

1. YouTube 채널의 RSS 피드를 주기적으로 확인합니다.

2. 새로 업로드된 영상 정보를 Discord Webhook으로 알림 형태로 전송합니다.

---

## 2. 단계 설정

**예상 소요 시간**: 5–10분

1. Discord Webhook URL을 준비하고 n8n의 Discord 노드에 연결합니다.

2. YouTube 채널의 RSS 피드 URL을 확인하고 설정합니다.

---

## 3. 과정 상세 설명

### Step 1: RSS 피드 읽기 트리거

- **노드**: RSS Feed Read Trigger

    - **설정 방법**:

1. "RSS Feed Read Trigger" 노드를 추가합니다.

2. 다음과 같이 매개변수를 설정합니다:

- **Feed URL**: YouTube 채널의 RSS 피드 URL을 입력 (예: `https://www.youtube.com/feeds/videos.xml?channel_id=UCGU_CgteEqNSjiXcF0QfaKg`).

- **Poll Times**:

    - 모드를 "Every Minute"로 설정하여 매 분 RSS를 확인합니다.

    - **역할**: YouTube 채널의 새 업로드를 감지합니다.

    - 

![Image](https://upload.cafenono.com/image/slashpageHome/20250422/094344_oizI1BYISijQ26uLj6?q=80&s=1280x180&t=outside&f=webp)

### Step 2: Discord Webhook 알림 전송

- **노드**: Discord

    - **설정 방법**:

1. "Discord" 노드를 추가합니다.

2. 다음과 같이 매개변수를 설정합니다:

- **Authentication**: "Webhook"로 설정합니다.

- **Content**: 다음 텍스트를 입력하여 영상 정보를 Discord 메시지로 구성합니다:

```
={{ $json.pubDate.toDateTime().setZone('Asia/Seoul').format('yyyy-MM-dd T') }}
[{{ $json.title }}]({{ $json.link }})

```

    - `{{ $json.pubDate }}`: 영상 업로드 날짜를 한국 시간(Asia/Seoul)으로 변환하여 표시.

    - `{{ $json.title }}`: 영상 제목.

    - `{{ $json.link }}`: 영상 링크.

- **Credentials**: 준비한 Discord Webhook 자격 증명을 선택합니다.

    - **역할**: 새로운 영상 알림을 Discord 채널에 전송합니다.

![Image](https://upload.cafenono.com/image/slashpageHome/20250422/094345_qQC0Sb0p3Wg70YGyx1?q=80&s=1280x180&t=outside&f=webp)

---

## Channel ID 찾는법

- 채널에서 개발자도구(F12) > 소스 > channel_id로 검색을 하다보면 아래와 같은 구조의 HTML 요소를 찾을 수 있다.

    - `<link rel="alternate" type="application/rss+xml" title="RSS" href="``[https://www.youtube.com/feeds/videos.xml?channel_id=UCGU_CgteEqNSjiXcF0QfaKg](https://www.youtube.com/feeds/videos.xml?channel_id=UCGU_CgteEqNSjiXcF0QfaKg)``">` 

![Image](https://upload.cafenono.com/image/slashpageHome/20250422/094345_FnxjgU6leVR3Fe3K6Y?q=80&s=1280x180&t=outside&f=webp)

For the site tree, see the [root Markdown](https://slashpage.com/n8n-guide.md).
