{
  "name": "Expense logging with Telegram and Google Sheets",
  "nodes": [
    {
      "id": "c7f13578-6fa1-49df-aae5-6337c8bbec9a",
      "name": "Sticky Note - Overview",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -160,
        128
      ],
      "parameters": {
        "width": 551,
        "height": 378,
        "content": "# 💸 Telegram Expense Tracker\n**Log expenses, track weekly totals, and get budget alerts via Telegram.**\n\nThis workflow turns your Telegram chat into a personal finance assistant. It logs every expense"
      }
    },
    {
      "id": "b51c5305-db0a-4d1b-8d5e-192aa4bb62e5",
      "name": "Sticky Note - Daily Log",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        416,
        496
      ],
      "parameters": {
        "width": 1232,
        "height": 304,
        "content": "## Daily logged expenses in sheets\n"
      }
    },
    {
      "id": "6370c17d-3a25-41b2-9b28-6e8766dca966",
      "name": "Sticky Note - Weekly Total",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        416,
        800
      ],
      "parameters": {
        "width": 1056,
        "height": 272,
        "content": "## Weekly Total \n"
      }
    },
    {
      "id": "043a639f-0605-4e05-8ea2-fc2567fc7670",
      "name": "Telegram - Get Expense Command",
      "type": "n8n-nodes-base.telegramTrigger",
      "position": [
        464,
        592
      ]
    },
    {
      "id": "62ab5d7a-5ece-4bd5-90b2-5e79a9257d8e",
      "name": "Parse Telegram Message",
      "type": "n8n-nodes-base.code",
      "position": [
        656,
        592
      ]
    },
    {
      "id": "467d4587-d057-4b7a-b092-f2466491dc5a",
      "name": "Google Sheets - Log Expense",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        848,
        592
      ]
    },
    {
      "id": "2ccf8900-b961-4b8a-aee8-327861e0b2e9",
      "name": "Weekly Summary Trigger",
      "type": "n8n-nodes-base.scheduleTrigger",
      "position": [
        480,
        896
      ]
    },
    {
      "id": "f6f5a5b3-22b0-4904-86ab-6ce04e4d6cb4",
      "name": "Calculate Weekly Total",
      "type": "n8n-nodes-base.code",
      "position": [
        896,
        896
      ]
    },
    {
      "id": "62a48c4a-7445-4f3b-bc2c-0107f813c288",
      "name": "Telegram - Send Weekly Summary",
      "type": "n8n-nodes-base.telegram",
      "position": [
        1104,
        896
      ]
    },
    {
      "id": "19fc0518-2cba-4c74-92bf-ddad3905ee2d",
      "name": "Sticky Note - Setup Guide",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -160,
        512
      ],
      "parameters": {
        "width": 551,
        "height": 791,
        "content": "## 🛠️ Setup Guide\n### **[Gtaras](https://n8n.io/creators/tarasidis/)**  \n\n### 1️⃣ Telegram Setup\n1. Open Telegram and search for **@BotFather**.\n2. Send `/newbot` and follow instructions to get your *"
      }
    },
    {
      "id": "615e900b-219c-4a1e-8a23-d4a9f04733aa",
      "name": "Google Sheets - Clean Up (Optional)",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        1312,
        896
      ]
    },
    {
      "id": "015dad52-8d68-4f79-9c16-bf6676251e7a",
      "name": "Google Sheets - Get Weekly Expenses",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        688,
        896
      ]
    },
    {
      "id": "a3dc986d-be75-489f-b44d-d2a7c2c14fa6",
      "name": "Google Sheets - Get Expenses (Realtime)",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        1072,
        592
      ]
    },
    {
      "id": "5f56fb27-24ce-4a80-976a-8e5e946df192",
      "name": "Check Weekly Budget",
      "type": "n8n-nodes-base.code",
      "position": [
        1280,
        592
      ]
    },
    {
      "id": "1a067c3b-c726-4c2d-b436-ba78647620cb",
      "name": "Telegram - Send Budget Alert",
      "type": "n8n-nodes-base.telegram",
      "position": [
        1472,
        592
      ]
    }
  ],
  "connections": {
    "Check Weekly Budget": {
      "main": [
        [
          {
            "node": "Telegram - Send Budget Alert",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Calculate Weekly Total": {
      "main": [
        [
          {
            "node": "Telegram - Send Weekly Summary",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Parse Telegram Message": {
      "main": [
        [
          {
            "node": "Google Sheets - Log Expense",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Weekly Summary Trigger": {
      "main": [
        [
          {
            "node": "Google Sheets - Get Weekly Expenses",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Google Sheets - Log Expense": {
      "main": [
        [
          {
            "node": "Google Sheets - Get Expenses (Realtime)",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Telegram - Get Expense Command": {
      "main": [
        [
          {
            "node": "Parse Telegram Message",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Telegram - Send Weekly Summary": {
      "main": [
        [
          {
            "node": "Google Sheets - Clean Up (Optional)",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Google Sheets - Get Weekly Expenses": {
      "main": [
        [
          {
            "node": "Calculate Weekly Total",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Google Sheets - Get Expenses (Realtime)": {
      "main": [
        [
          {
            "node": "Check Weekly Budget",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}