Who this is for: anyone who needs to know when a wallet's SOL balance falls below a level — a hot wallet that pays gas for a bot, a treasury with a minimum reserve — before it runs dry, not after every single transaction.
This is a small variant of the wallet transaction alert workflow: instead of listing every signature, it asks a public Solana RPC for the wallet's current balance every 5 minutes and pings Telegram only the moment the balance crosses below your threshold — not on every poll while it stays low.
getBalance: {"jsonrpc":"2.0","id":1,"method":"getBalance","params":["<WALLET_ADDRESS>"]} against https://api.mainnet-beta.solana.com.result.value (lamports, divide by 1e9 for SOL), compare against your BALANCE_THRESHOLD env var, and set a boolean only on the transition from above to below — mirroring the state-change logic the price alert workflow already uses.chat_id.getBalance is a single lightweight RPC call — cheaper than paging through signatures — and the balance in lamports needs dividing by 1e9 to get SOL. State (last known side of the threshold) lives in $getWorkflowStaticData, so a restart doesn't re-trigger a stale alert.