Every month the bank sends a PDF statement. Most people open it, check the balance, close it. The actual spending breakdown — how much went to dining, subscriptions, travel, groceries — stays invisible unless you do the manual work of reading through 80-120 transactions and categorizing them yourself.
Built a workflow that reads the statement the moment it arrives in Gmail, categorizes every transaction, calculates the savings rate, and posts a full monthly breakdown to Slack automatically.
What it does
Bank statement email arrives in Gmail → downloads PDF attachment → extracts every transaction with amount, description, date, balance → categorizes spending → calculates totals and savings rate → flags large transactions over $500 → logs monthly summary to Sheets → posts analysis to Slack
About 15-20 seconds per statement.
12 spending categories
The extraction prompt includes category rules for common merchants built directly into the schema:
-
Income — deposits, payroll, transfers in
-
Utilities — electric, gas, water, internet, phone (AT&T, Comcast, Verizon)
-
Groceries — Whole Foods, Trader Joe’s, Costco, Publix, supermarkets
-
Dining — restaurants, Starbucks, McDonald’s, DoorDash, Uber Eats
-
Shopping — Amazon, Target, Best Buy, Walmart, retail
-
Transport — Uber, Lyft, taxis, gas stations, parking
-
Travel — Delta, United, Hilton, Marriott, Airbnb, Booking.com
-
Subscriptions — Netflix, Spotify, Adobe, Apple, recurring monthly
-
Healthcare — CVS, Walgreens, doctors, Planet Fitness
-
Entertainment — AMC, concerts, streaming, games
-
Transfer — between accounts
-
Other — anything that doesn’t fit
What the analysis produces
Category totals sorted by spend:
The Analyze Spending Code node sorts categories by total amount and formats each with percentage of total spending.
Savings rate:
(totalIncome - totalSpending) / totalIncome × 100
Calculated automatically from income vs outgoing transactions.
Large transactions:
Any transaction over $500 gets listed separately — useful for catching unexpected charges or confirming big purchases landed correctly.
What lands in Slack
📊 Monthly Bank Statement Analysis
Period: March 1 - March 31, 2025
💰 Summary
• Income: $6,240.00
• Spending: $4,180.00
• Savings Rate: 33.0%
📈 Spending by Category
Dining: $847.20 (20.3%)
Groceries: $623.40 (14.9%)
Shopping: $544.80 (13.0%)
Subscriptions: $312.50 (7.5%)
Transport: $287.60 (6.9%)
Travel: $840.00 (20.1%)
Utilities: $380.00 (9.1%)
Healthcare: $124.50 (3.0%)
Other: $220.00 (5.3%)
⚠️ Large Transactions (>$500)
Mar 12: DELTA AIRLINES - $-840.00
Mar 28: AMAZON.COM - $-544.80
What lands in Google Sheets
Each row: Period Start, Period End, Opening Balance, Closing Balance, Total Income, Total Spending, Savings Rate %, Transaction Count, Processed Date
One row per statement. Track your savings rate month over month without opening a single PDF.
Setup
You’ll need:
-
Gmail (where bank statements arrive)
-
Google Sheets (free)
-
n8n instance (self-hosted — uses PDF Vector community node)
-
PDF Vector account (free tier: 100 credits/month)
-
Slack (for monthly analysis)
About 15 minutes to configure.
Download
Workflow JSON:
02-bank-statement-analyzer.json
Full workflow collection:
Setup Guide
Step 1: Get your PDF Vector API key
Sign up at pdfvector.com — free plan works for testing.
Step 2: Create your Sheet
Headers in Row 1:
Period Start | Period End | Opening Balance | Closing Balance | Total Income | Total Spending | Savings Rate % | Transaction Count | Processed Date
Step 3: Import and configure
Download JSON → n8n → Import from File.
Gmail Trigger + Get Statement Attachment:
-
Connect Gmail account (OAuth2)
-
Add a Gmail filter for emails from your bank if needed:
from:(bank.com) has:attachment
PDF Vector - Extract Statement:
-
Add credential (Bearer Token), paste API key
-
Uses
attachment_0— correct for Gmail attachments
Log Monthly Summary:
- Connect Google Sheets, paste Sheet ID
Send Analysis Report:
- Connect Slack, select your finance channel
Step 4: Customize merchant rules
The category rules are embedded in the extraction prompt. Open the PDF Vector node and add your specific bank’s common merchants. Example — if your grocery store isn’t in the list, add it.
Accuracy
Tested on statements from Chase, Bank of America, Wells Fargo, and credit union PDFs.
-
Transaction extraction (date, description, amount): ~96%
-
Category assignment: ~88% — strong on named merchants in the rules; uses “Other” for unrecognized merchants
-
Income vs withdrawal classification: ~97% — based on positive/negative amount
-
Large transaction detection: exact — pure arithmetic check against $500 threshold
Statements with non-standard formatting or unusual layouts may miss some transactions. Standard bank PDF exports work consistently.
Cost
Bank statements tend to be longer documents — 5-10 pages for an active account. Expect 15-30 credits per statement depending on transaction volume. Free tier covers 3-6 statements per month.
Customizing it
Add more merchant rules:
In the PDF Vector prompt, extend the category rules section with your specific merchants — your local grocery chain, gym, utility company.
Change the large transaction threshold:
In Analyze Spending Code node, find Math.abs(tx.amount) > 500 and change 500 to your threshold.
Track multiple accounts:
Add a second Gmail filter or Drive trigger for a second bank account. Route each to a separate Sheets tab using the account number from the extracted data.
Monthly budget alerts:
Add an IF node after Analyze Spending — if any category exceeds your budget threshold (e.g., Dining over $600), route to a separate Slack alert.
Limitations
-
Requires self-hosted n8n (PDF Vector is a community node)
-
Category rules are in the prompt — requires editing to match your merchant landscape
-
Transfers between your own accounts inflate both income and spending totals
-
Some banks encrypt their PDF statements — these won’t extract
Questions? Drop a comment.
