{
  "meta": {
    "created": "2026-02-13T06:51:00Z",
    "version": "1.0"
  },
  "name": "Security Scanner - Payment Notification",
  "description": "Wise \u6536\u6b3e\u901a\u77e5\u8207\u5ba2\u6236\u7ba1\u7406\u81ea\u52d5\u5316",
  "active": false,
  "nodes": [
    {
      "parameters": {
        "method": "POST",
        "url": "={{ $env.WISE_WEBHOOK_URL }}",
        "sendHeaders": true,
        "headerParameters": {
          "parameters": [
            {
              "name": "Content-Type",
              "value": "application/json"
            }
          ]
        },
        "sendBody": true,
        "specifyBody": "json",
        "jsonBody": "={}",
        "options": {}
      },
      "id": "node_webhook",
      "name": "Wise Webhook",
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.1,
      "position": [
        100,
        200
      ]
    },
    {
      "parameters": {
        "chatId": "1408472778",
        "text": "={{ '\ud83d\udcb0 \u3010\u6536\u6b3e\u901a\u77e5\u3011\\n\\n\ud83d\udcb5 \u91d1\u984d: ' + $json.amount + ' ' + $json.currency + '\\n\ud83d\udcdd \u9805\u76ee: ' + ($json.reference || 'Security Scanner \u8a02\u55ae') + '\\n\ud83d\udc64 \u5ba2\u6236: ' + ($json.senderName || '\u672a\u77e5') + '\\n\u23f0 \u6642\u9593: ' + $json.created_at + '\\n\\n\ud83d\udd17 https://wise.com/home/review' }}",
        "additionalFields": {}
      },
      "id": "node_telegram_alert",
      "name": "Telegram Alert",
      "type": "n8n-nodes-base.telegram",
      "typeVersion": 1.6,
      "position": [
        350,
        150
      ],
      "credentials": {
        "telegramApi": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "operation": "append",
        "sheetId": "SPREADSHEET_ID",
        "table": "A:E",
        "columns": "=A:B:C:D:E",
        "options": {}
      },
      "id": "node_google_sheets",
      "name": "Google Sheets",
      "type": "n8n-nodes-base.googleSheets",
      "typeVersion": 1,
      "position": [
        350,
        300
      ],
      "credentials": {
        "googleSheetsOAuth2": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "toEmail": "={{ $json.customerEmail || 'andycywu@gmail.com' }}",
        "subject": "={{ '\u611f\u8b1d\u8cfc\u8cb7 Security Scanner\uff01\u8a02\u55ae #' + $json.orderId }}",
        "emailFormat": "html",
        "text": "={{ '<h2>\ud83c\udf89 \u611f\u8b1d\u60a8\u7684\u8cfc\u8cb7\uff01</h2>\\n\\n<p>\u89aa\u611b\u7684 <strong>' + ($json.senderName || '\u5ba2\u6236') + '</strong>\uff0c</p>\\n\\n<p>\u6211\u5011\u5df2\u6536\u5230\u60a8\u7684\u4ed8\u6b3e\uff1a<strong>' + $json.amount + ' ' + $json.currency + '</strong></p>\\n\\n<p>\u8a02\u55ae\u8a73\u60c5\uff1a<strong>#' + ($json.orderId || 'SC-' + Date.now()) + '</strong></p>\\n\\n<h3>\ud83d\udce6 \u7522\u54c1\u8cc7\u8a0a</h3>\\n<ul>\\n<li>Security Scanner \u500b\u4eba\u7248</li>\\n<li>GitHub: https://github.com/andycywu/security-scanner</li>\\n</ul>\\n\\n<h3>\ud83d\udca1 \u958b\u59cb\u4f7f\u7528</h3>\\n<ol>\\n<li>Clone repository</li>\\n<li>\u57f7\u884c: python3 scanner.py /path/to/your/skill</li>\\n<li>\u67e5\u770b\u5831\u544a</li>\\n</ol>\\n\\n<p>\u5982\u6709\u554f\u984c\uff0c\u8acb\u806f\u7e6b\uff1a@singularity_capital_bot</p>\\n\\n<p>---<br>\u5947\u9ede\u8cc7\u672c Singularity Capital LLC</p>' }}",
        "additionalFields": {}
      },
      "id": "node_email",
      "name": "Customer Email",
      "type": "n8n-nodes-base.emailReadImap",
      "typeVersion": 1.4,
      "position": [
        350,
        450
      ],
      "credentials": {
        "smtp": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "functionCode": "// \u8655\u7406\u6536\u6b3e\u8cc7\u6599\nconst amount = $json.amount || 0;\nconst currency = $json.currency || 'USD';\nconst orderId = 'SC-' + Date.now().toString(36).toUpperCase();\n\nlet product = 'Security Scanner \u500b\u4eba\u7248 $49';\nif (amount >= 499) {\n  product = 'Security Scanner \u4f01\u696d\u7248 $499';\n}\n\nreturn [{\n  json: {\n    amount,\n    currency,\n    orderId,\n    product,\n    created_at: new Date().toISOString(),\n    customerEmail: $json.senderEmail,\n    senderName: $json.senderName,\n    status: 'completed'\n  }\n}];\n"
      },
      "id": "node_order_processor",
      "name": "Order Processor",
      "type": "n8n-nodes-base.function",
      "typeVersion": 1,
      "position": [
        100,
        400
      ]
    }
  ],
  "connections": {
    "Wise Webhook": {
      "main": [
        [
          {
            "node": "Telegram Alert",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Google Sheets",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Order Processor",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Order Processor": {
      "main": [
        [
          {
            "node": "Customer Email",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  },
  "settings": {
    "executionOrder": "v1"
  }
}