{
  "name": "Solana Wallet Monitor \u2014 Telegram Alerts",
  "nodes": [
    {
      "parameters": {
        "rule": {
          "interval": [
            {
              "field": "minutes",
              "minutesInterval": 5
            }
          ]
        }
      },
      "id": "cron-trigger",
      "name": "Every 5 Minutes",
      "type": "n8n-nodes-base.scheduleTrigger",
      "position": [
        240,
        300
      ],
      "typeVersion": 1.1
    },
    {
      "parameters": {
        "method": "POST",
        "url": "https://api.mainnet-beta.solana.com",
        "sendHeaders": true,
        "headerParameters": {
          "parameters": [
            {
              "name": "Content-Type",
              "value": "application/json"
            }
          ]
        },
        "sendBody": true,
        "bodyParameters": {
          "parameters": [
            {
              "name": "jsonrpc",
              "value": "2.0"
            },
            {
              "name": "id",
              "value": "1"
            },
            {
              "name": "method",
              "value": "getBalance"
            },
            {
              "name": "params",
              "value": "={{ [\"YOUR_WALLET_ADDRESS_HERE\"] }}"
            }
          ]
        }
      },
      "id": "solana-rpc",
      "name": "Get SOL Balance",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        460,
        300
      ],
      "typeVersion": 4.2
    },
    {
      "parameters": {
        "conditions": {
          "number": [
            {
              "value1": "={{ $json.result.value / 1e9 }}",
              "operation": "smallerEqual",
              "value2": 0.1
            }
          ]
        }
      },
      "id": "low-balance-check",
      "name": "Balance Below 0.1 SOL?",
      "type": "n8n-nodes-base.if",
      "position": [
        680,
        300
      ],
      "typeVersion": 2
    },
    {
      "parameters": {
        "authentication": "predefinedCredentialType",
        "nodeCredentialType": "telegramApi",
        "resource": "message",
        "operation": "sendMessage",
        "chatId": "={{ $env.TELEGRAM_CHAT_ID }}",
        "text": "\u26a0\ufe0f LOW BALANCE ALERT\n\nWallet: YOUR_WALLET_ADDRESS_HERE\nBalance: {{ $('Get SOL Balance').item.json.result.value / 1e9 }} SOL\n\nTime: {{ $now.toLocaleString() }}"
      },
      "id": "telegram-alert",
      "name": "Send Telegram Alert",
      "type": "n8n-nodes-base.telegram",
      "position": [
        900,
        240
      ],
      "typeVersion": 1.2
    }
  ],
  "connections": {
    "Every 5 Minutes": {
      "main": [
        [
          {
            "node": "Get SOL Balance",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get SOL Balance": {
      "main": [
        [
          {
            "node": "Balance Below 0.1 SOL?",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Balance Below 0.1 SOL?": {
      "main": [
        [
          {
            "node": "Send Telegram Alert",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  },
  "settings": {
    "executionOrder": "v1"
  },
  "_meta": {
    "description": "Monitors a Solana wallet balance every 5 minutes and sends a Telegram alert when it drops below 0.1 SOL.",
    "requiredCredentials": [
      "Telegram API"
    ],
    "variables": [
      "YOUR_WALLET_ADDRESS_HERE",
      "TELEGRAM_CHAT_ID"
    ],
    "category": "DeFi / Crypto",
    "n8nVersion": ">=1.0.0"
  }
}