8
n8n 中文网amn8n.com

使用 CoinGecko 和 ExchangeRate-API 跟踪加密货币价格和汇率至 Notion

中级

这是一个Miscellaneous, Multimodal AI领域的自动化工作流,包含 7 个节点。主要使用 Code, Merge, Notion, HttpRequest, ScheduleTrigger 等节点。 使用 CoinGecko 和 ExchangeRate-API 跟踪加密货币价格和汇率至 Notion

前置要求
  • Notion API Key
  • 可能需要目标 API 的认证凭证
工作流预览
可视化展示节点连接关系,支持缩放和平移
导出工作流
复制以下 JSON 配置到 n8n 导入,即可使用此工作流
{
  "meta": {
    "instanceId": "2000c64071c20843606b95c63795bb0797c41036047055a6586498e855b96efc"
  },
  "nodes": [
    {
      "id": "8d9c79de-0c8b-4398-9a0b-83b2bf7750d5",
      "name": "每60分钟",
      "type": "n8n-nodes-base.scheduleTrigger",
      "position": [
        -144,
        112
      ],
      "parameters": {
        "rule": {
          "interval": [
            {
              "field": "minutes"
            }
          ]
        }
      },
      "typeVersion": 1.1
    },
    {
      "id": "702634ad-a504-4fad-9602-dad4cc589e1d",
      "name": "获取法币汇率",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        0,
        48
      ],
      "parameters": {
        "url": "https://api.exchangerate-api.com/v4/latest/USD",
        "options": {}
      },
      "typeVersion": 4.1
    },
    {
      "id": "9abbada7-3fda-47b8-9cb2-5bcf6d595cea",
      "name": "获取加密货币价格",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        0,
        192
      ],
      "parameters": {
        "url": "https://api.coingecko.com/api/v3/simple/price?ids=bitcoin,ethereum&vs_currencies=usd&include_24hr_change=true",
        "options": {}
      },
      "typeVersion": 4.1
    },
    {
      "id": "101e0111-e84c-40fb-92f0-6db1c574a023",
      "name": "合并",
      "type": "n8n-nodes-base.merge",
      "position": [
        208,
        128
      ],
      "parameters": {},
      "typeVersion": 3.2
    },
    {
      "id": "05be9717-9af2-4e50-8a2f-933213ef63f0",
      "name": "构建 Notion 页面",
      "type": "n8n-nodes-base.code",
      "position": [
        400,
        128
      ],
      "parameters": {
        "jsCode": "let fx,cg;for(const it of $input.all()){ if(it.json?.rates) fx=it.json; if(it.json?.bitcoin) cg=it.json; }\nconst page={\n  properties:{\n    Title:{ title:[{ text:{ content:`Crypto+FX — ${new Date().toLocaleString('en-US',{timeZone:'Africa/Lagos'})}`}}]},\n    BTC:{ number: cg?.bitcoin?.usd ?? null },\n    BTC_24h:{ number: cg?.bitcoin?.usd_24h_change ?? null },\n    ETH:{ number: cg?.ethereum?.usd ?? null },\n    ETH_24h:{ number: cg?.ethereum?.usd_24h_change ?? null },\n    USD_EUR:{ number: fx?.rates?.EUR ?? null },\n    USD_NGN:{ number: fx?.rates?.NGN ?? null }\n  }\n};\nreturn [{json:page}];"
      },
      "typeVersion": 2
    },
    {
      "id": "325a38f3-e4c9-4d09-9e80-37e723c785f2",
      "name": "在 Notion 中创建",
      "type": "n8n-nodes-base.notion",
      "position": [
        672,
        128
      ],
      "parameters": {
        "pageId": {
          "__rl": true,
          "mode": "url",
          "value": ""
        },
        "simple": false,
        "options": {}
      },
      "typeVersion": 2
    },
    {
      "id": "45915593-1f21-48fc-bc2e-868c336fee7e",
      "name": "便签",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -592,
        -176
      ],
      "parameters": {
        "width": 736,
        "height": 512,
        "content": "## 📊 加密货币 + 外汇 → Notion 仪表板"
      },
      "typeVersion": 1
    }
  ],
  "pinData": {},
  "connections": {
    "Merge": {
      "main": [
        [
          {
            "node": "Build Notion Page",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Every 60 Minutes": {
      "main": [
        [
          {
            "node": "Get Fiat Exchange Rates",
            "type": "main",
            "index": 0
          },
          {
            "node": "Get Crypto Prices",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Build Notion Page": {
      "main": [
        [
          {
            "node": "Create in Notion",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get Crypto Prices": {
      "main": [
        [
          {
            "node": "Merge",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get Fiat Exchange Rates": {
      "main": [
        [
          {
            "node": "Merge",
            "type": "main",
            "index": 1
          }
        ]
      ]
    }
  }
}
常见问题

如何使用这个工作流?

复制上方的 JSON 配置代码,在您的 n8n 实例中创建新工作流并选择「从 JSON 导入」,粘贴配置后根据需要修改凭证设置即可。

这个工作流适合什么场景?

中级 - 杂项, 多模态 AI

需要付费吗?

本工作流完全免费,您可以直接导入使用。但请注意,工作流中使用的第三方服务(如 OpenAI API)可能需要您自行付费。

工作流信息
难度等级
中级
节点数量7
分类2
节点类型6
难度说明

适合有一定经验的用户,包含 6-15 个节点的中等复杂度工作流

作者
David Olusola

David Olusola

@dae221

I help ambitious businesses eliminate operational bottlenecks and scale faster with AI automation. My clients typically see 40-60% efficiency gains within 90 days. Currently accepting 3 new projects this quarter - david@daexai.com

外部链接
在 n8n.io 查看

分享此工作流