🧾 Track invoice spending vs budget from Google Drive with GPT-4o and Telegram alerts

⚑ 45 views · 🧾 Invoice Processing

Description

Invoice Budget Tracker

Drop invoices to Google Drive and let AI handle the rest - OCR extraction, automatic categorization, budget tracking, and Telegram alerts when spending reaches thresholds.

✨ Key Features

🎯 How It Works

  1. Drop invoice to Google Drive watched folder:

    • PDF invoices
    • Image scans (JPG, PNG)
  2. AI processes automatically (hourly):

    • OCR extracts text via Ainoflow
    • AI detects if it’s actually an invoice (skips contracts, receipts, etc.)
    • Extracts: vendor, amount, date, invoice number
    • Categorizes based on service provided
    • Checks for duplicates
  3. Get organized:

    • File renamed: [2026-01-15] - Vendor (INV-123, 150.00 EUR).pdf
    • Moved to monthly folder: /Invoices/2026-01/
    • Budget updated, alerts sent if threshold reached
  4. Manage budgets via Telegram:

    • β€œSet budget Software 500”
    • β€œShow budgets”
    • β€œBudget status”

πŸ“‹ Expense Categories

Software, Marketing, Travel, Office, Professional Services, Infrastructure, Vehicle, Other

πŸ”§ Setup Requirements

πŸ—οΈ Workflow Architecture

SectionDescription
Document ProcessingHourly scan β†’ OCR β†’ AI categorization β†’ Budget tracking β†’ File organization
Budget ManagementTelegram bot for budget CRUD via AI Agent with MCP storage
Weekly ReportFriday summary of current month progress
Monthly Report10th of month detailed report for previous month
Data ResetManual trigger to delete all invoice data (requires approval)

πŸ’¬ Usage Examples

Invoice Processing

πŸ“„ Drop "invoice_aws.pdf" to /Invoices/
β†’ βœ… AWS | 150.00 EUR | Software
β†’ File: [2026-01-15] - AWS (INV-2026-01, 150.00 EUR).pdf
β†’ Moved to: /Invoices/2026-01/

πŸ“„ Drop "contract.pdf" to /Invoices/
β†’ ⚠️ Skipped: This is a service agreement, not an invoice
β†’ File renamed: [REVIEW] - contract.pdf

Budget Management (Telegram)

"Set budget Software 500"
β†’ βœ… Budget set: Software - €500/month

"Show budgets"
β†’ πŸ“‹ Monthly Budgets:
   β€’ Software: €500
   β€’ Marketing: €1000
   Total: €1500/month

"Budget status"
β†’ πŸ“Š January 2026:
   β€’ Software: €150/€500 (30%) βœ…
   β€’ Marketing: €850/€1000 (85%) ⚠️

Scheduled Reports

πŸ“… Weekly (Friday):
β†’ πŸ“Š Week Summary:
   Processed: 12 invoices
   Total: €2,450
   Top: Software €800, Marketing €650

πŸ“… Monthly (10th):
β†’ πŸ“ˆ January 2026 Report:
   Total: €4,200 (28 invoices)
   [β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–‘β–‘] Software 80%
   [β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–‘β–‘β–‘β–‘] Marketing 60%

πŸ“¦ Data Storage

Invoices stored in Ainoflow JSON Storage by month (key = SHA256 hash):

{
  "vendor": "Amazon Web Services",
  "vendor_normalized": "AWS",
  "amount": 150.00,
  "currency": "EUR",
  "date": "2026-01-15",
  "invoice_number": "INV-2026-01",
  "category": "Software",
  "file_id": "1BxiMVs0XRA5nFMd...",
  "processed_at": "2026-01-15T10:30:00Z"
}

⚠️ Important Notes

πŸ› οΈ Customization

Categories

Edit SetDefaults node β†’ allowed_categories Then send /start to re-register with new categories

Processing Thresholds

Edit WorkflowConfig node:

AI Models

Swap OpenRouter models in Gpt4oCategorizer and Gpt4oBudgetAgent nodes

πŸ’Ό Need Customization?

Want to adapt this template for your business? Custom integrations, multi-user support, or enterprise deployment?

Contact us at Ainova Systems - We build AI automation solutions for businesses.


Tags: google-drive, invoice-processing, budget-tracking, ai-agent, ocr, telegram, openrouter, mcp-tools, business-automation

πŸ”— Nodes Used

HTTP Request, Telegram, Telegram Trigger, Google Drive, Execute Sub-workflow, Execute Workflow Trigger

πŸ“₯ Import

Download workflow.json and import into n8n: Workflow menu β†’ Import from File

πŸ“– Importing guide Β· πŸ”‘ Credential setup