{
  "name": "[\uae08\uc735] \uae08\uc735 \ub274\uc2a4 AI \uc694\uc57d - \ud3c9\uc77c \uc544\uce68",
  "nodes": [
    {
      "parameters": {
        "rule": {
          "interval": [
            {
              "field": "cronExpression",
              "expression": "0 8 * * 1-5"
            }
          ]
        }
      },
      "id": "schedule-trigger-node",
      "name": "\ub9e4\uc77c \uc544\uce68 \ub274\uc2a4 \uc218\uc9d1",
      "type": "n8n-nodes-base.scheduleTrigger",
      "typeVersion": 1.2,
      "position": [
        250,
        300
      ]
    },
    {
      "parameters": {
        "method": "GET",
        "url": "https://openapi.naver.com/v1/search/news.json",
        "sendHeaders": true,
        "headerParameters": {
          "parameters": [
            {
              "name": "X-Naver-Client-Id",
              "value": "={{ $env.NAVER_CLIENT_ID }}"
            },
            {
              "name": "X-Naver-Client-Secret",
              "value": "={{ $env.NAVER_CLIENT_SECRET }}"
            }
          ]
        },
        "sendQuery": true,
        "queryParameters": {
          "parameters": [
            {
              "name": "query",
              "value": "\uae08\uc735 \uacbd\uc81c"
            },
            {
              "name": "display",
              "value": "10"
            },
            {
              "name": "sort",
              "value": "date"
            }
          ]
        },
        "options": {}
      },
      "id": "http-request-node",
      "name": "\ub124\uc774\ubc84 \ub274\uc2a4 \uac80\uc0c9",
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.2,
      "position": [
        450,
        300
      ]
    },
    {
      "parameters": {
        "jsCode": "// \ub124\uc774\ubc84 \ub274\uc2a4 \uac80\uc0c9 \uacb0\uacfc\uc5d0\uc11c \uc81c\ubaa9\uacfc \uc124\uba85 \ucd94\ucd9c\nconst response = $input.item.json;\nconst items = response.items || [];\n\nif (items.length === 0) {\n  return { json: { newsText: '\uc624\ub298 \uad00\ub828 \ub274\uc2a4\uac00 \uc5c6\uc2b5\ub2c8\ub2e4.', count: 0 } };\n}\n\n// HTML \ud0dc\uadf8 \uc81c\uac70 \ud568\uc218\nconst removeHtml = (str) => str.replace(/<[^>]*>/g, '').replace(/&quot;/g, '\"').replace(/&amp;/g, '&').replace(/&lt;/g, '<').replace(/&gt;/g, '>');\n\nconst newsList = items.map((item, idx) => {\n  const title = removeHtml(item.title);\n  const desc = removeHtml(item.description);\n  return `${idx + 1}. ${title}\\n   ${desc}\\n   \ub9c1\ud06c: ${item.link}`;\n});\n\nreturn {\n  json: {\n    newsText: newsList.join('\\n\\n'),\n    count: items.length\n  }\n};"
      },
      "id": "code-node",
      "name": "\ub274\uc2a4 \uc815\ub9ac",
      "type": "n8n-nodes-base.code",
      "typeVersion": 2,
      "position": [
        650,
        300
      ]
    },
    {
      "parameters": {
        "resource": "text",
        "operation": "message",
        "modelId": "gpt-4o-mini",
        "messages": {
          "values": [
            {
              "role": "system",
              "content": "\ub2f9\uc2e0\uc740 \uae08\uc735 \ub274\uc2a4 \uc804\ubb38 \uc694\uc57d \uc5d0\uc774\uc804\ud2b8\uc785\ub2c8\ub2e4. \ub2e4\uc74c \uae08\uc735/\uacbd\uc81c \ub274\uc2a4 \ubaa9\ub85d\uc744 \ubd84\uc11d\ud558\uace0, \uc624\ub298\uc758 \ud575\uc2ec \uae08\uc735 \ub3d9\ud5a5\uc744 3\uc904\ub85c \uc694\uc57d\ud558\uc138\uc694. \uac01 \uc904\uc740 \uad6c\uccb4\uc801\uc778 \uc218\uce58\ub098 \ud0a4\uc6cc\ub4dc\ub97c \ud3ec\ud568\ud574\uc57c \ud569\ub2c8\ub2e4. \ud55c\uad6d\uc5b4\ub85c \uc791\uc131\ud558\uc138\uc694."
            },
            {
              "role": "user",
              "content": "=\ub2e4\uc74c\uc740 \uc624\ub298\uc758 \uae08\uc735/\uacbd\uc81c \ub274\uc2a4\uc785\ub2c8\ub2e4:\n\n{{ $json.newsText }}"
            }
          ]
        },
        "options": {
          "temperature": 0.3
        }
      },
      "id": "openai-node",
      "name": "AI \uc694\uc57d",
      "type": "@n8n/n8n-nodes-langchain.openAi",
      "typeVersion": 1.3,
      "position": [
        850,
        300
      ],
      "credentials": {
        "openAiApi": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "authentication": "oAuth2",
        "select": "channel",
        "channelId": {
          "__rl": true,
          "value": "C12345NEWS",
          "mode": "id"
        },
        "text": "=:newspaper: *\uc624\ub298\uc758 \uae08\uc735 \ub274\uc2a4 \ube0c\ub9ac\ud551*\n\n{{ $json.message?.content || $json.text }}\n\n_{{ $('\ub274\uc2a4 \uc815\ub9ac').item.json.count }}\uac1c \ub274\uc2a4 \uae30\ubc18 AI \uc694\uc57d | {{ $now.toFormat('yyyy-MM-dd HH:mm') }}_",
        "otherOptions": {}
      },
      "id": "slack-node",
      "name": "\uc2ac\ub799 \ube0c\ub9ac\ud551",
      "type": "n8n-nodes-base.slack",
      "typeVersion": 2.2,
      "position": [
        1050,
        300
      ],
      "credentials": {
        "slackOAuth2Api": {
          "name": "<your credential>"
        }
      }
    }
  ],
  "connections": {
    "\ub9e4\uc77c \uc544\uce68 \ub274\uc2a4 \uc218\uc9d1": {
      "main": [
        [
          {
            "node": "\ub124\uc774\ubc84 \ub274\uc2a4 \uac80\uc0c9",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "\ub124\uc774\ubc84 \ub274\uc2a4 \uac80\uc0c9": {
      "main": [
        [
          {
            "node": "\ub274\uc2a4 \uc815\ub9ac",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "\ub274\uc2a4 \uc815\ub9ac": {
      "main": [
        [
          {
            "node": "AI \uc694\uc57d",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "AI \uc694\uc57d": {
      "main": [
        [
          {
            "node": "\uc2ac\ub799 \ube0c\ub9ac\ud551",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  },
  "settings": {
    "executionOrder": "v1",
    "saveManualExecutions": true,
    "callerPolicy": "workflowsFromSameOwner",
    "errorWorkflow": "",
    "timezone": "Asia/Seoul",
    "saveExecutionProgress": true,
    "saveDataErrorExecution": "all",
    "saveDataSuccessExecution": "all",
    "executionTimeout": 3600
  },
  "staticData": null,
  "tags": [
    {
      "createdAt": "2026-03-09T00:00:00.000Z",
      "updatedAt": "2026-03-09T00:00:00.000Z",
      "id": "finance",
      "name": "\uae08\uc735"
    },
    {
      "createdAt": "2026-03-09T00:00:00.000Z",
      "updatedAt": "2026-03-09T00:00:00.000Z",
      "id": "ai-automation",
      "name": "AI \uc790\ub3d9\ud654"
    }
  ],
  "triggerCount": 1,
  "updatedAt": "2026-03-09T00:00:00.000Z",
  "versionId": "1"
}