Send Taiwan stock pre-market briefings using TWSE, CNYES, OpenAI and Telegram

ad2d945a-eb75-4004-b3da-11ead37710f6

Latency
6933ms
Cost
$0.0012
Tokens
478
Status
success
gemini-3-flash-preview

Workflow Graph

Trace

[
  {
    "data": {
      "nodeType": "trigger"
    },
    "event": "node_start",
    "nodeId": "schedule-trigger",
    "timestamp": 1783445893676
  },
  {
    "data": {
      "kind": "n8n-nodes-base.scheduleTrigger"
    },
    "event": "seeded",
    "nodeId": "trigger",
    "timestamp": 1783445893676
  },
  {
    "data": {
      "status": "ok",
      "nodeType": "trigger"
    },
    "event": "node_end",
    "nodeId": "schedule-trigger",
    "timestamp": 1783445893676
  },
  {
    "data": {
      "nodeType": "set"
    },
    "event": "node_start",
    "nodeId": "config-node",
    "timestamp": 1783445893677
  },
  {
    "data": {
      "inputKeys": [
        "tradingDate",
        "trading_date_fmt",
        "date",
        "weekday",
        "prompt_style",
        "watchlist",
        "top_n",
        "foreign_top_buy_text",
        "foreign_top_sell_text",
        "limit_up_count",
        "limit_up_text",
        "limit_down_count",
        "limit_down_text",
        "taiex_text",
        "news_text",
        "tradingDateFmt",
        "text",
        "telegramChatId"
      ],
      "mergeKeys": []
    },
    "event": "merged",
    "nodeId": "set",
    "timestamp": 1783445893677
  },
  {
    "data": {
      "status": "ok",
      "nodeType": "set"
    },
    "event": "node_end",
    "nodeId": "config-node",
    "timestamp": 1783445893677
  },
  {
    "data": {
      "nodeType": "code"
    },
    "event": "node_start",
    "nodeId": "calc-trading-date",
    "timestamp": 1783445893677
  },
  {
    "event": "execution error (simulated): $now is not defined",
    "nodeId": "code",
    "timestamp": 1783445893678
  },
  {
    "data": {
      "mode": "read",
      "status": "ok",
      "service": "code",
      "latencyMs": 0,
      "operation": "exec-failed",
      "simulated": true
    },
    "event": "integration_mocked",
    "nodeId": "integration",
    "timestamp": 1783445893678
  },
  {
    "data": {
      "status": "ok",
      "nodeType": "code"
    },
    "event": "node_end",
    "nodeId": "calc-trading-date",
    "timestamp": 1783445893678
  },
  {
    "data": {
      "nodeType": "http"
    },
    "event": "node_start",
    "nodeId": "twse-t86-fetch",
    "timestamp": 1783445893679
  },
  {
    "event": "fetching GET https://www.twse.com.tw/rwd/zh/fund/T86",
    "nodeId": "http",
    "timestamp": 1783445893679
  },
  {
    "data": {
      "url": "https://www.twse.com.tw/rwd/zh/fund/T86",
      "method": "GET"
    },
    "event": "http_fetch",
    "nodeId": "_context",
    "timestamp": 1783445893679
  },
  {
    "data": {
      "status": "ok",
      "nodeType": "http"
    },
    "event": "node_end",
    "nodeId": "twse-t86-fetch",
    "timestamp": 1783445894881
  },
  {
    "data": {
      "nodeType": "http"
    },
    "event": "node_start",
    "nodeId": "twse-mi-index-fetch",
    "timestamp": 1783445894883
  },
  {
    "event": "fetching GET https://www.twse.com.tw/rwd/zh/afterTrading/MI_INDEX",
    "nodeId": "http",
    "timestamp": 1783445894883
  },
  {
    "data": {
      "url": "https://www.twse.com.tw/rwd/zh/afterTrading/MI_INDEX",
      "method": "GET"
    },
    "event": "http_fetch",
    "nodeId": "_context",
    "timestamp": 1783445894883
  },
  {
    "data": {
      "status": "ok",
      "nodeType": "http"
    },
    "event": "node_end",
    "nodeId": "twse-mi-index-fetch",
    "timestamp": 1783445894963
  },
  {
    "data": {
      "nodeType": "http"
    },
    "event": "node_start",
    "nodeId": "cnyes-fetch",
    "timestamp": 1783445894965
  },
  {
    "event": "fetching GET https://api.cnyes.com/media/api/v1/newslist/category/headline",
    "nodeId": "http",
    "timestamp": 1783445894965
  },
  {
    "data": {
      "url": "https://api.cnyes.com/media/api/v1/newslist/category/headline",
      "method": "GET"
    },
    "event": "http_fetch",
    "nodeId": "_context",
    "timestamp": 1783445894965
  },
  {
    "data": {
      "status": "ok",
      "nodeType": "http"
    },
    "event": "node_end",
    "nodeId": "cnyes-fetch",
    "timestamp": 1783445895304
  },
  {
    "data": {
      "nodeType": "merge"
    },
    "event": "node_start",
    "nodeId": "merge-sources",
    "timestamp": 1783445895307
  },
  {
    "data": {
      "inputCount": 3
    },
    "event": "merged 3 inputs",
    "nodeId": "merge",
    "timestamp": 1783445895307
  },
  {
    "data": {
      "status": "ok",
      "nodeType": "merge"
    },
    "event": "node_end",
    "nodeId": "merge-sources",
    "timestamp": 1783445895307
  },
  {
    "data": {
      "nodeType": "code"
    },
    "event": "node_start",
    "nodeId": "format-data",
    "timestamp": 1783445895307
  },
  {
    "event": "execution error (simulated): $now is not defined",
    "nodeId": "code",
    "timestamp": 1783445895308
  },
  {
    "data": {
      "mode": "read",
      "status": "ok",
      "service": "code",
      "latencyMs": 0,
      "operation": "exec-failed",
      "simulated": true
    },
    "event": "integration_mocked",
    "nodeId": "integration",
    "timestamp": 1783445895308
  },
  {
    "data": {
      "status": "ok",
      "nodeType": "code"
    },
    "event": "node_end",
    "nodeId": "format-data",
    "timestamp": 1783445895309
  },
  {
    "data": {
      "nodeType": "llm"
    },
    "event": "node_start",
    "nodeId": "openai-summarize",
    "timestamp": 1783445895310
  },
  {
    "data": {
      "messages": 1,
      "maxTokens": 1500
    },
    "event": "calling openai/gpt-4o-mini",
    "nodeId": "llm",
    "timestamp": 1783445895310
  },
  {
    "data": {
      "model": "gpt-4o-mini",
      "provider": "openai"
    },
    "event": "llm_call",
    "nodeId": "_context",
    "timestamp": 1783445895310
  },
  {
    "data": {
      "model": "gemini-3-flash-preview",
      "costUsd": 0.0011928,
      "provider": "openai",
      "latencyMs": 4794,
      "promptTokens": 1,
      "completionTokens": 477
    },
    "event": "llm_result",
    "nodeId": "_context",
    "timestamp": 1783445900105
  },
  {
    "data": {
      "status": "ok",
      "nodeType": "llm"
    },
    "event": "node_end",
    "nodeId": "openai-summarize",
    "timestamp": 1783445900105
  },
  {
    "data": {
      "nodeType": "code"
    },
    "event": "node_start",
    "nodeId": "compose-message",
    "timestamp": 1783445900105
  },
  {
    "event": "execution error (simulated): $now is not defined",
    "nodeId": "code",
    "timestamp": 1783445900107
  },
  {
    "data": {
      "mode": "read",
      "status": "ok",
      "service": "code",
      "latencyMs": 0,
      "operation": "exec-failed",
      "simulated": true
    },
    "event": "integration_mocked",
    "nodeId": "integration",
    "timestamp": 1783445900107
  },
  {
    "data": {
      "status": "ok",
      "nodeType": "code"
    },
    "event": "node_end",
    "nodeId": "compose-message",
    "timestamp": 1783445900107
  },
  {
    "data": {
      "nodeType": "integration"
    },
    "event": "node_start",
    "nodeId": "telegram-send",
    "timestamp": 1783445900108
  },
  {
    "data": {
      "mode": "write",
      "status": "ok",
      "service": "telegram",
      "safeMode": true,
      "latencyMs": 500,
      "operation": "sendMessage",
      "simulated": true
    },
    "event": "integration_mocked",
    "nodeId": "integration",
    "timestamp": 1783445900609
  },
  {
    "data": {
      "status": "ok",
      "nodeType": "integration"
    },
    "event": "node_end",
    "nodeId": "telegram-send",
    "timestamp": 1783445900609
  }
]