AI Powered Financial Statements Analysis:
- Sharif Aboulnaga

- Mar 15
- 8 min read
Updated: Mar 19
I built a $0.50 AI workflow that can classify 1,500 financial transactions in minutes and what does that means for anyone who works with money data at scale.
THE PROBLEM
Categorizing Transactions Is Slow, Tedious, and Surprisingly Expensive
If you've ever tried to get a real picture of your finances, or your clients' finances, you've probably run into the same wall. You export a spreadsheet from your bank or credit card portal. You open it. There are hundreds of rows and every single one of them looks something like this:
WM SUPERCENTER #4821 | $67.43 | 02/14/2026
AMZN MKTP US*1F3K9 | $23.99 | 02/15/2026
PAYMENT 98271-B | $1,200.00 | 02/15/2026
Is that last one a mortgage? A support payment? A contractor invoice? Without context, it's a puzzle. And solving hundreds or thousands of these puzzles manually, looking up merchants, deciding categories, staying consistent, takes hours. For a financial planner, that's billable time spent on clerical work. For an individual, it's a Sunday afternoon lost to a spreadsheet. And frankly, for those not familiar with how to use spreadsheets, this is a nightmare.
The status quo answer has been: use a tool like Mint or YNAB that auto-categorizes. But those tools work only within their own ecosystem, lock you into their category structures, and frequently miscategorize. You still end up reviewing and correcting row by row.
Alternatively, you can attempt to ask one of the chat agents to analyze a number of statements and come back with some form of output. This will get you mixed results. ChatGPT and Gemini chats aren’t able to produce the serious output needed to conduct true analysis on your financial statements due to their limitations when it comes to calculations vs. pattern recognition. This is an unreliable approach also.
There had to be a better way, one that was fast, accurate, cheap, and flexible enough to match a real household budget taxonomy.
THE SOLUTION
An AI Pipeline That Reads Your Transactions and Thinks Like a Financial Analyst
I built a workflow in n8n.io; an open-source automation platform, and wired to Anthropic's Claude Opus model. The idea is simple: rather than asking a human to read every transaction description and decide what bucket it belongs in, you ask an AI to do it in bulk.

Here's what makes it different from generic auto-categorization tools:
You define the categories. The system uses a fixed taxonomy of 15 spending categories and their subcategories; Housing, Transportation, Groceries, Medical, Entertainment, and more. Claude is instructed to use only those categories, with zero deviation.
It processes everything at once. When utilizing LLM’s to analyze information, there are constraints and setups that can affect the outcome (output token limit, model used, output format). In a typical scenario, one would think to send the LLM each row to analyze and categorize, but that puts an immense overhead on time and cost each time a row is sent. On top of that, if you send all rows at once, you end up with less accurate output. The perfect solution is; instead of calling the AI once per row, the workflow batches 100 transactions into a single prompt. Claude reads the entire batch, applies consistent logic, and returns the classifications in one response. Why? The model tends to produce erroneous output with a larger number of transactions. This includes bad characters, and token limitations that cut your output short causing downstream errors in your workflow.
It feeds directly into Google Sheets. N8n has many integrations. In this case, the input comes from a Google Sheet and the output is written to another. No new software to learn, no data exports to manage. The workflow fits into how most people already work with financial data. In this model, the inputs and outputs were developed in specific formats to ensure the integrity of the analysis.
THE VALUE
What You Can Actually Do With Categorized Data at Scale
The real value isn't just saving time on the categorization itself, it's what becomes possible once your transaction data is clean, labeled, and ready to analyze.
When 1,500 transactions are classified in minutes instead of hours, you can start asking questions that used to be too costly to answer:
Where is money actually going? Not where you think it's going, where it's actually going. Running a full year of transactions reveals patterns that monthly reviews miss entirely.
For advisors: onboard clients faster. Processing a new client's 12-month transaction history used to mean days of manual categorization. Now it's a form submission and a few minutes of processing.
For accountants and tax preparers: faster document prep. Categorized spending data feeds directly into budget reports, year-end summaries, and advisory conversations without requiring a spreadsheet overhaul first.
Categorized data isn't just organized, it's actionable. And the faster you can get there, the sooner you can get insight.

HOW IT WORKS
Nine Steps From Raw Transactions to Labeled Data
The workflow is a loop. You submit a form with two Google Sheet URLs, one for input transactions, one for the output. From there, the automation handles everything.
1 | Form Submission: Starting Point A simple web form collects the input and output Google Sheet URLs. No technical setup required each time, just paste two links and submit. |
2 | Read the Source Sheet The workflow reads every row from the 'Transactions' tab of the input sheet, Date, Description, and Amount for each entry. |
3 | Batch Into Groups of 100 All rows are divided into batches of 100. This is the sweet spot: large enough for efficiency, small enough to stay within the AI model's ideal operating range. |
4 | Aggregate Into a Single Object Each batch of 100 individual rows is collapsed into a single JSON string. This is the key insight that makes batch processing work, the AI sees all 100 rows at once, not one at a time. The AI is smart enough to know that this is a dataset with multiple rows. |
5 | Claude Analyzes & Classifies The aggregated data is sent to Claude Opus with a detailed prompt. Claude reads each transaction, applies the approved category taxonomy, and returns the full dataset with Category and Subcategory fields added to every row. |
6 | Parse & Clean the Response A JavaScript node strips any stray formatting from the AI response and parses it into a clean JSON array, ready to write to the sheet. |
7 | Split Back Into Individual Rows The array is expanded back into individual items so each transaction can be written to the output sheet as its own row. |
8 | Write to the Output Sheet Each row, now carrying its Category and Subcategory, is appended to the output Google Sheet. Existing data is never overwritten. |
9 | Loop Until Done The workflow loops back to process the next batch automatically. A dataset of 1,500 transactions becomes 15 batches, processed sequentially without any manual intervention. |
ANALYZING YOUR OUTPUT
Follow Up With Personalized Analysis

