{
  "name": "Daily crypto report",
  "nodes": [
    {
      "parameters": {
        "rule": {
          "interval": [
            {
              "triggerAtHour": 8,
              "triggerAtMinute": 40
            }
          ]
        }
      },
      "type": "n8n-nodes-base.scheduleTrigger",
      "typeVersion": 1.2,
      "position": [
        -288,
        288
      ],
      "name": "Schedule Trigger"
    },
    {
      "parameters": {
        "url": "https://www.coindesk.com/arc/outboundfeeds/rss/",
        "options": {}
      },
      "type": "n8n-nodes-base.rssFeedRead",
      "typeVersion": 1.2,
      "position": [
        0,
        304
      ],
      "name": "RSS Read"
    },
    {
      "parameters": {
        "url": "https://www.newsbtc.com/feed/",
        "options": {}
      },
      "type": "n8n-nodes-base.rssFeedRead",
      "typeVersion": 1.2,
      "position": [
        0,
        144
      ],
      "name": "RSS Read1"
    },
    {
      "parameters": {
        "url": "https://api.alternative.me/fng/",
        "options": {}
      },
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.3,
      "position": [
        0,
        464
      ],
      "name": "HTTP Request"
    },
    {
      "parameters": {
        "url": "https://www.blocktempo.com/feed/",
        "options": {}
      },
      "type": "n8n-nodes-base.rssFeedRead",
      "typeVersion": 1.2,
      "position": [
        0,
        -16
      ],
      "name": "RSS Read2"
    },
    {
      "parameters": {
        "url": "https://api.coingecko.com/api/v3/simple/price?ids=bitcoin,ethereum&vs_currencies=usd&include_24hr_change=true",
        "options": {}
      },
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.3,
      "position": [
        0,
        624
      ],
      "name": "HTTP Request1"
    },
    {
      "parameters": {
        "jsCode": "return items.slice(0, 30);"
      },
      "type": "n8n-nodes-base.code",
      "typeVersion": 2,
      "position": [
        624,
        128
      ],
      "name": "Code in JavaScript"
    },
    {
      "parameters": {
        "assignments": {
          "assignments": [
            {
              "name": "title",
              "value": "={{ $json.title }}",
              "type": "string"
            },
            {
              "name": "DATA",
              "value": "={{ $json.link }}",
              "type": "string"
            }
          ]
        },
        "options": {}
      },
      "type": "n8n-nodes-base.set",
      "typeVersion": 3.4,
      "position": [
        800,
        128
      ],
      "name": "Edit Fields"
    },
    {
      "parameters": {
        "assignments": {
          "assignments": [
            {
              "name": "crypto_massage",
              "value": "={{ $json.title }}\n{{ $json.DATA }}",
              "type": "string"
            }
          ]
        },
        "options": {}
      },
      "type": "n8n-nodes-base.set",
      "typeVersion": 3.4,
      "position": [
        1008,
        128
      ],
      "name": "Edit Fields1"
    },
    {
      "parameters": {
        "fieldsToAggregate": {
          "fieldToAggregate": [
            {
              "fieldToAggregate": "crypto_massage"
            },
            {
              "fieldToAggregate": "btc&eth"
            },
            {
              "fieldToAggregate": "Fear and Greed Index"
            }
          ]
        },
        "options": {}
      },
      "type": "n8n-nodes-base.aggregate",
      "typeVersion": 1,
      "position": [
        816,
        384
      ],
      "name": "Aggregate",
      "executeOnce": false
    },
    {
      "parameters": {
        "assignments": {
          "assignments": [
            {
              "name": "btc&eth",
              "value": "=\n{{ $json.bitcoin.usd }}({{ $json.bitcoin.usd_24h_change }})\n{{ $json.ethereum.usd }}({{ $json.ethereum.usd_24h_change }})",
              "type": "string"
            }
          ]
        },
        "options": {}
      },
      "type": "n8n-nodes-base.set",
      "typeVersion": 3.4,
      "position": [
        224,
        464
      ],
      "name": "Edit Fields2"
    },
    {
      "parameters": {
        "assignments": {
          "assignments": [
            {
              "name": "Fear and Greed Index",
              "value": "={{ $json.data[0].value }}({{ $json.data[0].value_classification }})",
              "type": "string"
            }
          ]
        },
        "options": {}
      },
      "type": "n8n-nodes-base.set",
      "typeVersion": 3.4,
      "position": [
        224,
        624
      ],
      "name": "Edit Fields3"
    },
    {
      "parameters": {
        "numberInputs": 3
      },
      "type": "n8n-nodes-base.merge",
      "typeVersion": 3.2,
      "position": [
        560,
        368
      ],
      "name": "Merge"
    },
    {
      "parameters": {
        "text": "={{ $json.output[0].content[0].text }}",
        "additionalFields": {
          "appendAttribution": false
        }
      },
      "type": "n8n-nodes-base.telegram",
      "typeVersion": 1.2,
      "position": [
        1008,
        624
      ],
      "name": "Send a text message"
    },
    {
      "parameters": {
        "numberInputs": 3
      },
      "type": "n8n-nodes-base.merge",
      "typeVersion": 3.2,
      "position": [
        272,
        112
      ],
      "name": "Merge1"
    },
    {
      "parameters": {
        "modelId": {
          "__rl": true,
          "value": "gpt-4o-mini",
          "mode": "list",
          "cachedResultName": "GPT-4O-MINI"
        },
        "responses": {
          "values": [
            {
              "content": "=你是一位專業的加密貨幣市場分析師。請根據以下提供的資料，撰寫一份每日加密市場摘要報告，內容請包含：\n\n1️⃣【新聞摘要】\n請閱讀以下新聞內容：\n{{ $json.crypto_massage }}\n- 時間:{{ $now.setZone('Asia/Taipei').toFormat('yyyy-MM-dd') }}\n- 用簡潔語氣整理出重點，聚焦在加密市場、技術進展、監管與宏觀經濟及技術分析等面向。\n- 若有重複主題（例如ETH更新、宏觀消息），請統整成一段。\n- 全文控制在400–600字左右，使用繁體中文。\n- 把新聞摘要分段，方便閱讀\n- 不要加入任何引用編號或標註（例如 [1]、[2]、[3] 之類）。\n- 使用 emoji（例如 💼📈💵）強調段落重點\n\n2️⃣【市場價格】\n請列出 BTC 與 ETH 的最新價格與(近24小時漲跌幅)：\n- BTC&ETH: {{ $json['btc&eth'][0] }}\n\n\n3️⃣【市場情緒】\nF&G{{ $json[\"Fear and Greed Index\"][0] }}\n對於市場只需說目前的數字(0~100)與(extreme fear、fear、netural、greed、extreme greed)在哪個位置\n\n4️⃣【參考連結】\n最後請從新聞中選出 3–4 個代表性的新聞連結，條列於文末，格式如下：\n- [新聞標題](新聞連結)\n- 請不要有##等等的符號\n輸出格式範例：\n📅 **{{ $now.setZone('Asia/Taipei').toFormat('yyyy-MM-dd') }}加密市場摘要**\n...\n\n💬 **今日焦點**\n...\n\n💰 **價格概況**\nBTC: ...\nETH: ...\n\n📈 **市場情緒**\n...\n\n🔗 **延伸閱讀**\n- [xxx](url)\n- [xxx](url)"
            }
          ]
        },
        "builtInTools": {},
        "options": {}
      },
      "type": "@n8n/n8n-nodes-langchain.openAi",
      "typeVersion": 2.1,
      "position": [
        656,
        624
      ],
      "name": "Message a model"
    },
    {
      "parameters": {
        "rules": {
          "values": [
            {
              "conditions": {
                "options": {
                  "caseSensitive": true,
                  "leftValue": "",
                  "typeValidation": "strict",
                  "version": 3
                },
                "conditions": [
                  {
                    "leftValue": "={{ new Date($json.pubDate).getTime() }}",
                    "rightValue": "={{ Date.now() - 24 * 60 * 60 * 1000 }}",
                    "operator": {
                      "type": "number",
                      "operation": "gt"
                    }
                  }
                ],
                "combinator": "and"
              }
            }
          ]
        },
        "options": {}
      },
      "type": "n8n-nodes-base.switch",
      "typeVersion": 3.4,
      "position": [
        432,
        128
      ],
      "name": "Switch"
    },
    {
      "parameters": {
        "content": "##  by Level UP升級志\n\n我是 Level UP的 Yuzen\n有 n8n 問題可以一起討論><\n\n- [我們的官網](https://levelupdiary.com/)\n- [n8n 模板分享網站](https://n8n.template.levelupdiary.com/)\n\n### 社群social media:\n[Threads](https://www.threads.com/@levelup.daily_lab)\n[Instagram](https://www.instagram.com/levelup.daily_lab/)\n![](https://pub-dfed2b7a97c243fbabeaf6f058d4adb3.r2.dev/logo%20(1).png)",
        "height": 420,
        "width": 360,
        "color": 7
      },
      "type": "n8n-nodes-base.stickyNote",
      "typeVersion": 1,
      "position": [
        -688,
        368
      ],
      "name": "Sticky Note4"
    }
  ],
  "pinData": {},
  "connections": {
    "Schedule Trigger": {
      "main": [
        [
          {
            "node": "RSS Read",
            "type": "main",
            "index": 0
          },
          {
            "node": "RSS Read1",
            "type": "main",
            "index": 0
          },
          {
            "node": "HTTP Request",
            "type": "main",
            "index": 0
          },
          {
            "node": "RSS Read2",
            "type": "main",
            "index": 0
          },
          {
            "node": "HTTP Request1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "RSS Read": {
      "main": [
        [
          {
            "node": "Merge1",
            "type": "main",
            "index": 2
          }
        ]
      ]
    },
    "Code in JavaScript": {
      "main": [
        [
          {
            "node": "Edit Fields",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "RSS Read2": {
      "main": [
        [
          {
            "node": "Merge1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "RSS Read1": {
      "main": [
        [
          {
            "node": "Merge1",
            "type": "main",
            "index": 1
          }
        ]
      ]
    },
    "Edit Fields": {
      "main": [
        [
          {
            "node": "Edit Fields1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Edit Fields1": {
      "main": [
        [
          {
            "node": "Merge",
            "type": "main",
            "index": 2
          }
        ]
      ]
    },
    "HTTP Request": {
      "main": [
        [
          {
            "node": "Edit Fields3",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "HTTP Request1": {
      "main": [
        [
          {
            "node": "Edit Fields2",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Edit Fields2": {
      "main": [
        [
          {
            "node": "Merge",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Edit Fields3": {
      "main": [
        [
          {
            "node": "Merge",
            "type": "main",
            "index": 1
          }
        ]
      ]
    },
    "Merge": {
      "main": [
        [
          {
            "node": "Aggregate",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Aggregate": {
      "main": [
        [
          {
            "node": "Message a model",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Merge1": {
      "main": [
        [
          {
            "node": "Switch",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Message a model": {
      "main": [
        [
          {
            "node": "Send a text message",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Switch": {
      "main": [
        [
          {
            "node": "Code in JavaScript",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  },
  "active": true,
  "settings": {
    "executionOrder": "v1"
  },
  "tags": []
}
