{
"nodes" :[
{
"parameters" : {},
"type" : "n8n-nodes-base.manualTrigger" ,
"typeVersion" : 1 ,
"position" :[ 160 , 460 ],
"id" : "manual-trigger" ,
"name" : "Manual Trigger"
},
{
"parameters" : {
"jsCode" : "return[ \n { json: { title: \" 국내 AI 스타트업 투자 유치 \" , link: \" url1 \" } }, \n { json: { title: \" 한국형 LLM 모델 성능 평가 발표 \" , link: \" url2 \" } } \n ];"
},
"type" : "n8n-nodes-base.code" ,
"typeVersion" : 2 ,
"position" :[ 450 , 280 ],
"id" : "mock-korea" ,
"name" : "국내 기사 예시 데이터"
},
{
"parameters" : {
"jsCode" : "const rawData =[ \n { title: \" OpenAI 새로운 모델 발표 \" , link: \" url3 \" , contentSnippet: \" 새로운 추론 모델이 공개되었습니다 \" }, \n { title: \" EU 인공지능 법안 발효 \" , link: \" url4 \" , contentSnippet: \" 유럽의 AI 규제가 본격적으로 시작됩니다 \" }, \n { title: \" 자율주행 기술의 한계 \" , link: \" url5 \" , contentSnippet: \" 센서 오작동으로 인한 사고가 발생했습니다 \" } \n ]; \n let globalData = \" [글로벌 AI 기사 목록] \\ n \" ; \n rawData.forEach((a, i) => { \n globalData += `${i}. ${a.title} (${a.link}) \\ n 요약: ${a.contentSnippet} \\ n \\ n`; \n }); \n return { json: { globalData: globalData, rawData: rawData } };"
},
"type" : "n8n-nodes-base.code" ,
"typeVersion" : 2 ,
"position" :[ 450 , 600 ],
"id" : "mock-global" ,
"name" : "해외 기사 예시 데이터"
},
{
"parameters" : {
"jsCode" : "const allItems = $input.all().map(item => item.json); \n let titleList = \"\" ; \n allItems.forEach((article) => { \n titleList += `- ${article.title || \" 제목 없음 \" } \\ n`; \n }); \n return { json: { koreanTitles: titleList } };"
},
"type" : "n8n-nodes-base.code" ,
"typeVersion" : 2 ,
"position" : [ 850 , 280 ],
"id" : "code-korea-extract" ,
"name" : "한국 기사 제목 추출"
},
{
"parameters" : {
"promptType" : "define" ,
"text" : "=당신은 글로벌 뉴스 편집장입니다. 아래 기사 제목과 요약을 읽고 파급력이 큰 기사 딱 2개를 고르세요 \n [조건] \n 반드시 기사 앞에 붙은 '인덱스 번호'만 골라서 JSON 배열 형태로 출력하세요 \n [출력 예시] \n [0, 1] \n [후보 목록] \n {{ $json.globalData }}"
},
"type" : "@n8n/n8n-nodes-langchain.agent" ,
"typeVersion" : 3.1 ,
"position" :[ 850 , 600 ],
"id" : "agent-selector" ,
"name" : "요약 기사 선별(2개)"
},
{
"parameters" : {
"jsCode" : "const text = $input.first().json.output || \"\" ; \n const rawData = $('해외 기사 예시 데이터').first().json.rawData; \n let indexes =[0, 1]; \n try { \n const match = text.match(/ \\ [ \\ s* \\ d+ \\ s*, \\ s* \\ d+ \\ s* \\ ]/); \n if (match) indexes = JSON.parse(match[0]).slice(0, 2); \n } catch(e) {} \n let selectedGlobal = \" [핵심 기사 2개] \\ n \\ n \" ; \n indexes.forEach((idx) => { \n const article = rawData[idx]; \n if(article) selectedGlobal += `제목: ${article.title} \\ n링크: ${article.link} \\ n내용: ${article.contentSnippet} \\ n \\ n`; \n }); \n return { json: { selectedGlobal } };"
},
"type" : "n8n-nodes-base.code" ,
"typeVersion" : 2 ,
"position" :[ 1200 , 600 ],
"id" : "code-matcher" ,
"name" : "선택된 2개 매칭"
},
{
"parameters" : {
"mode" : "combine" ,
"combineBy" : "combineByPosition"
},
"type" : "n8n-nodes-base.merge" ,
"typeVersion" : 3.2 ,
"position" : [ 1400 , 400 ],
"id" : "merge-final" ,
"name" : "데이터 하나로 결합"
},
{
"parameters" : {
"promptType" : "define" ,
"text" : "=너는 최신 AI 기술 전문 뉴스 브리핑 봇이야 \n 제공된 한국 기사 제목과 핵심 기사 2개를 바탕으로 통합 브리핑을 작성해 \n\n [한국 기사 제목] \n {{ $json.koreanTitles }} \n\n [핵심 기사 2개] \n {{ $json.selectedGlobal }}"
},
"type" : "@n8n/n8n-nodes-langchain.agent" ,
"typeVersion" : 3.1 ,
"position" :[ 1600 , 400 ],
"id" : "agent-main" ,
"name" : "news_bot"
},
{
"parameters" : {
"mode" : "retrieve-as-tool" ,
"toolDescription" : "AI 규제, EU 인공지능법, 저작권, 기술 윤리 등에 대한 전문 지식이 필요할 때 이 도구를 검색하세요" ,
"pineconeIndex" : { "value" : "ai-trend-guide" }
},
"type" : "@n8n/n8n-nodes-langchain.vectorStorePinecone" ,
"typeVersion" : 1.3 ,
"position" :[ 1750 , 600 ],
"id" : "tool-rag" ,
"name" : "ai_expert_guide"
},
{
"parameters" : {
"modelName" : "models/gemini-2.5-flash-lite"
},
"type" : "@n8n/n8n-nodes-langchain.lmChatGoogleGemini" ,
"typeVersion" : 1 ,
"position" :[ 850 , 800 ],
"id" : "llm-gemini-1" ,
"name" : "Gemini Model 1"
},
{
"parameters" : {
"modelName" : "models/gemini-2.5-flash-lite"
},
"type" : "@n8n/n8n-nodes-langchain.lmChatGoogleGemini" ,
"typeVersion" : 1 ,
"position" :[ 1550 , 600 ],
"id" : "llm-gemini-2" ,
"name" : "Gemini Model 2"
},
{
"parameters" : {
"modelName" : "models/gemini-embedding-001"
},
"type" : "@n8n/n8n-nodes-langchain.embeddingsGoogleGemini" ,
"typeVersion" : 1 ,
"position" :[ 1750 , 800 ],
"id" : "embedding-rag" ,
"name" : "Gemini Embedding"
}
],
"connections" : {
"Manual Trigger" : {
"main" :[[
{ "node" : "국내 기사 예시 데이터" , "type" : "main" , "index" : 0 },
{ "node" : "해외 기사 예시 데이터" , "type" : "main" , "index" : 0 }
]
]
},
"국내 기사 예시 데이터" : {
"main" : [[ { "node" : "한국 기사 제목 추출" , "type" : "main" , "index" : 0 } ] ]
},
"해외 기사 예시 데이터" : {
"main" : [[ { "node" : "요약 기사 선별(2개)" , "type" : "main" , "index" : 0 } ] ]
},
"한국 기사 제목 추출" : {
"main" : [[ { "node" : "데이터 하나로 결합" , "type" : "main" , "index" : 0 } ] ]
},
"요약 기사 선별(2개)" : {
"main" : [[ { "node" : "선택된 2개 매칭" , "type" : "main" , "index" : 0 } ] ]
},
"선택된 2개 매칭" : {
"main" : [[ { "node" : "데이터 하나로 결합" , "type" : "main" , "index" : 1 } ] ]
},
"데이터 하나로 결합" : {
"main" : [[ { "node" : "news_bot" , "type" : "main" , "index" : 0 } ] ]
},
"Gemini Model 1" : {
"ai_languageModel" : [[ { "node" : "요약 기사 선별(2개)" , "type" : "ai_languageModel" , "index" : 0 } ] ]
},
"Gemini Model 2" : {
"ai_languageModel" : [[ { "node" : "news_bot" , "type" : "ai_languageModel" , "index" : 0 } ] ]
},
"ai_expert_guide" : {
"ai_tool" : [[ { "node" : "news_bot" , "type" : "ai_tool" , "index" : 0 } ] ]
},
"Gemini Embedding" : {
"ai_embedding" : [[ { "node" : "ai_expert_guide" , "type" : "ai_embedding" , "index" : 0 } ] ]
}
}
}