The output contains all transactions with categories and subcategories. It’s not enough to just have the list. You need to be able to work with this data. I’ve experimented with a chat model to produce recommendations and flag transactions, however I’ve found that attempting to produce this resulted in mixed results. This wasn’t reliable for an appropriate analysis. As a workaround, I customized the output sheet template to include a pivot table and a customized summary tab. Running my own transactions, I was able to flag categories, and look at the source data. This was incredibly helpful and time saving.
THE COST
$0.50 to Classify 1,500 Transactions. Let That Sink In.
This is where the value proposition becomes almost absurd. To process 1,500 financial transactions through this workflow, 15 batches of 100, each analyzed by Claude Sonnet 4.5, the total API cost is approximately $0.50. Running the same batch using Claude Opus, the cost was approximately $2.30
COST TO CLASSIFY 1,500 TRANSACTIONS CLAUDE SONNET ~$0.50 | COST TO CLASSIFY 1,500 TRANSACTIONS CLAUDE OPUS ~$2.30 |
Compare that to the alternatives:
4-8 hrsManual categorization time for 1,500 rows | $200+Equivalent labor cost at $30–50/hr professional rate | $0.50-$2.30This workflow's total AI cost for the same job |
For financial advisors or accountants who process dozens of clients per year, the math is striking. If each client requires two to three hours of transaction categorization work, and you have 20 clients, that's 40 to 60 hours of clerical work per year. This workflow doesn't eliminate judgment, it eliminates the tedium, handing you clean data so your judgment can be applied where it actually matters.
Additionally, the ROI is compounded further! You’re not limited to 1500 transactions. You can run thousands of transactions spanning several years to produce your output.
You aren’t limited in how many transactions you can run. You can run thousands of transactions for a single household.
WHAT IT TOOK TO BUILD
The Engineering Decisions That Make It Work
Building this workflow wasn't just a matter of connecting Claude to a spreadsheet. Several non-obvious design decisions make the difference between a system that works reliably and one that breaks on edge cases. This includes every single non-AI node, the settings of each node, the developed input/output sheets used, and fine-tuned configurations of each node.
Batch Aggregation
The biggest efficiency gain comes from how data is passed to the AI. In most n8n workflows, nodes process items one at a time, which would mean one Claude API call per transaction. At 1,500 transactions, that's 1,500 API calls, each with its own system prompt overhead. Slow, expensive, and unnecessary.
Instead, the workflow uses an Aggregate node to collapse a batch of 100 rows into a single JSON string before handing it to Claude. The AI receives all 100 transactions as one object, processes them holistically, and returns a single classified array. This approach is not only faster, it also allows Claude to detect patterns across rows, such as recurring merchants or duplicate entries, that would be invisible in a one-row-at-a-time flow.
Prompt Optimization
Getting Claude to return consistent, parseable JSON, every time, across every batch, required careful prompt construction. The final prompt instructs Claude to act as a financial data analyst, enforces a zero-tolerance policy on inventing new categories, specifies an exact fallback (Miscellaneous / Other Miscellaneous) for ambiguous transactions, and demands raw JSON output with no Markdown formatting.
That last requirement, no Markdown, no code fences, sounds simple but proved to be the most fragile element. Language models have a strong habit of wrapping JSON in code fences (```json ... ```) even when instructed not to. The JavaScript cleanup node exists precisely to handle this: it strips any such formatting before attempting to parse the response.
The Loop Architecture
Handling datasets of arbitrary size required a loop structure. The Split in Batches node divides the full transaction list into chunks of 100, and after each chunk is processed and written to the output sheet, execution returns to the loop node to pick up the next chunk. This pattern means the workflow scales gracefully, 50 transactions or 5,000, the logic is identical.
Data Integrity Considerations
A few practical constraints emerged during development. The input sheet tab must be named exactly 'Transactions', the workflow doesn't attempt to discover the tab name dynamically. Transaction descriptions with special characters (unescaped quotes, ampersands) can break JSON parsing in the cleanup node. And if the same input data is submitted twice to the same output sheet, rows will be duplicated, there's no deduplication logic built in. These are known trade-offs, not bugs, and they're documented to set clear expectations for users.
Structured Input and Output
It’s crucial to have structure surrounding the LLM used that is fixed, predictable, well defined, and reliable. It took many iterations to produce the right input/output that resulted in predictable outcomes. In this case, I utilized Google Sheets to act as my input and output. You have other alternatives to choose from if you decide, such as seeding a database with the financial transactions inputs that gets updated with the categorizations which can be queried in a terminal or reporting tool.
IN CONCLUSION
The Real Cost of Manual Work Is Opportunity Cost
The conversation around AI in finance tends to focus on sophisticated applications: predictive modeling, fraud detection, algorithmic trading. But some of the highest-value applications are far more mundane. Automating the slow, repetitive, error-prone work that sits between raw data and real insight.
Categorizing financial transactions is exactly that kind of work. It doesn't require creativity or judgment, it requires consistency, pattern recognition, and a lot of patience. These happen to be things AI is exceptionally good at.
At $0.50 per 1,500 transactions, with a setup that runs in minutes on infrastructure most people already use, Google Sheets and a web browser, this workflow represents the kind of practical, accessible AI application that doesn't require a data science team or an enterprise budget. It requires a form submission and about five minutes.



Comments