runbookify
← All plans
Accounting & Finance / Accounts Receivable & Collections

Customer Statement Sender

Build an internal tool that turns your open-AR and payment export into a clean monthly statement of account for each customer - open invoices, payments applied, running balance, and an aging summary - drafts the batch, and emails every statement through Resend only after a person approves. No more hand-compiling statements one customer at a time.

BeginnerAn afternoonBuilds onNext.js (App Router) on VercelSupabase (Postgres, Storage, Auth + RLS)Resend (statement emails, batch summaries)
What you'll build

A login-protected statement tool: import your AR and payment activity, let the agent build a per-customer statement of account with an aging summary and your remit instructions, review and approve the whole batch in one screen, email every statement via Resend, log each send, and export the statements as PDF and a sends report as CSV - with a hard rule that no statement goes out until a person approves it, plus skips for zero and credit balances, a suppression list, and a dedupe on customer + period.

Gated download

Enter your email — the plan downloads instantly and a copy lands in your inbox.

By submitting your email you'll also receive the weekly runbookify newsletter. You can unsubscribe at any time.

Before you start

  • A free Vercel account
  • A free Supabase account
  • A free Resend account (and a sender address you can use)
  • An open-AR + payment-activity CSV (invoice #, customer, amount, payments, due date)
  • A customer email contact list (which address each statement goes to)

The problem this kills

Month-end statements are a grind that eats an afternoon (or a whole day) every cycle. You pull the AR aging report, then you go customer by customer: gather their open invoices, find the payments they made since last month, work out the running balance, lay it all out in a template, drop in the aging buckets so they can see what's current versus 30/60/90 days late, add your remit-to instructions, save it as a PDF, look up the right billing contact, attach it, write the cover note, and send. Then you do it again for the next customer. And the next.

By the time you're forty statements deep, you've sent one to a customer with a zero balance (now they're confused and emailing you back), you've fat-fingered a balance somewhere, you've sent a statement to the wrong contact, and you genuinely can't remember whether you already sent this customer's statement this month or not. When a customer calls asking "did you send my statement?" the answer lives in your sent folder, if you're lucky.

Most AR desks run this entirely on a spreadsheet and muscle memory. This tool turns month-end statements into a clean, repeatable, approve-then-send process - so every customer gets an accurate statement, zero and credit balances are skipped on purpose, nobody gets double-sent, and there's a complete record of exactly what went out and when.

What you'll build

A small internal web app, just for your team, that:

  • Imports your open AR and payment activity from a CSV (invoice #, customer, amount, balance, due date, payments applied) and your customer email contacts.
  • Builds a statement of account per customer - their open invoices, the payments applied in the period, and the running balance.
  • Adds an aging summary (current / 30 / 60 / 90+) and your remit-to / payment instructions to every statement.
  • Skips zero and credit balances unless you ask for them, so nobody gets a pointless or awkward statement.
  • Assembles the month's statements into a single batch and shows it to you in one review screen - who's getting a statement, the balance, the aging, and the full document.
  • Emails every approved statement through Resend - and only after you click approve - with the PDF attached or linked.
  • Dedupes on customer + period so the same customer can't be sent two statements for the same month.
  • Respects a suppression list so VIPs, disputed accounts, or anyone on autopay never gets an automated statement.
  • Logs every send, and exports the statements as PDF and a sends report as CSV.

What's inside the Implementation Plan

The plan is a single markdown file you paste into Claude Code (a free AI coding agent). It walks the agent through building the whole tool, step by step, each step ending with a ready-to-paste prompt.

The most important part: the plan opens by interviewing you about your business. Before it writes a single line, the agent asks how you build statements today, what accounting system your AR lives in, the real column names in your export, how you match payments to customers, which aging buckets you use, your exact remit-to wording, whether you skip zero and credit balances, how you pick the billing contact, and your messiest edge cases - customers with multiple accounts, credits and unapplied payments, foreign currency, disputed lines. It reads a short tailored spec back to you, you confirm it, and only then does it build - so you get a tool shaped to your billing process, not a generic template you have to fight.

Inside you'll find:

  • The discovery interview and how the agent turns your answers into the data model, the statement layout, and your aging rules.
  • The full build: database, login, CSV import with duplicate guards, the statement builder, the aging calculator, PDF generation, the batch review-and-approve screen, the Resend send, and the sends log.
  • The hard human approval gate, the zero/credit-balance skips, the suppression list, and the customer + period dedupe.
  • Verification steps so you can prove it works, and the CSV/PDF-export fallback so the tool is fully usable today even before you connect it to your accounting system.

The governance it includes (this is the point)

This isn't a toy. The plan builds in the controls a finance team actually needs:

  • Login so only your team can see or touch anything.
  • Row-level security so people only ever see the customers, invoices, and statements that belong to your organization.
  • A complete audit trail - every import, draft, approval, skip, send, and export logged with who and when.
  • A hard human-in-the-loop gate - the AI builds the statements, but a real person reviews the whole batch and approves; nothing is ever emailed automatically.
  • Skips and a suppression list - zero and credit balances are skipped unless requested, and disputed / VIP / autopay accounts are kept off the automated path on purpose.
  • Duplicate guards - dedupe on customer + period so the same customer can never be sent the same month's statement twice.

Who it's for

AR clerks, billing specialists, office managers, and ops/BPM folks who hand-compile and email customer statements every month and want a real, auditable statement run without hiring a developer or buying a heavyweight billing platform. You don't need to write code. You need your AR/payment-activity CSV, your customer contacts, your remit-to wording, and an afternoon.

You've got this - paste the first prompt and let the agent interview you.

Gated download

Enter your email — the plan downloads instantly and a copy lands in your inbox.

By submitting your email you'll also receive the weekly runbookify newsletter. You can unsubscribe at any time.