{
  "name": "Track multi-currency expenses from receipts with easybits, Telegram, and Google Sheets",
  "nodes": [
    {
      "id": "e459b32e-a5e3-4904-a765-ee29834f52a6",
      "name": "Telegram: Receipt Photo",
      "type": "n8n-nodes-base.telegramTrigger",
      "position": [
        -1168,
        128
      ]
    },
    {
      "id": "d6646126-92d6-4b74-9d23-d63564651176",
      "name": "Parse AI Data",
      "type": "n8n-nodes-base.code",
      "position": [
        -224,
        128
      ]
    },
    {
      "id": "bc9ab6e5-2908-49e9-8763-6d14156626e1",
      "name": "Get Exchange Rate (Primary)",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        32,
        128
      ]
    },
    {
      "id": "33d25f7b-2d15-4fb7-a94e-24eab201a24c",
      "name": "Did Primary Fail?",
      "type": "n8n-nodes-base.if",
      "position": [
        208,
        128
      ]
    },
    {
      "id": "0a79dd9a-b86f-41eb-a334-33512d9db556",
      "name": "Fallback API (Cloudflare)",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        432,
        32
      ]
    },
    {
      "id": "56343103-fbc4-4256-8a71-8ea985c88f5a",
      "name": "Calculate EUR",
      "type": "n8n-nodes-base.code",
      "position": [
        672,
        144
      ]
    },
    {
      "id": "c7c9218e-fa67-48ed-b9ac-cf3824d57bd8",
      "name": "Append row in sheet",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        944,
        144
      ]
    },
    {
      "id": "a38f9508-630c-42fc-be49-11e02b8910ed",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1232,
        -96
      ],
      "parameters": {
        "width": null,
        "height": 400,
        "content": "## 📥 Entry Point\nListens for incoming Telegram messages. The user is expected to send a photo of a receipt or invoice. Make sure \"Download\" is enabled so the image binary is passed forward."
      }
    },
    {
      "id": "41f5e5a0-c4f1-4edf-b977-33ba32090448",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -960,
        -96
      ],
      "parameters": {
        "width": 640,
        "height": 400,
        "content": "## 🤖 easybits' Data Extraction\nSends the receipt image to the easybits pipeline for data extraction. Returns structured data under `json.data` containing `invoice_number`, `currency`, and `amount`."
      }
    },
    {
      "id": "c039e942-e541-4e9f-8015-a8beec3bdee1",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -288,
        -96
      ],
      "parameters": {
        "width": null,
        "height": 400,
        "content": "## 🧹 Data Normalisation\nCleans and standardises the extracted fields. Provides fallback defaults in case the AI missed a field (e.g. unknown invoice number, USD as default currency)."
      }
    },
    {
      "id": "16f141e1-95f9-42a3-b4b6-4e4772c9903c",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -16,
        -96
      ],
      "parameters": {
        "width": 592,
        "height": 400,
        "content": "## 🌐 Exchange Rate Fetch (with Fallback)\nTries the primary jsDelivr-hosted currency API first. If it fails, the error output automatically reroutes to the Cloudflare fallback API. Both return the same"
      }
    },
    {
      "id": "22a22e36-3ab9-4912-8cc9-cddf055ba528",
      "name": "Sticky Note4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        608,
        -96
      ],
      "parameters": {
        "width": null,
        "height": 400,
        "content": "## 🧮 Currency Conversion\nReads the exchange rate from whichever API succeeded and multiplies it by the original invoice amount to produce the final EUR value. Result is rounded to 2 decimal places."
      }
    },
    {
      "id": "1254c1bf-c9c9-4cbf-9ba6-2fe750f02c73",
      "name": "Sticky Note5",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        880,
        -96
      ],
      "parameters": {
        "width": null,
        "height": 400,
        "content": "## 📊 Google Sheets Logging\nAppends one row per invoice to the Master Finance File. Maps `invoice_no` → Vendor Name and `amount_eur` → Overall Due. Make sure the sheet columns exist before running."
      }
    },
    {
      "id": "d0e0f653-0064-4a7c-ba5b-ceeceeda4287",
      "name": "Sticky Note6",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1952,
        -784
      ],
      "parameters": {
        "width": 688,
        "height": 1808,
        "content": "# 💱 Currency Converter Assistant\n\n## How It Works\n\nThis workflow automates multi-currency expense tracking via Telegram. Send a receipt photo to your bot, and it automatically extracts the invoice det"
      }
    },
    {
      "id": "9bc5061a-50fa-4046-9a39-62e9f4737fc8",
      "name": "Extract from File",
      "type": "n8n-nodes-base.extractFromFile",
      "position": [
        -896,
        128
      ]
    },
    {
      "id": "6aea2c8a-0a7a-4f6a-9b1b-02a931812f0a",
      "name": "Edit Fields",
      "type": "n8n-nodes-base.set",
      "position": [
        -688,
        128
      ]
    },
    {
      "id": "329c1dde-101c-41ce-83b4-607052cf3abb",
      "name": "HTTP Request",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        -480,
        128
      ]
    }
  ],
  "connections": {
    "Edit Fields": {
      "main": [
        [
          {
            "node": "HTTP Request",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "HTTP Request": {
      "main": [
        [
          {
            "node": "Parse AI Data",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Calculate EUR": {
      "main": [
        [
          {
            "node": "Append row in sheet",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Parse AI Data": {
      "main": [
        [
          {
            "node": "Get Exchange Rate (Primary)",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Did Primary Fail?": {
      "main": [
        [
          {
            "node": "Fallback API (Cloudflare)",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Calculate EUR",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Extract from File": {
      "main": [
        [
          {
            "node": "Edit Fields",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Telegram: Receipt Photo": {
      "main": [
        [
          {
            "node": "Extract from File",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Fallback API (Cloudflare)": {
      "main": [
        [
          {
            "node": "Calculate EUR",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get Exchange Rate (Primary)": {
      "main": [
        [
          {
            "node": "Did Primary Fail?",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}