Track expenses via chat with Claude Haiku and Google Sheets

πŸ’° AI Expense Tracker β€” Chat to Track Spending Instantly

Track your expenses by chatting naturally. No forms, no apps β€” just type and it's saved.

πŸ“– Description

This workflow turns a simple chat interface into a powerful personal expense tracker. Just describe your spending in plain language β€” the AI understands it, categorizes it, and saves it to Google Sheets automatically.

Example inputs the AI understands: spent 500 on lunch uber 150 paid 1200 electricity bill lunch in feb 25 cost 500 ← handles past dates too netflix 499 $50 hotel booking ← detects currency

No rigid formats. No dropdowns. Just type naturally.

✨ Key Features

Natural language input** β€” type expenses exactly how you'd say them AI-powered parsing** β€” Claude Haiku extracts amount, category, date, currency automatically 9 auto-detected categories** β€” Food, Transport, Shopping, Bills, Entertainment, Health, Business, Education, Other Multi-currency support** β€” INR, USD, EUR, GBP Past date handling** β€” "lunch in feb 25 cost 500" saves to February 2025, not today Running monthly total** β€” each row stores the cumulative month total Monthly summary** β€” type SUMMARY or summary february for any month Works on empty sheet** β€” no errors on first use Invalid input handling** β€” friendly error if no amount detected

πŸ’¬ Commands

| What you type | What happens | | :--- | :--- | | spent 500 on lunch | βœ… Saved: πŸ• Food & Dining β€” Lunch Β· β‚Ή500 | | uber 150 | βœ… Saved: πŸš— Transport β€” Uber Β· β‚Ή150 | | 1200 electricity bill | βœ… Saved: πŸ’‘ Bills & Utilities Β· β‚Ή1200 | | lunch in feb 25 cost 500 | βœ… Saved to February 2025 correctly | | SUMMARY | πŸ“Š Current month report with breakdown | | summary february | πŸ“Š February report (current year) | | summary february 2025 | πŸ“Š February 2025 specific report | | HELP | πŸ“– Shows all commands and categories |

πŸ›  Setup Requirements

  1. Google Sheet

Create a new Google Sheet with these exact headers in Row 1:

| Col | Header | | :---: | :--- | | A | Date | | B | Amount | | C | Category | | D | Description | | E | Currency | | F | Month | | G | Raw Message | | H | Total |

  1. Credentials needed

| Credential | Used for | Free? | | :--- | :--- | :--- | | Anthropic API | Claude Haiku AI parsing | Paid (very low cost) | | Google Sheets OAuth2 | Read & write expenses | Free |

  1. After importing

Connect your Anthropic credential to the Claude Haiku node Connect your Google Sheets credential to all sheet nodes Update the Sheet ID in all Google Sheets nodes to point to your sheet Open the workflow chat and type your first expense

πŸ— How It Works

You type: "spent 500 on car wash" ↓ Detect Intent β†’ classified as: expense ↓ Read All Expenses β†’ loads sheet (works even if empty) ↓ Prepare Data β†’ calculates existing month total ↓ AI Parse Expense (Claude Haiku) β†’ amount: 500 β†’ category: Transport β†’ description: Car wash β†’ date: today β†’ currency: INR ↓ Parse & Total β†’ derives Month from parsed date β†’ computes new running total ↓ Is Valid? (amount > 0 and is_expense = true) βœ… YES β†’ Save to Sheet β†’ Reply with confirmation ❌ NO β†’ Ask user to include an amount

Summary flow:

You type: "summary february" ↓ Detect Intent β†’ classified as: summary ↓ Read for Summary β†’ loads all rows ↓ Build Summary β†’ detects "february" in message β†’ filters rows by February (current year) β†’ calculates total, breakdown by category, daily avg ↓ Returns formatted report

πŸ“Š Sample Summary Output

πŸ“Š March 2026 Report

πŸ’³ Total: β‚Ή8,450 πŸ“ Entries: 12 πŸ“ˆ Daily avg: β‚Ή470 πŸ” Top: πŸ• Food & Dining

Breakdown: πŸ• Food & Dining: β‚Ή3,200 (38%) πŸš— Transport: β‚Ή1,800 (21%) πŸ’‘ Bills & Utilities: β‚Ή1,200 (14%) πŸ›οΈ Shopping: β‚Ή1,050 (12%) 🎬 Entertainment: β‚Ή800 (9%) πŸ₯ Health: β‚Ή400 (5%)

πŸ“‚ Auto-Detected Categories

| Emoji | Category | Example keywords | | :---: | :--- | :--- | | πŸ• | Food & Dining | lunch, dinner, restaurant, zomato, swiggy, grocery | | πŸš— | Transport | uber, ola, petrol, metro, flight, car wash, parking | | πŸ›οΈ | Shopping | amazon, flipkart, clothes, electronics, shoes | | πŸ’‘ | Bills & Utilities | electricity, wifi, rent, recharge, emi, gas | | 🎬 | Entertainment | netflix, movie, spotify, concert, gaming | | πŸ₯ | Health | medicine, doctor, gym, pharmacy, hospital | | πŸ’Ό | Business | office, software, domain, hosting, tools | | πŸ“š | Education | course, books, tuition, udemy, fees | | πŸ’° | Other | anything that doesn't match above |

βš™οΈ Workflow Nodes

| Node | Type | Purpose | | :--- | :--- | :--- | | When chat message received | Chat Trigger | Entry point | | Detect Intent | Code | Classify: expense / summary / help | | Intent Switch | Switch | Route to correct path | | Read All Expenses | Google Sheets | Load rows (alwaysOutputData: true) | | Prepare Data | Code | Compute month total, handle empty sheet | | AI Parse Expense | LLM Chain | Extract fields using Claude Haiku | | Claude Haiku | Anthropic Model | AI model for parsing | | Parse & Total | Code | Validate, derive month, compute total | | Is Valid Expense? | IF | Check amount > 0 | | Save Expense to Sheet | Google Sheets | Append new row | | Reply Saved | Code | Format confirmation message | | Reply Invalid | Code | Request amount from user | | Read for Summary | Google Sheets | Load all rows for report | | Build Summary | Code | Filter by month, compute breakdown | | Send Help | Code | Return command reference |

πŸ”§ Customisation Ideas

Add a budget alert** β€” warn when monthly total exceeds a set limit Telegram integration** β€” replace chat trigger with Telegram bot WhatsApp integration** β€” use Twilio WhatsApp as the input channel Weekly digest** β€” add a Schedule Trigger for automatic weekly reports Multi-user** β€” store user ID with each row to support team expense tracking Export to PDF** β€” generate monthly expense report as a PDF

⚠️ Important Notes

The Read All Expenses node has Always Output Data enabled β€” this is required so the flow works on an empty sheet Month is derived from the parsed date, not today's date β€” so past-dated entries file correctly The Total column stores the running month total at the time of each entry β€” it does not update retroactively if you delete rows

πŸ“¦ Requirements Summary

n8n (cloud or self-hosted) Anthropic API key (Claude Haiku β€” very low token usage) Google account with Sheets access

Built with n8n Β· Claude Haiku Β· Google Sheets By Nirav Gajera

0
Downloads
0
Views
8.38
Quality Score
beginner
Complexity
Author:Nirav Gajera(View Original β†’)
Created:4/2/2026
Updated:4/2/2026

πŸ”’ Please log in to import templates to n8n and favorite templates

Workflow Visualization

Loading...

Preparing workflow renderer

Comments (0)

Login to post comments