AI Agents

Smart expense tracking in Google Sheets via n8n chat

10 nodes 307 170 Automatic trigger
Download

Workflow Description

An AI agent listens to chat messages or posts, extracts expense details using OpenAI, automatically logs them to Google Sheets, and maintains conversation context in memory to recognize spending patterns.

How it works

  1. 1.Activate the AI agent when a message arrives in chat or X platform
  2. 2.Process the message with OpenAI model to extract amount, category, and description
  3. 3.Write the expense record to a new row in Google Sheets with timestamp
  4. 4.Retain conversation history in memory to improve pattern recognition over time
  5. 5.Send instant confirmation back to the user with the recorded expense details

Use cases

  • Log business expenses instantly without opening a spreadsheet
  • Track recurring spending patterns for budget management

Requirements

  • Active OpenAI API key with model access permissions
  • Shared Google Sheets file with edit access
  • n8n chat or X integration configured and running

Service Value

Ideal as a smart automation service combining integrations and AI to produce ready-to-use results.

Apps Used

AI Agent Chat Trigger Twitter/X OpenAI Memory Google Sheets Tool

Details

Trigger Automatic trigger
Nodes 10
Apps 7
Views 307
Downloads 170

How to Use

  1. 1.Click "Download Template"
  2. 2.Open your n8n dashboard
  3. 3.Go to Workflows > Import from File
  4. 4.Select downloaded file and configure credentials

Nodes Used (10)

AI Agent

Agent

#1

When chat message received

Chat Trigger

#2

Workflow Input Trigger

Execute Workflow Trigger

#3

OpenAI Chat Model

OpenAI

#4

Window Buffer Memory

Memory Buffer Window

#5

Sticky Note

Sticky Note

#6

OpenAI Chat Model1

OpenAI

#7

Expense text to JSON parser

Information Extractor

#8

Save expense into Google Sheets

Google Sheets

#9

Parse msg and save to Sheets

Tool Workflow

#10