Build a Back-Office AI Agent in a Weekend: Invoicing, Follow-ups, Reporting

A concrete weekend build walkthrough for a Claude Haiku 4.5 + n8n agent that automates invoicing, overdue payment follow-ups, and weekly P&L reporting for solo founders at ~$18/month.

Published 12 min read
Build a Back-Office AI Agent in a Weekend: Invoicing, Follow-ups, Reporting
● LISTEN (AI NARRATION β€” BROWSER)
0:00 --:--

If you are running a services or productized-services business solo, the AI agent back office solo founder problem is painfully real. I have run this stack for eight months, processing over 140 invoices and roughly $180,000 in client payments without touching a spreadsheet. Before I automated it, back-office admin was consuming six billable hours every week β€” not month. At a $150/hr equivalent rate, that is $900 off your margin every single week, or $46,800 in shadow payroll per year. This weekend-sized project walks through the exact architecture I built to automate all three loops with a single Claude Haiku 4.5 agent orchestrated by n8n, at a verified total cost of roughly $18/month.

Disclaimer: The financial output produced by this agent (P&L snapshots, revenue summaries) is for informational purposes only and does not constitute accounting, tax, or financial advice. Consult a qualified CPA for your actual books.

Why Back-Office Admin Is a Margin Problem, Not a Time Problem

According to the ILO’s 2025 World Employment and Social Outlook report, payment uncertainty ranks as the top work-related stressor for independent workers, ahead of income volatility and client acquisition. That finding aligns with what Upwork’s annual Freelance Forward study reports about non-billable time drag: the founders who feel most financially precarious are the ones spending the most hours on tasks that generate no revenue.

Six hours per week at $150/hr is $900 off your margin every single week. Annualised, that is $46,800 in shadow payroll you are paying yourself to do work that a $18/month agent can handle instead.

The FI math is just as stark. If your FI number is $1.5 million invested (the 25x rule on $60k/year spending), then every $900/month you claw back from admin β€” and redirect to revenue generation or invested savings β€” cuts roughly 18 months off your timeline. That is not motivational framing; that is arithmetic. I have covered the underlying framework in The $300/Month AI Stack That Replaced My First Three Hires, and this post goes one layer deeper: agentic automation, not just tool subscriptions.

The Architecture: One Agent, Three Loops

The system has three components: a Claude Haiku 4.5 model accessed via the Anthropic API (tool-use mode), an n8n instance running on a self-hosted Hetzner CX22 VPS, and your existing data sources (Toggl/Harvest CSV export for time tracking, Stripe API, and a bank transaction CSV). n8n acts as the orchestration and scheduling layer; Claude is the reasoning layer that fills in variable fields and makes decisions about tone and urgency.

n8n Scheduler
  β”œβ”€β”€ Loop A: Invoice Generator (Mon 09:00)
  β”‚   β”œβ”€β”€ Read Toggl CSV export
  β”‚   β”œβ”€β”€ β†’ Claude: fill invoice template + calculate total
  β”‚   └── β†’ Stripe Invoices API: create + send
  β”‚
  β”œβ”€β”€ Loop B: Overdue Follow-Up (Wed + Fri 10:00)
  β”‚   β”œβ”€β”€ β†’ Stripe API: list invoices (status=open, due < today)
  β”‚   β”œβ”€β”€ β†’ Claude: personalise follow-up email (tone: days_overdue)
  β”‚   └── β†’ SMTP / Resend: send email
  β”‚
  └── Loop C: Weekly P&L Snapshot (Sun 18:00)
      β”œβ”€β”€ β†’ Stripe Reports API: balance_summary CSV
      β”œβ”€β”€ β†’ Bank CSV (uploaded to /tmp or Google Drive)
      β”œβ”€β”€ β†’ Claude: categorise + summarise into P&L table
      └── β†’ Slack / email: send report
n8n workflow: three automation loops for solo founder back office β€” invoice generation, payment follow-up, and weekly P&L snapshot.
No-VPS option: n8n Cloud ($20/mo) eliminates the Hetzner VPS and all Docker steps. Total cost rises to approximately $33/mo but the weekend build collapses from 8 hours to around 5 hours. Sign up at n8n.io/pricing. Choose this path if you prefer not to manage Linux infrastructure β€” the $15/mo premium buys zero server maintenance. n8n Community Edition remains free and open-source for the self-hosted route.

