AI-Powered Personal Budget and Expense Tracker using Google Sheets - n8n Workflow

Use this comprehensive n8n workflow to track personal finances, manage budgets, and receive automated alerts via an AI Agent using Google Sheets. A crucial n8n templates for finance automation.

Workflow Preview

Ready to automate?

Download this n8n workflow template and start using it instantly.

Who is this best for?

Users building AI agents or chatbots that require real-time finance data manipulation.
Technical users who want robust, customizable budget automation.
Developers looking for advanced examples of n8n templates integrating AI tools with Google Sheets.
Anyone needing a powerful n8n workflow to manage personal financial tracking.

Overview

This sophisticated automation transforms a simple Google Sheet into a powerful personal finance database managed by an AI agent. Using specialized n8n node tooling (Multi-Component Pipeline or MCP), this n8n workflow allows an AI client to perform complex operations like adding transactions, updating budgets, and checking spending limits automatically. The system not only records income and expenses but also actively monitors budget categories, generating warnings if an expense exceeds the predefined monthly limit. This template showcases how advanced data logic can be implemented within an n8n environment, providing a solid foundation for complex AI-driven data management tasks.

How it Works

The core of this n8n workflow starts with the MCP Server Trigger, which receives execution commands (functions like addtransaction, updatebudget, or listtransaction) and their associated data payload from an AI agent.


  1. Trigger & Routing: The input data (containing the desired function and payload) is captured and then routed via a Switch n8n node to the appropriate operational branch.

  2. Transaction Management (addtransaction): A new unique ID is generated using the Crypto n8n node. The transaction is added to the Google Sheets 'transactions' tab. If the transaction is an 'expense', the workflow then checks the 'budgets' tab using the Get existing budget node. If a budget exists, the total monthly expenses for that category are calculated. A final Code n8n node determines if a budget alert or warning needs to be issued back to the AI client.

  3. Budget Operations (addbudget, updatebudget, removebudget): These branches utilize Google Sheets to check for existing budget entries by month and category. The logic includes conditional execution (If nodes) to prevent duplicates or provide feedback if the item to be updated or removed does not exist, ensuring data integrity.

  4. Transaction Listing (listtransaction): This is optimized based on the date range. If the start and end dates fall within the same month, the search is faster (filtered by the 'month' helper column). If not, all transactions are pulled, followed by a local Filter n8n node to adhere to the requested date range, showcasing smart data handling within the n8n template.

Installation Guide

To deploy this comprehensive n8n workflow, follow these steps:


  1. Import the n8n template: Copy the provided JSON and import it directly into your n8n instance.

  2. Google Sheets Setup: You need a dedicated spreadsheet for this n8n automation. The sticky note suggests copying the provided template structure (sheets named transactions and budgets).

  3. Credential Configuration: Set up the Google Sheets OAuth2 API credentials. This is crucial for all Google Sheets n8n node operations. Ensure the Google account has read/write access to the configured spreadsheet.

  4. Configure Google Sheet Nodes: For every Google Sheets n8n node in this workflow:

Change the 'Document' source to 'By URL'.
Paste the URL of your copied Google Sheet.
* Ensure the target 'Sheet' parameter is set correctly (either transactions or budgets) based on the node's function.

  1. MCP Trigger Activation: Activate the MCP Server Trigger to register the webhook URL, allowing your external AI agent to communicate with this powerful n8n workflow.

Node Details

MCP Server Trigger: The entry point and primary n8n trigger for the AI agent. It registers a webhook endpoint (/personal-expense) to receive commands (function name and payload) that drive the entire system.
Google Sheets (Multiple Instances): Used extensively for CRUD operations on both 'transactions' and 'budgets' sheets. Operations include append (add transaction/budget), delete (remove transaction/budget), and read (get data for listing, filtering, and row number retrieval).
Switch n8n node: Acts as the central router, branching the n8n workflow execution based on the incoming function parameter (e.g., addtransaction, updatebudget).
Filter n8n node: Used in the list_transaction path to perform precise date-based filtering on transactions retrieved from Google Sheets.
If n8n node (Conditional Logic): Highly utilized throughout the n8n template, particularly for checking if a budget already exists or if a transaction type is 'expense' (triggering budget checks).
Code n8n node (Custom Scripting): Essential for complex data manipulation. Examples include calculating total monthly expenses, determining remaining budget limits, and formatting the final output response, including the task field which directs the AI agent on next steps (e.g., 'Give warning to user').


  • Crypto n8n node: Generates a unique ID (UUID) for every new transaction, ensuring unique identifiers across the Google Sheet database.

Related n8n Workflows

Free

Nodes: 12 Nodes
Updated: December 26 2025
View all
Created by
Destiya Wijayanto
Destiya Wijayanto

Featured*