This tutorial has a starter workflow file.

Open it directly in the app to follow along.

Open in app

Tutorial: Bank Transaction Categorization


1. Overview

In this tutorial you will build a workflow that reads a bank statement, uses AI to categorize each transaction into a GL account, and produces a categorized report with totals by category. This is the kind of work a bookkeeper does every month — and the workflow does it in seconds.

You won't write any code. You'll paste a bank statement into your workspace, describe what you want in plain English, and let the app build and run the workflow for you.

What you'll end up with:

  • A workflow you can re-run any time you get a new bank statement
  • AI-categorized transactions with GL account codes
  • A summary report showing totals by category
  • A detailed HTML report you can download or preview

Time: About 10 minutes.

Skip to result: Download the finished bank_categorization.wfp and open it in the app to see the completed workflow without building it yourself.


2. Background

Why this matters

Every month, bookkeepers download bank statements and manually categorize each transaction — is this Starbucks charge a meal or a client meeting? Is this transfer payroll or a loan payment? Is this $47.99 subscription a software expense or an office supply?

In a spreadsheet, this means scrolling through hundreds of rows, typing account codes, and hoping you're consistent. The same vendor might get categorized differently depending on the day.

What the workflow does instead

You give the app your bank statement and a chart of accounts. The AI reads each transaction description and assigns the most appropriate GL account. Then it builds a report showing what went where, with totals by category so you can review the results before posting.

When next month's statement comes in, you paste it in and run the same workflow again. The AI applies the same judgment consistently.

About the sample data

The sample data below represents one month of bank transactions for a small consulting firm. There are 25 transactions across typical business categories. Buried in the data are several ambiguous items that test the AI's judgment:

  • A Starbucks charge that could be meals or client entertainment
  • An Amazon purchase that could be office supplies or software
  • A transfer that could be payroll or owner's draw
  • Subscription charges that span different categories
  • A refund that needs to be categorized correctly

3. Sample Data Files

Add the following files to User Data.

bank_statement — Add this to User Data

date,description,amount,type
2025-03-01,Deposit - Client Payment Acme Corp,8500.00,credit
2025-03-02,Starbucks #4521 Seattle,14.75,debit
2025-03-03,Amazon Web Services,249.99,debit
2025-03-04,Comcast Business Internet,189.00,debit
2025-03-05,Square Payroll,6200.00,debit
2025-03-06,Office Depot - Printer Paper,67.43,debit
2025-03-07,Uber - Trip to Client Site,34.50,debit
2025-03-08,Deposit - Client Payment Birch LLC,3200.00,credit
2025-03-10,Adobe Creative Cloud,54.99,debit
2025-03-11,Delta Airlines - SFO to LAX,387.00,debit
2025-03-12,Marriott Hotels - Los Angeles,219.00,debit
2025-03-13,Uber Eats - Team Lunch,89.20,debit
2025-03-14,AT&T Wireless,156.00,debit
2025-03-15,Square Payroll,6200.00,debit
2025-03-17,Google Workspace,14.40,debit
2025-03-18,Deposit - Client Payment Cedar Inc,5750.00,credit
2025-03-19,Amazon.com - Office Chair,299.99,debit
2025-03-20,State Farm Insurance,420.00,debit
2025-03-21,City Parking Garage,45.00,debit
2025-03-22,FedEx Shipping,23.80,debit
2025-03-24,Deposit - Refund from Delta Airlines,387.00,credit
2025-03-25,Zoom Pro Monthly,15.99,debit
2025-03-26,WeWork Coworking March,650.00,debit
2025-03-28,Transfer to Savings,2000.00,debit
2025-03-31,Bank Service Charge,12.00,debit

chart_of_accounts — Add this to User Data

account_code,account_name,category
1000,Cash - Operating,Asset
1100,Cash - Savings,Asset
1200,Accounts Receivable,Asset
4000,Consulting Revenue,Revenue
4100,Other Revenue,Revenue
5000,Payroll & Benefits,Expense
5100,Rent & Office Space,Expense
5200,Office Supplies,Expense
5300,Software & Subscriptions,Expense
5400,Travel & Transportation,Expense
5500,Meals & Entertainment,Expense
5600,Telecommunications,Expense
5700,Insurance,Expense
5800,Professional Services,Expense
5900,Shipping & Postage,Expense
6000,Bank Fees,Expense
6100,Miscellaneous Expense,Expense
9000,Owner's Draw,Equity
9100,Owner's Contribution,Equity

4. Building the Workflow

Once your two data files are saved, go to the Dashboard and type the following into the chat:

I have a bank statement and a chart of accounts in my workspace. Build me a workflow that:

  1. Reads the bank_statement data
  2. Uses AI to categorize each transaction to the most appropriate GL account from chart_of_accounts
  3. Produces a categorized report showing every transaction with its assigned account, plus a summary section with totals by category

That's it. The app will show you a plan first — review it and say "go ahead" to build.


5. Checking Your Results

Once the workflow runs, you should see a download button in the chat. Open the report and verify the following.

Categorization accuracy

Check that the AI made reasonable category assignments:

  • Starbucks → should be 5500 Meals & Entertainment (not Office Supplies)
  • Amazon Web Services → should be 5300 Software & Subscriptions (cloud hosting, not office supplies)
  • Amazon.com - Office Chair → should be 5200 Office Supplies (furniture, not software)
  • Square Payroll → should be 5000 Payroll & Benefits
  • Delta Airlines / Marriott / Uber trips → should be 5400 Travel & Transportation
  • Comcast / AT&T → should be 5600 Telecommunications
  • WeWork → should be 5100 Rent & Office Space
  • Transfer to Savings → could be 1100 Cash - Savings (asset transfer) or debatable
  • Delta refund → should match the original category or be credited appropriately
  • Bank Service Charge → should be 6000 Bank Fees

Summary totals

The summary section should show totals by category. Check that:

  • Revenue (deposits) totals to $17,837.00 (three client payments + one refund)
  • Payroll is the largest expense category at $12,400.00 (two payroll runs)
  • The individual category totals add up to the total debits

If something doesn't look right

The AI is making judgment calls, so results may vary slightly:

  • Ask the chat: "The Starbucks charge was miscategorized — it should be Meals, not Office Supplies"
  • Or: "Can you add a confidence score to each categorization?"
  • Or: "I'd like a separate column showing the account code and account name"

This is the normal workflow — describe what you want, check the result, and refine with follow-up requests.


6. What Makes This Different from the PO Reconciliation

The PO reconciliation tutorial uses deterministic matching — the workflow matches records using exact field comparisons (PO numbers, invoice references). No AI is needed at runtime.

This tutorial uses AI classification at runtime via api.llm.classify(). The AI reads each transaction description and makes a judgment call about which GL account fits best. This is the correct use of runtime AI — the task genuinely requires natural language understanding that can't be done with if/else logic.

The HTML report template is still built deterministically (no AI for formatting). Only the categorization step uses AI.


7. Saving Your Work

When you're happy with the results:

  1. Go to Workspace → User Data
  2. Click Export .wfp to save everything
  3. Next month, paste in a fresh bank statement and run the same workflow again

What's Next

Once you're comfortable with this workflow, try these ideas:

  • Add categorization rules — create a knowledge document with your firm's specific rules (e.g. "All Amazon charges under $100 are Office Supplies, over $100 are Equipment")
  • Chain with GL posting — add a step that posts the categorized transactions directly to the General Ledger
  • Multi-account support — if you have checking and credit card statements, build a workflow that processes both and combines the results
  • Monthly comparison — save each month's categorized data to the workspace and build a workflow that compares month-over-month spending by category