Loop A β€” Invoice Generation from Time-Tracker Data

On Monday mornings n8n reads a CSV exported from your time tracker (Toggl Track works well; Harvest and Clockify are identical). A “Read CSV” node parses each row into a JSON object with fields: client, project, hours, date. The n8n Code node groups rows by client and sums hours. That JSON blob is handed to Claude Haiku 4.5 via the Anthropic node in n8n with this system prompt:

System prompt β€” Invoice Writer

You are an invoice assistant for a solo technical consulting firm. Given a JSON object with client name, project, billable hours, and hourly rate, produce a plain-text invoice body with: (1) itemised line items, (2) subtotal, (3) applicable tax rate at 0% if not specified, (4) total due, (5) payment terms “Net-14”. Output only the invoice body text. No markdown.

Claude’s output drops into an n8n “Stripe” node that calls POST /v1/invoices β€” creating the invoice and triggering Stripe to send it directly to the client’s email on file. The entire path takes under 60 seconds from CSV read to delivered invoice. No manual entry. No forgotten clients. No “I thought I already sent that.”

Handling Edge Cases with Tool-Use

Claude is also given a tool definition for flag_for_review β€” if hours for any client are more than 40% above their trailing 4-week average, the agent calls the tool instead of auto-sending, which drops a Slack message to a #billing-review channel. This prevents a CSV import error from mailing a wildly incorrect invoice to a real client.

Loop B β€” Personalised Overdue-Payment Follow-Ups

This is the loop with the most direct ROI. The ILO’s 2025 data confirms that payment uncertainty is the top stressor for independent workers globally β€” which means every day an invoice sits open is compounding stress, not just delayed cash. An automated, personalised nudge sent on day 1 and day 7 of overdue status recovers most late invoices without a single manual email.

The n8n workflow queries the Stripe API for open invoices past due date, then iterates over each one passing the following context to Claude:

  • client_name β€” pulled from Stripe customer metadata
  • invoice_amount β€” in dollars
  • days_overdue β€” integer
  • prior_contacts β€” count of previous follow-up emails sent
  • project_name β€” last completed deliverable
System prompt β€” Follow-Up Writer

You write payment reminder emails for a solo technical consultant. Tone rules: days_overdue 1–7 = friendly and assumptive (“I imagine it got buried”); 8–14 = direct and clear; 15+ = firm and factual, no pleasantries. Always mention the specific project by name. Never threaten legal action. Keep under 120 words. Sign as “{{YOUR_NAME}}”. Output only the email body.

Personalise the signature: Replace {{YOUR_NAME}} with an n8n expression that reads an environment variable: {{ $env.BUSINESS_OWNER_NAME }}. Set BUSINESS_OWNER_NAME=Jane in your n8n environment config and every email signs with your actual name β€” not the author’s.

The email is dispatched via Resend (or any SMTP integration in n8n). No LLM output goes to the client unseen β€” n8n logs the draft to a Google Sheet row first, and a conditional branch checks for a HOLD flag in that sheet before sending, giving a 30-minute window to cancel if needed.

Implementing the HOLD flag gate: After the Anthropic node, add a Google Sheets node that reads column B of the row matching the current invoice_id (the row was written in the previous step). Add a Wait node set to 30 minutes. Then add an IF node: if column B = HOLD, route to a no-op (Set node that does nothing); otherwise route to the Resend node. During the 30-minute window you can open the Sheet and type HOLD in column B to block any specific email before it goes out.

If you are still evaluating which client tools to combine with this agent, the solo founder CRM layer covers the client-management tools that sit neatly alongside this stack.

Loop C β€” Weekly P&L Snapshot from Stripe + Bank CSV

Every Sunday at 6 p.m. n8n triggers Stripe’s Reporting API to pull the balance summary for the trailing 7 days as CSV. Separately, you drop your bank’s weekly transaction CSV export into a Google Drive folder; an n8n Google Drive trigger picks it up. Both CSVs are parsed, merged into a single JSON array, and sent to Claude with this task:

System prompt β€” P&L Summariser

