blokboard/ Open app

EXAMPLE 13 OF 16 · Intermediate

Build and email a multi-wallet balance sheet

Read a wallet list from CSV, flag low SOL balances, and save and email one complete token-account report.

DesktopSolanaFilesIterateConditionsEmail

Before you begin#

  • Choose Solana mainnet and a working RPC route in runtime settings. These examples read live data; illustrative results below will differ.
  • Select the Desktop runtime. Set absolute input and output paths for that machine; create the output directory before running.
  • Follow email setup, select the saved connection on Email, and set emailTo to your own address.
  • Download wallets.csv below, replace its placeholders, and set walletFile and reportPath in Globals. reportPath is the full destination filename.

Sample input files

Replace both address placeholders with public wallet addresses. Each address must be unique. min_sol is the native SOL alert threshold.

WORKFLOW SNAPSHOT

Multi-wallet balance sheet

19 nodes

Interactive workflow preview loads here. Download the JSON to inspect it in the app.

Import creates an inactive copy. Set your own inputs and connections before running.

4 setup requirements
  • input: Set walletFile in Globals
  • input: Set reportPath in Globals
  • input: Set emailTo in Globals
  • connection: Choose the email connection for email

Walk through the workflow#

  1. Open file, Read file, and Parse CSV load the list. Code validates the rows and rejects duplicate addresses before any balance requests.
  2. Create file prepares a temporary report. Iterate sends each wallet through SOL balance and Token holdings.
  3. Code creates that wallet’s rows and calculates lowSol. If adds either LOW SOL or OK before Write file appends the rows.
  4. Iterate.done waits for every writing path. The completed rows are read, converted to CSV, saved to reportPath, and emailed once.

Read the balance sheet#

labelassetamountstatus
TreasurySOL1.5OK
OperationsSOL0.02LOW SOL

These are illustrative rows. The real file also includes wallet and token-account addresses. A wallet below its own min_sol threshold gets LOW SOL on its rows. Token amounts are not added across unrelated mints, and this report does not calculate USD value.

Why a temporary file comes before the loop#

Iterate.done waits; it does not collect downstream results. Each item appends one JSON line to the shared temporary file. After done, Code reads those lines and Write CSV handles quoting and spreadsheet formula protection. Row order can differ because wallet reads can overlap.

Make one change#

Add a third wallet to the input CSV. Set one threshold above its current balance and another below it. Both If paths should be exercised, with one final email containing all completed rows.

If it does not match#

Replace every address placeholder and use a unique address per row. Missing folders cause Save file to fail. A failed wallet read stops the run rather than labelling an incomplete report as complete. Files are temporary until Save file succeeds.