Docs: n8n Discord 노드 템플릿을 실제 사용 중인 코드로 복원
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
16
CLAUDE.md
16
CLAUDE.md
@@ -184,21 +184,25 @@ return $input.all().filter(item => {
|
|||||||
- **Specify Body**: Using JSON
|
- **Specify Body**: Using JSON
|
||||||
- **Body**: Expression 모드 (`=` 클릭)로 전환 후 아래 입력:
|
- **Body**: Expression 모드 (`=` 클릭)로 전환 후 아래 입력:
|
||||||
|
|
||||||
> **주의**: `"Using JSON"` 모드에서 `{{ $json.summary }}` 같은 문자열 치환을 쓰면 요약 텍스트의 줄바꿈(`\n`)·따옴표(`"`) 때문에 JSON이 깨진다. 반드시 `JSON.stringify()`로 전체 객체를 직렬화해야 한다.
|
|
||||||
|
|
||||||
```javascript
|
```javascript
|
||||||
{{ JSON.stringify({
|
={{ JSON.stringify({
|
||||||
embeds: [{
|
embeds: [{
|
||||||
title: "📰 [" + $json.channel_name + "] " + $json.title,
|
title: "📰 [" + $json.channel_name + "] " + $json.title,
|
||||||
url: $json.video_url,
|
url: $json.video_url,
|
||||||
description: $json.summary,
|
description: "### 💡 " + $json.oneliner,
|
||||||
color: 2829105,
|
color: 2829105,
|
||||||
|
fields: [
|
||||||
|
{ name: "📋 주요 내용", value: $json.main_points, inline: false },
|
||||||
|
{ name: "🎯 결론 / 시사점", value: $json.conclusion, inline: false },
|
||||||
|
{ name: "🔗 원본 영상", value: $json.video_url, inline: false }
|
||||||
|
],
|
||||||
thumbnail: {
|
thumbnail: {
|
||||||
url: "https://img.youtube.com/vi/" + $json.video_url.split("v=")[1] + "/hqdefault.jpg"
|
url: "https://img.youtube.com/vi/" + $json.video_url.split("v=")[1] + "/hqdefault.jpg"
|
||||||
},
|
},
|
||||||
footer: {
|
footer: {
|
||||||
text: "YouTube 뉴스 요약 봇 • " + $json.channel_name
|
text: "YouTube 뉴스 요약 봇 • " + $json.channel_name
|
||||||
}
|
},
|
||||||
|
timestamp: new Date().toISOString()
|
||||||
}]
|
}]
|
||||||
}) }}
|
}) }}
|
||||||
```
|
```
|
||||||
@@ -213,7 +217,7 @@ return $input.all().filter(item => {
|
|||||||
- **Body**: Expression 모드 (`=` 클릭)로 전환 후 아래 입력:
|
- **Body**: Expression 모드 (`=` 클릭)로 전환 후 아래 입력:
|
||||||
|
|
||||||
```javascript
|
```javascript
|
||||||
{{ JSON.stringify({
|
={{ JSON.stringify({
|
||||||
embeds: [{
|
embeds: [{
|
||||||
title: "❌ [" + $json.channel_name + "] 뉴스 요약 실패",
|
title: "❌ [" + $json.channel_name + "] 뉴스 요약 실패",
|
||||||
color: 15548997,
|
color: 15548997,
|
||||||
|
|||||||
Reference in New Issue
Block a user