You are a financial summariser for a solo founder. Given a JSON array of transactions from Stripe and a bank export, produce: (1) total gross revenue, (2) total refunds, (3) net revenue, (4) categorised expenses (software, contractor, infrastructure, other), (5) net income, (6) one-sentence week-over-week trend note. Format as a plain-text table. This is a management summary β€” not audited financials. Always include at the bottom: “This summary is auto-generated and for informational purposes only. Not accounting advice.”

Bank CSV maintenance note: Bank CSV formats vary by institution β€” column names, date formats, and encoding all differ. Add a Code node before the merge step that normalises column names to a standard schema: {date, description, amount, type}. Expect to update this normalisation node when your bank changes its export format, which typically happens once a year. This is the most common point of failure in week two of running Loop C.

The formatted P&L lands in a Slack DM every Sunday evening. I read it Monday morning with coffee. It takes zero minutes of my labour. For more on AI-first business models for one-person companies β€” the bigger strategic picture that makes this kind of leverage compound over time.

Real Monthly Cost: What You Actually Pay

These numbers use verified pricing from the Anthropic API pricing page (June 2026). The Hetzner CX22 price is $4.59/mo as of June 2026 β€” check hetzner.com/cloud directly for current EUR/USD pricing, which varies with exchange rate. n8n Community Edition is free and open-source.

ComponentWhat it coversCost/mo
Hetzner CX22 VPSSelf-hosted n8n via Docker Compose$4.59
n8n Community EditionOpen-source, unlimited workflow executions$0
Claude Haiku 4.5 β€” Input tokens~56k tokens/mo total (see breakdown below) @ $1/MTok<$0.10
Claude Haiku 4.5 β€” Output tokens~9k tokens/mo (invoice bodies, emails, summaries) @ $5/MTok<$0.05
Resend (SMTP)3,000 emails/mo free tier β€” sufficient for most solo founders$0
Stripe Reporting APIIncluded in standard Stripe account$0
Total~$4.65–5/mo

The honest token math (20 invoices + 8 follow-ups + 4 P&L runs per month):

  • Loop A: ~1,500 input / 300 output per invoice Γ— 20 = 30,000 input / 6,000 output tokens
  • Loop B: ~800 input / 150 output per email Γ— 8 = 6,400 input / 1,200 output tokens
  • Loop C: ~5,000 input / 500 output per run Γ— 4 = 20,000 input / 2,000 output tokens
  • Real monthly total: ~56,400 input / ~9,200 output tokens

At $1/MTok input and $5/MTok output, the Claude API costs approximately $0.10/month for a typical solo operation. The $4–5 total is almost entirely the Hetzner VPS. Enable prompt caching on your system prompts (cache_control with a 1-hour TTL) and input costs drop by up to 90% on repeat runs β€” but at these volumes, the savings are fractions of a cent. The real win from prompt caching is latency, not cost.

What Makes This AI Agent Back Office Stack Work for Solo Founders

The stack’s leverage comes from three design decisions that most “automate your business” tutorials skip. First, Claude is given structured JSON context β€” not free-form instructions β€” which makes outputs deterministic enough to trust without reading every email. Second, the flag_for_review tool in Loop A and the HOLD gate in Loop B mean the human stays in the loop for edge cases only, not routine work. Third, the P&L prompt requires the model to append a disclaimer by design β€” every output is self-labelled as informational, not authoritative. That is the architecture working correctly.

Weekend Build Plan: Your AI Agent Back Office Is Live in 8 Hours

  1. Saturday morning (2 hrs): Provision a Hetzner CX22. Install Docker and Docker Compose. Use the official n8n Docker Compose template. Point your domain’s A record at the server. SSL via Caddy reverse proxy. (n8n Cloud users: skip to step 2 β€” estimated time 15 minutes.)
  2. Saturday afternoon (2 hrs): Build Loop A in n8n. Schedule trigger β†’ Read CSV β†’ Code node (group by client, sum hours) β†’ Anthropic node (invoice system prompt) β†’ Stripe Invoices node. Test with a dummy CSV in Stripe test mode.
  3. Saturday evening (1 hr): Build Loop B. Stripe node (list open invoices) β†’ IF node (compute days_overdue) β†’ Anthropic node (follow-up email prompt) β†’ Google Sheets log node β†’ Wait node (30 min) β†’ IF node (check HOLD flag) β†’ Resend node. Set BUSINESS_OWNER_NAME environment variable.
  4. Sunday morning (2 hrs): Build Loop C. Cron trigger (Sun 18:00) β†’ Stripe Reports API call β†’ Google Drive trigger for bank CSV β†’ Code node (normalise column names to {date, description, amount, type}) β†’ merge node β†’ Anthropic node (P&L summariser) β†’ Slack DM.
  5. Sunday afternoon (1 hr): Add cache_control blocks to all three system prompts. Wire the flag_for_review tool definition in Loop A. Run a full end-to-end test with real CSV data in Stripe test mode.

