{
  "name": "Automate water bill calculations with Telegram, Gemini AI, and Google Sheets",
  "nodes": [
    {
      "id": "0251a048-cd44-464c-8094-89a9baff4695",
      "name": "Telegram Trigger",
      "type": "n8n-nodes-base.telegramTrigger",
      "position": [
        -2688,
        -240
      ]
    },
    {
      "id": "9da0ef32-0aae-47d4-ad66-ddeb8ff60e07",
      "name": "Redirect Message Types",
      "type": "n8n-nodes-base.switch",
      "position": [
        -2384,
        -256
      ]
    },
    {
      "id": "22e0a88e-aa48-46f2-896a-99473313fe34",
      "name": "Get a file",
      "type": "n8n-nodes-base.telegram",
      "position": [
        -1936,
        -240
      ]
    },
    {
      "id": "40406678-0fce-4f9a-9335-69e3600c84e8",
      "name": "Image Explainer",
      "type": "@n8n/n8n-nodes-langchain.chainLlm",
      "position": [
        -1488,
        -64
      ]
    },
    {
      "id": "0d24bce4-067b-40af-bb51-b6ca5c0a9ae3",
      "name": "Google Gemini Chat Model",
      "type": "@n8n/n8n-nodes-langchain.lmChatGoogleGemini",
      "position": [
        -1536,
        192
      ]
    },
    {
      "id": "edfc1d10-e1b8-460c-b850-7eb4d1b5f30f",
      "name": "Structured Output Parser",
      "type": "@n8n/n8n-nodes-langchain.outputParserStructured",
      "position": [
        -1344,
        144
      ]
    },
    {
      "id": "8faed6ed-cabf-4ed2-a6bd-164ee72e1483",
      "name": "Get row(s) in sheet",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        -1136,
        -64
      ]
    },
    {
      "id": "da0f78a6-3146-4e15-911f-61f3f6a073e2",
      "name": "Append row in sheet",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        -256,
        -64
      ]
    },
    {
      "id": "c58a7b4d-b780-4167-be6e-5f91cee2eb72",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -2016,
        32
      ],
      "parameters": {
        "width": 400,
        "height": 624,
        "content": "## 1. Create Google Sheet\nRows :\n- Nama\t\n- Volume Sebelumnya\t\n- Volume Saat Ini\t\n- Harga/m³\t\n- Jumlah Bayar\t\n- Beban\t\n- Total Bayar\t\n- Tanggal Input\n\n## 2. Create Telegram Bot\n- Open Telegram and sear"
      }
    },
    {
      "id": "efe8f266-d509-4372-a98d-082af2f5d2c1",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1136,
        336
      ],
      "parameters": {
        "width": 544,
        "height": 272,
        "content": "## Short Explanation of the Water Bill BOT\nEach resident sends a picture of the water meter along with a caption that includes their name to the chatbot.\nThe BOT automatically calculates the differenc"
      }
    },
    {
      "id": "ad11f386-8b9c-4e06-921b-bb8cd54fb5f4",
      "name": "Find Latest Row",
      "type": "n8n-nodes-base.code",
      "position": [
        -928,
        -64
      ]
    },
    {
      "id": "ac746257-cbf5-40be-85de-7262071f643b",
      "name": "Format Bill Message",
      "type": "n8n-nodes-base.code",
      "position": [
        -64,
        -64
      ]
    },
    {
      "id": "f68c7969-bdf0-4d70-a7e3-96894db6c2d8",
      "name": "Send Bill to Telegram",
      "type": "n8n-nodes-base.telegram",
      "position": [
        144,
        -64
      ]
    },
    {
      "id": "e29bafb4-47de-4220-bf11-bb2c882be340",
      "name": "Prepare Data for Sheet",
      "type": "n8n-nodes-base.set",
      "position": [
        -512,
        -64
      ]
    },
    {
      "id": "e24e6599-1475-478b-a83e-a026e6a8aca6",
      "name": "Calculate Bill",
      "type": "n8n-nodes-base.code",
      "position": [
        -720,
        -64
      ]
    }
  ],
  "connections": {
    "Get a file": {
      "main": [
        [
          {
            "node": "Image Explainer",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Calculate Bill": {
      "main": [
        [
          {
            "node": "Prepare Data for Sheet",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Find Latest Row": {
      "main": [
        [
          {
            "node": "Calculate Bill",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Image Explainer": {
      "main": [
        [
          {
            "node": "Get row(s) in sheet",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Telegram Trigger": {
      "main": [
        [
          {
            "node": "Redirect Message Types",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Append row in sheet": {
      "main": [
        [
          {
            "node": "Format Bill Message",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Format Bill Message": {
      "main": [
        [
          {
            "node": "Send Bill to Telegram",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get row(s) in sheet": {
      "main": [
        [
          {
            "node": "Find Latest Row",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Prepare Data for Sheet": {
      "main": [
        [
          {
            "node": "Append row in sheet",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Redirect Message Types": {
      "main": [
        [
          {
            "node": "Get a file",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Google Gemini Chat Model": {
      "ai_languageModel": [
        [
          {
            "node": "Image Explainer",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Structured Output Parser": {
      "ai_outputParser": [
        [
          {
            "node": "Image Explainer",
            "type": "ai_outputParser",
            "index": 0
          }
        ]
      ]
    }
  }
}