The cash flow forecast engine: see the crunch coming before it hits your account
Your bank balance, projected forward from what you actually owe and what people actually owe you
- Firefly III already tracking your business bank account and recurring bills, or a free afternoon to set that up first
- Invoice Ninja already issuing your invoices with real due dates, and payments marked the day they clear
- A machine that stays on for the weekly n8n job — a mini PC, NAS or small VPS
- Your own read on which recurring bills are must-pay versus postponable — the forecast totals every bill the same unless you flag it
Version history
Your bank balance, projected forward from what you actually owe and what people actually owe you — four to eight weeks of warning before a cash crunch, not a surprise the day the card gets declined.
The problem
The money owed to you sits in your invoicing app. The money you owe sits in your bank statement, a folder of standing orders, and your memory. Nobody has ever put the two side by side and pushed them forward in time — so the first sign of a cash problem is usually the week it happens, when a client pays late and payroll is due the same Friday. Purpose-built SaaS tools for this exist — Float, Cash Flow Frog, Fathom — and they are good, but they run EUR 30-90/month and expect you to already be on Xero or QuickBooks. There is no free, self-hosted equivalent built for a business that invoices with Invoice Ninja and banks like everyone else. This blueprint is that equivalent: three tools you may already be running for other jobs in this library, pointed at one weekly question — what does my bank balance look like in week 4, and in week 9?
The architecture
[ Invoice Ninja ] every open invoice, its due date, and the client's real payment history
│ both read by API, every Monday morning
▼
[ n8n — the forecast engine ]
├─ starts from this week's real balance
├─ adds each open invoice in the week it will likely land, not the week it's due
├─ subtracts every recurring bill in the week it falls
└─ rolls the balance forward 13 weeks, flags the first week under your safety line
One message, every Monday, to Telegram or email: this week's number, the first week that goes red, and the full 13-week table underneath.
The one design decision that makes this honest rather than optimistic: n8n does not assume every client pays on their invoice's due date. For any client with payment history in Invoice Ninja, it looks at how many days late they've actually paid on average and pushes that invoice's expected collection date out to match. A client who reliably pays 12 days late gets forecast 12 days late, not on time. New clients with no history default to their stated due date, which is the one optimistic assumption left — and it's disclosed in the message, not hidden.
Tool choices — and why
Firefly III (self-hosted, AGPL-3.0, 24.1k stars, actively developed) is the ledger of record for the outflow side: your real bank balance and every recurring cost entered as a "bill" — rent, payroll, loan repayments, software subscriptions, insurance instalments. If you already built the money dashboard or the bank reconciliation matcher blueprint, it's already running and this costs you nothing extra to reuse.
Invoice Ninja (source-available, Elastic License 2.0 — self-hosting to run your own business is explicitly fine, reselling it as a hosted service is not; 9.7k stars, actively released, latest v5.13.22 May 2026) is the ledger of record for the inflow side: every open invoice, its due date, and — because it also records the date each past invoice was actually paid — the raw material for the payment-history offset described above. Same reuse logic: if you built the late-invoice chaser, it's already there.
n8n (fair-code Sustainable Use License — free for internal business use, 188.9k stars, pushed within the last three months) is the only new piece if you already run the other two: one scheduled workflow that reads both APIs, does the week-by-week arithmetic in a Code node, and posts the result. Read-only against both systems — it cannot post a transaction or touch an invoice, so a bug in the maths produces a wrong forecast, never a wrong record.
Monthly cost. Software: EUR 0 for all three. If you're building this stack from nothing, one small VPS running Firefly III + Invoice Ninja + n8n together costs roughly EUR 8-15/month. If you already run two of the three for another blueprint in this library, this is one more n8n workflow on a server you're already paying for — effectively free.
Setup outline
1. If Firefly III isn't already running: deploy it (official Docker image), connect your business bank account through the free Data Importer or a weekly CSV export, and get today's real balance flowing in — everything else builds on this number being right.
2. In Firefly III, enter every recurring cost as a "bill" with its real amount and frequency: rent, payroll, loan repayments, subscriptions, insurance instalments. This list is the entire outflow half of the forecast — one forgotten bill is the most common way this goes wrong.
3. If Invoice Ninja isn't already running: deploy it and make sure every invoice you issue lives there with a real due date, and that payments get marked the day they clear — the payment-history offset only works on invoices that were actually recorded as paid.
4. Generate a read-only API token in each of Firefly III and Invoice Ninja (Settings → API in both).
5. Build the n8n workflow: a Monday-morning schedule trigger → HTTP Request nodes pulling Firefly III's balance and upcoming bills, and Invoice Ninja's open invoices and each client's payment history → one Code node that builds the 13-week running balance, applying each client's average days-late to their open invoices.
6. Set a safety-buffer amount — a fixed euro figure, or one week of payroll — and have the workflow flag the first week the projected balance drops below that line, not just below zero.
7. Point the output at Telegram or email. Before trusting it, test weeks 1 and 2 against what you already know is coming; only extend your trust to weeks 8-13 once a few Mondays have passed and the near-term numbers held up.
8. Re-run every Monday for a month before making any real decision off the far end of the forecast — week 13 is always the least reliable number in the table; the early warning in weeks 1-4 is the entire point.
Pitfalls — the real ones
An unentered bill is an invisible one. Annual costs like insurance renewals, a tax prepayment, or an equipment lease that only comes up once a year are the classic omission — the forecast looks perfectly healthy right up to the week the bill you never told Firefly III about actually lands.
Optimism by default. A brand-new client with no payment history gets forecast on their stated due date, which is the one place this system still assumes best-case. Treat a first invoice from a new client as a guess, not a number.
VAT and tax dates need a manual entry the moment you know the amount. They don't arrive as a recurring monthly bill in most systems, so they're easy to forget until the quarter they're due — enter them into Firefly III as soon as the number is known, not the week before.
A stalled n8n job fails silently, and a silent failure here is the worst kind. An expired API token or a workflow that doesn't resume after a container restart means you keep getting a message that looks fine because it's actually last week's numbers relabelled. Check the "as of" date at the top of the message every time, not just the balance underneath it.
This is a forecast, not an audit. It trusts what's already in Firefly III and Invoice Ninja. A bookkeeping mistake in either system becomes a wrong forecast, not a caught error — garbage in, garbage out, same as any other model.
Verified repos
Firefly III — AGPL-3.0, 24.1k stars, active (August 2026)
Invoice Ninja — Elastic License 2.0, 9.7k stars, active (latest release May 2026)
n8n — Sustainable Use License (free for internal business use), 188.9k stars, active (May 2026)
Get the next blueprint as it publishes — free, practical, verified tooling only.
Get this blueprint tailored to your business — free
Tell us what you run and where. We research your sector's specifics — rules, tools, customer habits — and send you a version of this blueprint rebuilt for your situation, usually within 24 hours.