diff --git a/CLAUDE.md b/CLAUDE.md index a478481..d0fca5e 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -184,21 +184,25 @@ return $input.all().filter(item => { - **Specify Body**: Using JSON - **Body**: Expression 모드 (`=` 클릭)로 전환 후 아래 입력: -> **주의**: `"Using JSON"` 모드에서 `{{ $json.summary }}` 같은 문자열 치환을 쓰면 요약 텍스트의 줄바꿈(`\n`)·따옴표(`"`) 때문에 JSON이 깨진다. 반드시 `JSON.stringify()`로 전체 객체를 직렬화해야 한다. - ```javascript -{{ JSON.stringify({ +={{ JSON.stringify({ embeds: [{ title: "📰 [" + $json.channel_name + "] " + $json.title, url: $json.video_url, - description: $json.summary, + description: "### 💡 " + $json.oneliner, color: 2829105, + fields: [ + { name: "📋 주요 내용", value: $json.main_points, inline: false }, + { name: "🎯 결론 / 시사점", value: $json.conclusion, inline: false }, + { name: "🔗 원본 영상", value: $json.video_url, inline: false } + ], thumbnail: { url: "https://img.youtube.com/vi/" + $json.video_url.split("v=")[1] + "/hqdefault.jpg" }, footer: { text: "YouTube 뉴스 요약 봇 • " + $json.channel_name - } + }, + timestamp: new Date().toISOString() }] }) }} ``` @@ -213,7 +217,7 @@ return $input.all().filter(item => { - **Body**: Expression 모드 (`=` 클릭)로 전환 후 아래 입력: ```javascript -{{ JSON.stringify({ +={{ JSON.stringify({ embeds: [{ title: "❌ [" + $json.channel_name + "] 뉴스 요약 실패", color: 15548997,