Automated workflow · n8n + Claude

Budget Variance & Forecast

Feed in a period's budget line items — budgeted vs. actual, plus whatever notes finance already has — and get back a severity call, a plain-English explanation, a next-period forecast, and a drafted message to the owner, for every single line.

2
alert
2
watch
2
ok

Deterministic math, then Claude's judgment

The variance percentage and severity aren't left to the model to compute — a code node calculates them first, along with a simple statistical baseline forecast (an average of actuals). Claude never sees a blank slate; it explains, refines, and drafts, but it doesn't do the arithmetic.

Ok · 0–5%
Watch · 5–15%
Alert · 15%+
Ok
Actual is within 5% of budget in either direction — normal noise, nothing to review.
Watch
5–15% variance — worth a note to the owner, not worth an alarm.
Alert
Over 15% variance in either direction — needs an explanation and, if it's an overage, a corrective plan.
Computed deterministically (code node)
Variance $ and %, direction, severity tier, and a naive baseline forecast (average of this period's actual plus any prior periods given). Same inputs always produce the same numbers — no LLM variance on the math.
Judged by Claude
Why the variance likely happened (using any notes provided), whether next period should actually look like the baseline or be adjusted for context (a one-time spike vs. a new run-rate), and a message to the owner toned to the severity.

How a period moves through it

One straight path from intake to analysis, then the array of line items splits into individual items that fan out to two places at once: the archive, and the response.

01 · trigger
Budget Forecast Webhook
POST /webhook/budget-forecast receives a period label and an array of budget line items.
02 · normalize
Normalize Input
Cleans the payload; defaults a missing line-item array to empty rather than erroring.
03 · deterministic
Compute Variance & Baseline Forecast
A code node computes variance $/%, direction, severity, and a naive average-based forecast for every line item — no LLM involved yet.
Analyze Variance & Forecast
Claude explains each variance, refines the forecast using qualitative context, and drafts the follow-up message — all in one call.
04 · fan out
Split Out Line Items
Turns the one analyzed array into separate items, one per line item.
Flatten Line Item
Lifts each item's fields to the top level for downstream nodes.
for every item, in parallel
Save Line Item
Archived to the budget_variance_forecast Data Table, one row per line item.
Collect Line Items
Re-combines every item back into a single array.
Respond With Analysis
Sends the full analysis — variance, severity, forecast, drafted message — back in one response.

Six line items, analyzed live

The departments, categories, and dollar figures below are made-up test data, not a real company's books. The variance math is deterministic (not AI); the explanations, forecasts, and drafted messages are genuine, unscripted Claude output — each one is what it actually produced from running that line item through the live workflow.

Digital Advertising
Marketing · Q3 FY2026 · owner: Nadia Ellis
Alert
Budget vs. actual
Budgeted: $50,000
Actual: $68,000
Variance
+$18,000 +36%
Explanation
An unplanned holiday campaign drove spend 36% above budget. It outperformed expectations, but leadership has signaled intent to sustain the higher spend into Q4 — a deliberate shift in run-rate, not a one-time overage.
Forecast — next period
$68,000 — held at the actual rather than reverted to budget, since the owner explicitly stated intent to sustain the higher spend.
Automated message · Slack/email alert to owner
Alert → Nadia Ellisauto-drafted
🚨 URGENT — Digital Advertising | Q3 FY2026 Overage Alert Hi Nadia, Digital Advertising closed Q3 at $68,000 against a $50,000 budget — a $18,000 (36%) overage. We understand this was driven by an unplanned holiday campaign, and we're glad to hear it outperformed expectations. However, because this was outside the approved budget, we need the following before Q4 planning is finalized: 1. A brief written summary of the campaign rationale and results. 2. Confirmation (or a revised budget request) for the planned sustained spend of ~$68,000 in Q4, so Finance can update the forecast and secure appropriate approvals. Please respond by [DATE]. Thank you for your prompt attention to this.
Cloud Infrastructure
Engineering · Q3 FY2026 · owner: Priya Chandran
Alert
Budget vs. actual
Budgeted: $80,000
Actual: $97,000
Variance
+$17,000 +21.25%
Explanation
A mid-quarter viral feature launch drove a sharp, sustained increase in traffic and therefore compute and data-transfer costs — a step-change in the run-rate rather than a temporary spike.
Forecast — next period
$97,000 — held at the actual, since elevated traffic is expected to persist rather than revert.
Automated message · Slack/email alert to owner
Alert → Priya Chandranauto-drafted
🚨 Urgent – Cloud Infrastructure Overage (Q3 FY2026) Hi Priya, Cloud Infrastructure spend came in at $97,000 against a $80,000 budget — an overage of $17,000 (21.25%). We understand the viral feature launch drove sustained higher traffic, but given the magnitude and the expectation that costs won't fully revert, this requires immediate attention. Could you please: (1) confirm your best estimate of the new steady-state monthly run-rate, (2) advise whether any architectural or cost-optimization measures (e.g., reserved instances, autoscaling tuning) are planned to bring spend down, and (3) confirm if a budget amendment request should be initiated for Q4? Please respond by end of week so we can update the Q4 forecast accordingly. Thank you, Finance
Content Production
Marketing · Q3 FY2026 · owner: Marcus Webb
Watch
Budget vs. actual
Budgeted: $15,000
Actual: $15,900
Variance
+$900 +6%
Explanation
The lead freelancer raised their day rate mid-quarter, only partially hitting Q3 costs — a structural increase whose full effect will land across a complete quarter going forward.
Forecast — next period
$16,400 — set above the Q3 actual since a full quarter at the new rate will land higher than the partial-quarter impact seen so far.
Automated message · Slack/email heads-up to owner
Heads-up → Marcus Webbauto-drafted
Hi Marcus, Heads-up on Content Production for Q3 — spend came in at $15,900 vs. a $15,000 budget, a $900 (6%) overage. We understand this was driven by the lead freelancer's mid-quarter rate increase. Something worth keeping an eye on: since the rate change only partially hit in Q3, we're forecasting the full-quarter impact could push Q4 spend to around $16,400. It may be worth reviewing the freelancer contract or assessing whether the current scope can absorb the new rate within budget — just so we don't see this drift wider over time. No immediate action required, but happy to chat if you'd like to think through options. Thanks!
Utilities
Facilities · Q3 FY2026 · owner: Renee Ashford
Alert
Budget vs. actual
Budgeted: $8,000
Actual: $9,400
Variance
+$1,400 +17.5%
Explanation
An extreme summer heat wave significantly elevated AC demand across all sites — a weather-driven, seasonal anomaly rather than a structural cost increase.
Forecast — next period
$8,200 — a modest buffer above budget, since the overage is expected to ease as temperatures normalize.
Automated message · Slack/email alert to owner
Alert → Renee Ashfordauto-drafted
⚠️ Hi Renee — urgent flag on Utilities for Q3 FY2026: actual spend came in at $9,400 against a $8,000 budget, a $1,400 overage (17.5%). We understand this was driven by the extreme summer heat wave and elevated AC usage across sites. Could you please confirm whether all sites are now normalizing, outline any steps being taken to manage consumption as we move into Q4, and flag immediately if costs do not begin trending back toward budget? We want to ensure this does not persist into next period. Thanks.
Software Licenses
Engineering · Q3 FY2026 · owner: Priya Chandran
Ok
Budget vs. actual
Budgeted: $12,000
Actual: $11,800
Variance
−$200 −1.67%
Explanation
No changes to the license mix this quarter — the negligible underage simply reflects stable, predictable costs with no unexpected additions or removals.
Forecast — next period
$11,800 — expected to hold steady with no planned changes to the license mix.
Automated message · Slack/email FYI to owner
FYI → Priya Chandranauto-drafted
Hi Priya, Just a quick note — Software Licenses came in at $11,800 for Q3, essentially right on budget ($12,000). No issues to flag here; the stable license mix is tracking exactly as expected. Nothing needed on your end — keep up the good work! Thanks, Finance
Office Rent
Facilities · Q3 FY2026 · owner: Renee Ashford
Ok
Budget vs. actual
Budgeted: $45,000
Actual: $45,000
Variance
$0 0%
Explanation
Fixed lease with no changes in place — spend matched budget exactly, as expected.
Forecast — next period
$45,000 — the lease is fixed with no anticipated changes.
Automated message · Slack/email FYI to owner
FYI → Renee Ashfordauto-drafted
Hi Renee — quick note that Office Rent came in exactly on budget at $45,000 for Q3 FY2026. Nothing to action here; just confirming everything is tracking as expected. Thanks!

Every line item gets a forecast and a message, not just the overages

The same Claude call that explains each variance and refines the forecast also drafts what happens next, toned to severity: an urgent alert for the two line items above 15% variance, a lower-key heads-up for the two in the 5–15% band, and a brief FYI for the two tracking close to budget. Nothing goes unaddressed — even the two line items that came in essentially on budget got a real drafted note, not silence.

What is budget_variance_forecast? It's a Data Table — a lightweight database built directly into this n8n workspace, not a separate external system. It lives inside this n8n project, viewable in n8n's own Data Tables screen and reachable by any other workflow in the same project. It isn't exposed to the public internet on its own — the only way anything outside n8n sees this data is through what a workflow deliberately sends back out, like the drafted messages above.
department category variance severity forecast notes
Marketing Digital Advertising +36% alert $68,000 Unplanned campaign, spend intentionally sustained into Q4.
Engineering Cloud Infrastructure +21.25% alert $97,000 Viral launch drove a sustained traffic step-change.
Marketing Content Production +6% watch $16,400 Mid-quarter freelancer rate hike, full effect still ahead.
Facilities Utilities +17.5% alert $8,200 Heat-wave driven, expected to ease next period.
Engineering Software Licenses −1.67% ok $11,800 No changes to license mix; stable run-rate.
Facilities Office Rent 0% ok $45,000 Fixed lease, no changes.

Going live: what changes outside this demo

Nothing here runs on a manual trigger in production. Real budget-vs-actual data has to reach this pipeline on a schedule, and the analysis has to land somewhere finance actually works from.

where the numbers already are
General ledger or FP&A tool
QuickBooks, NetSuite, or an FP&A platform's API/export pushes actuals vs. budget on a schedule (e.g. nightly, or on period close) instead of a manually pasted-in payload.
unchanged from this demo
This variance & forecast pipeline
Same compute → analyze → draft sequence shown above, running on the real period's line items instead of a synthetic one.
write-back
Forecast written back to the FP&A tool
The refined forecast and explanation get written onto the line item as a comment or forecast override — so the next budget cycle starts from an informed number, not a blank column.
human in the loop
Real Slack/email + a reviewed alert
"Ok" and "watch" notes can go out directly once trust is established. "Alert" messages land with the finance lead for a quick review before an owner sees a message demanding action.

Why not just use the FP&A tool's built-in variance reporting?

Adaptive Insights, Planful, Vena, and even a well-built spreadsheet already show budget-vs-actual variance and support rolling forecasts, and at a company with one of those in place and used well, this workflow isn't a replacement for it.

Where a custom pipeline like this earns its place: native variance reports show you the number and leave the explaining and outreach to a human — they don't read the qualitative notes finance already has, don't distinguish a one-time spike from a new run-rate when forecasting, and don't draft the actual message to the budget owner. This build is the shape you reach for when you want that explanation and outreach automated and tuned to your own severity thresholds, without migrating your budget into a new platform.