{
  "meta": {
    "templateCredsSetupCompleted": true
  },
  "nodes": [
    {
      "id": "7d76b3b0-a139-4817-aa9b-b0eddfeec2a9",
      "name": "Every Weekday at 4 PM JST",
      "type": "n8n-nodes-base.scheduleTrigger",
      "position": [
        80,
        -112
      ],
      "parameters": {
        "rule": {
          "interval": [
            {
              "field": "cronExpression",
              "expression": "0 0 0 * * 1-5"
            }
          ]
        }
      },
      "typeVersion": 1
    },
    {
      "id": "449ae1fd-bf18-4d7f-9dd9-4be744652aa7",
      "name": "Get Nikkei 225 Data",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        288,
        -112
      ],
      "parameters": {
        "url": "https://8080-id15jiyrj1k5dcuz7d9nz-3e90844d.manus-asia.computer/nikkei",
        "options": {}
      },
      "typeVersion": 3
    },
    {
      "id": "efb7f181-0873-4865-a49c-37126be8de32",
      "name": "Format Message",
      "type": "n8n-nodes-base.set",
      "position": [
        544,
        -112
      ],
      "parameters": {
        "options": {}
      },
      "typeVersion": 3
    },
    {
      "id": "38771d3a-f6b4-4298-95bd-18e4f4aaef42",
      "name": "Prepare LINE API Payload",
      "type": "n8n-nodes-base.code",
      "position": [
        752,
        -112
      ],
      "parameters": {
        "jsCode": "// \u9001\u4fe1\u5148\u306eLINE\u30e6\u30fc\u30b6\u30fcID\u30ea\u30b9\u30c8\nconst userIds = [\n  \"U1734402c36e0ccc28ca2f40fa752e923\",\n];\n\n// \u524d\u306e\u30ce\u30fc\u30c9\u304b\u3089\u65e5\u7d4c\u5e73\u5747\u30c7\u30fc\u30bf\u3092\u53d6\u5f97\nconst data = $input.first().json;\n\n// \u30e1\u30c3\u30bb\u30fc\u30b8\u3092\u4f5c\u6210\nconst message = `\ud83d\udcca \u672c\u65e5\u306e\u65e5\u7d4c\u5e73\u5747\u682a\u4fa1 (${data.date})\n\n\u7d42\u5024: ${data.close}\u5186\n\u524d\u65e5\u6bd4: ${data.change}\u5186 (${data.change_pct})`;\n\n// LINE Messaging API\u306e\u30da\u30a4\u30ed\u30fc\u30c9\u3092\u4f5c\u6210\nconst payload = {\n  to: userIds,\n  messages: [\n    {\n      type: \"text\",\n      text: message\n    }\n  ]\n};\n\nreturn [{ json: payload }];\n"
      },
      "typeVersion": 2
    },
    {
      "id": "de9e09e8-fa41-437c-a0cb-f9c367cd2d11",
      "name": "Send to LINE via HTTP",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        944,
        -112
      ],
      "parameters": {
        "url": "https://api.line.me/v2/bot/message/multicast",
        "method": "POST",
        "options": {
          "response": {
            "response": {
              "responseFormat": "json"
            }
          }
        },
        "jsonBody": "={{ $json }}",
        "sendBody": true,
        "jsonHeaders": "{\n  \"Authorization\": \"Bearer YOUR_TOKEN_HERE\",\n  \"Content-Type\": \"application/json\"\n}",
        "sendHeaders": true,
        "specifyBody": "json",
        "specifyHeaders": "json"
      },
      "typeVersion": 4.2
    },
    {
      "id": "124a4e98-6b26-4f19-a852-c644093719a9",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -352,
        -336
      ],
      "parameters": {
        "width": 304,
        "height": 528,
        "content": "This workflow automatically fetches the Nikkei 225 closing price every weekday and sends a formatted message to a list of users on LINE.\n\n### How it works\n1.  **Trigger:** Runs every weekday at 4 PM JST (market close).\n2.  **Get Data:** Fetches the latest Nikkei 225 data from an API.\n3.  **Format & Send:** A Code node formats the data and sends it to a list of LINE users.\n\n### Setup steps\n1.  **Add Credentials:** In the \"Send to LINE...\" node (Section 2), add your LINE API Token to the 'Authorization' header.\n2.  **Add User IDs:** In the \"Prepare LINE...\" node (Section 2), edit the 'userIds' array.\n3.  **Update API URL:** In the \"Get Nikkei 225 Data\" node (Section 1), replace the temporary URL with your own."
      },
      "typeVersion": 1
    },
    {
      "id": "3881f2f1-8b99-43f1-8377-e207351d209f",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        16,
        -304
      ],
      "parameters": {
        "color": 7,
        "width": 432,
        "height": 400,
        "content": "## 1. Get Daily Stock Data\nThis section runs on a schedule and fetches the latest stock data from an API."
      },
      "typeVersion": 1
    },
    {
      "id": "3e9c866a-e1a2-4026-868e-5fc0b7ce01e5",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        464,
        -304
      ],
      "parameters": {
        "color": 7,
        "width": 768,
        "height": 400,
        "content": "## 2. Format & Send to LINE\nThis section formats the data into a message and sends it via the LINE Messaging API."
      },
      "typeVersion": 1
    },
    {
      "id": "5ecd1d08-a18d-4611-8df6-d1825066668d",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        480,
        -208
      ],
      "parameters": {
        "color": 3,
        "width": 208,
        "height": 272,
        "content": "Note: This node is unused and can be deleted. All formatting is done in the \"Code\" node."
      },
      "typeVersion": 1
    }
  ],
  "connections": {
    "Format Message": {
      "main": [
        [
          {
            "node": "Prepare LINE API Payload",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get Nikkei 225 Data": {
      "main": [
        [
          {
            "node": "Format Message",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Prepare LINE API Payload": {
      "main": [
        [
          {
            "node": "Send to LINE via HTTP",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Every Weekday at 4 PM JST": {
      "main": [
        [
          {
            "node": "Get Nikkei 225 Data",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}