Skip to main content

Track expenses via chat with Claude Haiku and Google Sheets

Workflow preview

Workflow preview
100%
Track expenses via chat with Claude Haiku and Google Sheets preview
Open on n8n.io

1. Workflow Overview

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 in...

Best for

  • Personal Productivity automation workflows
  • AI Chatbot automation workflows
  • advanced n8n builders looking for reusable templates

Tools used

@n8n/n8n-nodes-langchain.chattrigger, n8n-nodes-base.code, n8n-nodes-base.switch, n8n-nodes-base.googlesheets, @n8n/n8n-nodes-langchain.chainllm, @n8n/n8n-nodes-langchain.lmchatanthropic, n8n-nodes-base.if, n8n-nodes-base.stickynote

Source and attribution

This workflow is cataloged by N8N Workflows and links back to its original n8n.io source page by Nirav Gajera.

Original n8n.io source

1.1 Workflow description

Title
Track expenses via chat with Claude Haiku and Google Sheets
Workflow name
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

2. Credentials needed

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

3. After importing

  1. Connect your Anthropic credential to the Claude Haiku node
  2. Connect your Google Sheets credential to all sheet nodes
  3. Update the Sheet ID in all Google Sheets nodes to point to your sheet
  4. 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

1.2 Logical Blocks

This catalog entry is organized from the workflow JSON. The node-level section below shows the executable blocks available for review before importing the template.

2. Block-by-Block Analysis

Block 1 - When chat message received

Type / Role
@n8n/n8n-nodes-langchain.chatTrigger - chatTrigger
Config choices
Version 1.1

Block 2 - Detect Intent

Type / Role
n8n-nodes-base.code - code
Config choices
Version 2

Block 3 - Intent Switch

Type / Role
n8n-nodes-base.switch - switch
Config choices
Version 3.2

Block 4 - Read All Expenses

Type / Role
n8n-nodes-base.googleSheets - googleSheets
Config choices
Version 4.5

Block 5 - Prepare Data

Type / Role
n8n-nodes-base.code - code
Config choices
Version 2

Block 6 - AI Parse Expense

Type / Role
@n8n/n8n-nodes-langchain.chainLlm - chainLlm
Config choices
Version 1.4

Block 7 - Claude Haiku

Type / Role
@n8n/n8n-nodes-langchain.lmChatAnthropic - lmChatAnthropic
Config choices
Version 1.3

Block 8 - Parse & Total

Type / Role
n8n-nodes-base.code - code
Config choices
Version 2

Block 9 - Is Valid Expense?

Type / Role
n8n-nodes-base.if - if
Config choices
Version 2.1

Block 10 - Save Expense to Sheet

Type / Role
n8n-nodes-base.googleSheets - googleSheets
Config choices
Version 4.5

Block 11 - Reply Saved

Type / Role
n8n-nodes-base.code - code
Config choices
Version 2

Block 12 - Reply Invalid

Type / Role
n8n-nodes-base.code - code
Config choices
Version 2

Block 13 - Read for Summary

Type / Role
n8n-nodes-base.googleSheets - googleSheets
Config choices
Version 4.5

Block 14 - Build Summary

Type / Role
n8n-nodes-base.code - code
Config choices
Version 2

Block 15 - Send Help

Type / Role
n8n-nodes-base.code - code
Config choices
Version 2

Block 16 - Overview

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 17 - Trigger Note

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 18 - Intent Note

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 19 - Switch Note

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 20 - Read Note

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 21 - Prepare Note

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 22 - AI Note

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 23 - Parse Note

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 24 - Valid Note

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Showing the first 24 of 27 workflow blocks. Download the JSON for the full node graph.

3. Summary Table

Workflow Track expenses via chat with Claude Haiku and Google Sheets
Complexity advanced
Nodes 27
Categories Personal Productivity, AI Chatbot
Author Nirav Gajera
Published 18 Mar 2026

4. Reproducing the Workflow from Scratch

  1. 1. Download the workflow JSON

    Use the JSON export at /data/workflows/14135/14135.json as the source template for this automation.

  2. 2. Import the template into n8n

    Open n8n, import the downloaded JSON, and review each node before activating the workflow.

  3. 3. Configure credentials and variables

    Replace placeholder credentials, API keys, webhook URLs, account IDs, and environment-specific values with your own settings.

  4. 4. Test with sample data

    Run the workflow manually or in a staging workspace, inspect node output, and confirm downstream systems receive the expected data.

  5. 5. Activate and monitor

    Enable the workflow only after testing, then monitor executions, errors, and rate limits during the first production runs.

5. General Notes & Resources

Review imported nodes carefully before activation. This catalog entry is intended to help you inspect the workflow structure, understand required services, and find related templates faster.

Node names, credentials, schedules, webhook paths, and external service limits may need adjustment for your workspace.

Frequently asked questions

What does Track expenses via chat with Claude Haiku and Google Sheets do?

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 in...

What do I need before importing this workflow?

Review the workflow JSON, configure any required credentials in n8n, and test the automation in a safe workspace before using it in production.

Can I customize this workflow?

Yes. Use the block-by-block analysis and the downloadable JSON to inspect each node, then adjust credentials, prompts, schedules, filters, or destinations for your Personal Productivity, AI Chatbot use case.