8
n8n 中文网amn8n.com

📈 加密货币价格警报

中级

这是一个Finance领域的自动化工作流,包含 15 个节点。主要使用 If, Set, Discord, CoinGecko, ManualTrigger 等节点。 从CoinGecko发送加密货币价格阈值警报到Discord

前置要求
  • Discord Bot Token 或 Webhook

分类

工作流预览
可视化展示节点连接关系,支持缩放和平移
导出工作流
复制以下 JSON 配置到 n8n 导入,即可使用此工作流
{
  "id": "KvtiflL8appirMde",
  "meta": {
    "instanceId": "740c1df6d3b1b6ea8a9d2223701f6904173f9e3cf7381cd181644b043420ba09",
    "templateCredsSetupCompleted": true
  },
  "name": "📈 加密货币价格警报",
  "tags": [],
  "nodes": [
    {
      "id": "33a95d3d-6ed1-4930-aad4-9332ffdca917",
      "name": "CoinGecko",
      "type": "n8n-nodes-base.coinGecko",
      "position": [
        -40,
        -60
      ],
      "parameters": {
        "options": {
          "ids": "bitcoin"
        },
        "operation": "market",
        "baseCurrency": "usd"
      },
      "typeVersion": 1
    },
    {
      "id": "273ef562-bc09-41f1-86d4-105b98ff5752",
      "name": "当点击“执行工作流”时",
      "type": "n8n-nodes-base.manualTrigger",
      "position": [
        -440,
        -200
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "32a3380a-1f73-476d-a5ae-60c8f2b74968",
      "name": "计划触发器",
      "type": "n8n-nodes-base.scheduleTrigger",
      "position": [
        -440,
        20
      ],
      "parameters": {
        "rule": {
          "interval": [
            {
              "field": "minutes"
            }
          ]
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "7ab0b8b0-55cb-44a7-8364-e258dc35878f",
      "name": "设置低值和高值",
      "type": "n8n-nodes-base.set",
      "position": [
        180,
        -60
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "4f11efb0-2e18-46b9-a56c-e00e77f46981",
              "name": "high",
              "type": "number",
              "value": 100500
            },
            {
              "id": "f1660885-1fad-49cd-9039-a27391216826",
              "name": "low",
              "type": "number",
              "value": 100000
            }
          ]
        }
      },
      "typeVersion": 3.4
    },
    {
      "id": "f473f8df-9f4b-4cba-940a-7c2fac36301f",
      "name": "检查变动",
      "type": "n8n-nodes-base.if",
      "position": [
        480,
        -60
      ],
      "parameters": {
        "options": {},
        "conditions": {
          "options": {
            "version": 2,
            "leftValue": "",
            "caseSensitive": true,
            "typeValidation": "strict"
          },
          "combinator": "or",
          "conditions": [
            {
              "id": "c8869aa4-102c-4d87-bcbd-108b1c6ec2ba",
              "operator": {
                "type": "number",
                "operation": "gt"
              },
              "leftValue": "={{ $('CoinGecko').item.json.current_price }}",
              "rightValue": "={{ $json.high }}"
            },
            {
              "id": "94f0ee9d-744c-4a19-889c-f8e85f5e4081",
              "operator": {
                "type": "number",
                "operation": "lt"
              },
              "leftValue": "={{ $('CoinGecko').item.json.current_price }}",
              "rightValue": "={{ $json.low }}"
            }
          ]
        }
      },
      "typeVersion": 2.2
    },
    {
      "id": "cd5bbd3e-9e4b-4270-91db-525656e63da2",
      "name": "检查方向",
      "type": "n8n-nodes-base.if",
      "position": [
        740,
        -60
      ],
      "parameters": {
        "options": {},
        "conditions": {
          "options": {
            "version": 2,
            "leftValue": "",
            "caseSensitive": true,
            "typeValidation": "strict"
          },
          "combinator": "or",
          "conditions": [
            {
              "id": "c8869aa4-102c-4d87-bcbd-108b1c6ec2ba",
              "operator": {
                "type": "number",
                "operation": "gt"
              },
              "leftValue": "={{ $('CoinGecko').item.json.current_price }}",
              "rightValue": "={{ $json.high }}"
            }
          ]
        }
      },
      "typeVersion": 2.2
    },
    {
      "id": "deea1b59-20ec-462e-8721-c30c253d2774",
      "name": "高值消息",
      "type": "n8n-nodes-base.discord",
      "position": [
        1260,
        -160
      ],
      "webhookId": "6f55d01d-f512-478f-85c4-9c80d1efb8df",
      "parameters": {
        "content": "=💹 {{ $json.name }} is now {{ $json.current_price }} ",
        "guildId": {
          "__rl": true,
          "mode": "id",
          "value": "[SELECT YOUR CHANEL]"
        },
        "options": {},
        "resource": "message",
        "channelId": {
          "__rl": true,
          "mode": "id",
          "value": "[SELECT YOUR CHANEL]"
        }
      },
      "credentials": {
        "discordBotApi": {
          "id": "Y0I6czAZgnJ8lNoy",
          "name": "Discord Bot Empty"
        }
      },
      "typeVersion": 2
    },
    {
      "id": "4724b211-3046-431d-875e-df88cfeb298a",
      "name": "低值消息",
      "type": "n8n-nodes-base.discord",
      "position": [
        1260,
        80
      ],
      "webhookId": "6f55d01d-f512-478f-85c4-9c80d1efb8df",
      "parameters": {
        "content": "=❗〽️ {{ $json.name }} is now {{ $json.current_price }} ",
        "guildId": {
          "__rl": true,
          "mode": "id",
          "value": "[SELECT YOUR CHANEL]"
        },
        "options": {},
        "resource": "message",
        "channelId": {
          "__rl": true,
          "mode": "id",
          "value": "[SELECT YOUR CHANEL]"
        }
      },
      "credentials": {
        "discordBotApi": {
          "id": "Y0I6czAZgnJ8lNoy",
          "name": "Discord Bot Empty"
        }
      },
      "typeVersion": 2
    },
    {
      "id": "5f95d096-759a-4563-abac-a4e7484ce6f9",
      "name": "便签",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -560,
        -340
      ],
      "parameters": {
        "color": 4,
        "width": 360,
        "height": 520,
        "content": "# 触发器"
      },
      "typeVersion": 1
    },
    {
      "id": "f1cccde7-715e-420d-90a9-0e3a0941cc68",
      "name": "便签1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -120,
        -340
      ],
      "parameters": {
        "color": 4,
        "width": 480,
        "height": 520,
        "content": "# 币种和价格阈值"
      },
      "typeVersion": 1
    },
    {
      "id": "c0bccb72-5d15-40b6-9fc3-743af1a767b9",
      "name": "便签2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        440,
        -340
      ],
      "parameters": {
        "width": 480,
        "height": 520,
        "content": "# 逻辑"
      },
      "typeVersion": 1
    },
    {
      "id": "ddf127e2-4432-4552-b685-03a44b61da76",
      "name": "便签3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        960,
        -340
      ],
      "parameters": {
        "color": 6,
        "width": 580,
        "height": 580,
        "content": "# 在 Discord 上发送警报"
      },
      "typeVersion": 1
    },
    {
      "id": "76028425-c4df-4d52-945d-93140f700bbc",
      "name": "便签4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1180,
        60
      ],
      "parameters": {
        "color": 3,
        "content": ""
      },
      "typeVersion": 1
    },
    {
      "id": "727a423a-f836-4624-ac03-8c0eb94c9460",
      "name": "便签5",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1180,
        -180
      ],
      "parameters": {
        "color": 4,
        "content": ""
      },
      "typeVersion": 1
    },
    {
      "id": "66a1ccf8-07d0-4244-8e81-ae6f912ea13a",
      "name": "便签6",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1600,
        -360
      ],
      "parameters": {
        "color": 7,
        "width": 580,
        "height": 620,
        "content": "# 📈 加密货币价格警报工作流"
      },
      "typeVersion": 1
    }
  ],
  "active": false,
  "pinData": {},
  "settings": {
    "executionOrder": "v1"
  },
  "versionId": "8ffd26de-f76b-4eb9-8299-f7d5a3058f0a",
  "connections": {
    "CoinGecko": {
      "main": [
        [
          {
            "node": "Set Low and High",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Check movement": {
      "main": [
        [
          {
            "node": "Check Direction",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Check Direction": {
      "main": [
        [
          {
            "node": "Message High",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Message Low",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Schedule Trigger": {
      "main": [
        [
          {
            "node": "CoinGecko",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Set Low and High": {
      "main": [
        [
          {
            "node": "Check movement",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "When clicking ‘Execute workflow’": {
      "main": [
        [
          {
            "node": "CoinGecko",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}
常见问题

如何使用这个工作流?

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

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

中级 - 财务

需要付费吗?

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

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

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

作者
LukaszB

LukaszB

@lukaszb

AI Automation Expert | Web & Mobile App Integrator With 2+ years of experience, I build smart automations, web & mobile app workflows, and scalable platforms using tools like n8n, Make, and more. I help businesses reduce operational costs, save time, and scale faster with AI-powered solutions. For business enquiries, send me an email at kontakt@lumizone.pl

外部链接
在 n8n.io 查看

分享此工作流