Eight hours of focused build time. The ROI math: if this setup recovers even two hours of admin per month (conservative), it pays back at month one and compounds indefinitely. That is the leverage model the one-person company running on an AI layer is built on β€” not grinding more hours, but engineering the margin floor higher.

FAQ: AI Agent Back Office for Solo Founders

Is Claude Haiku 4.5 reliable enough for financial outputs like invoices?

For structured, templated outputs β€” filling invoice fields, formatting payment reminder emails, categorising bank transactions β€” Haiku 4.5 is highly reliable. The model is not doing complex financial reasoning; it is doing structured text generation from well-defined JSON inputs. The flag_for_review tool in Loop A and the logging step in Loop B exist to catch edge cases. Never send financial documents to clients without at least a lightweight human review gate in your workflow.

What if I don’t use Stripe β€” can this work with other payment processors?

Yes. Loop C’s P&L summary works off any CSV export β€” PayPal, Wave, QuickBooks, or any bank export. You would replace the Stripe API calls in Loop A and Loop B with whichever invoicing tool you use; FreshBooks and Invoice Ninja both have REST APIs with n8n community nodes. The Claude prompt layer is entirely agnostic to the data source β€” it consumes JSON context regardless of origin.

Can I build this with Zapier or Make instead of n8n?

Yes, with caveats. Zapier and Make both support HTTP Request nodes that can call the Anthropic API, and both have native Stripe and Google Sheets integrations. The main trade-off: n8n Community Edition is free and self-hostable with no execution limits; Zapier and Make charge per task run, which adds $20–50/mo at the volumes described here. For a non-technical founder who already uses Zapier, starting there and migrating to n8n later is a reasonable path.

What happens if the Anthropic API goes down β€” does my invoice fail silently?

By default, yes β€” n8n will catch the HTTP error and the workflow execution fails. The fix is a two-minute addition: wrap the Anthropic node in an Error Trigger workflow that sends you a Slack alert on failure. For Loop A specifically, also enable n8n’s built-in retry (3 attempts, 5-minute intervals) on the Anthropic node. Stripe invoices are only created after a successful Claude response, so a failed API call means a delayed invoice, not a malformed one.

How do I keep client data safe when passing it to the Claude API?

Anthropic does not use API request data to train models by default. For additional protection: never pass raw card or bank account numbers β€” Stripe’s API returns tokenised IDs only; store API keys as environment variables in n8n, never hardcode them in workflow nodes; and consider Anthropic’s zero-data-retention option if you are on an enterprise plan and handling sensitive verticals. For most solo B2B consultants, the standard API data handling terms are sufficient.

Conclusion: The AI Agent Back Office Solo Founder Build Pays for Itself in Month One

I have run this AI agent back office solo founder stack for eight months. In that time it has processed over 140 invoices, sent 60-odd follow-up emails, and produced 35 weekly P&L snapshots β€” all without my direct involvement. The total cost over that period: approximately $40 in Hetzner fees and under $2 in Anthropic API credits. The time reclaimed: roughly 200 hours that went into billable work and invested savings instead of spreadsheets.

The stack eliminates the single most demoralising part of running a services business: the administrative tax on your billable time. Six reclaimed hours per week, compounded at your effective hourly rate and reinvested into revenue work or your investment portfolio, is a genuine accelerant on the path to financial independence.

The total weekend time investment is eight hours. The payback period at any reasonable billing rate is under 30 days. Everything after that is pure margin. Subscribe to the newsletter below and I’ll send you the n8n workflow JSON exports and the full Claude prompt library so you can clone the setup without building from zero.

Hector Siman is a solo technical consultant who writes about AI-first operations and founder financial independence at BrightCurios. He has operated a one-person services business for six years and has been building on the Anthropic API since its public launch.

Comments

Your email address will not be published. Required fields are marked *

No comments yet β€” be the first to share your thoughts.