{
  "name": "RAG chatbot with Supabase + TogetherAI + Openrouter",
  "nodes": [
    {
      "id": "7ac1a47f-3373-418c-84ff-30106c911340",
      "name": "Content for the Training",
      "type": "n8n-nodes-base.googleDocs",
      "position": [
        -1880,
        -100
      ]
    },
    {
      "id": "2aabc964-23e8-4113-8280-9eb70588c858",
      "name": "Splitting into Chunks",
      "type": "n8n-nodes-base.code",
      "position": [
        -1660,
        -100
      ]
    },
    {
      "id": "561cff53-365d-4d09-baf6-f1a864ec6c46",
      "name": "Embedding Uploaded document",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        -1440,
        -100
      ]
    },
    {
      "id": "57488d21-d59b-4e1a-916c-e35409d796c4",
      "name": "Save the embedding in DB",
      "type": "n8n-nodes-base.supabase",
      "position": [
        -1220,
        -100
      ]
    },
    {
      "id": "a91cd4dd-eab7-468b-932e-3fd7122bd5f5",
      "name": "Telegram Trigger",
      "type": "n8n-nodes-base.telegramTrigger",
      "position": [
        -2160,
        -100
      ]
    },
    {
      "id": "f9bd510a-1894-4f03-abb1-b1aa9fa007e1",
      "name": "When chat message received",
      "type": "@n8n/n8n-nodes-langchain.chatTrigger",
      "position": [
        -300,
        -140
      ]
    },
    {
      "id": "d4be0adb-e8ad-4ce8-aaaa-2bb957da47ce",
      "name": "Aggregate",
      "type": "n8n-nodes-base.aggregate",
      "position": [
        360,
        -140
      ]
    },
    {
      "id": "2db8d4ed-e32a-449e-ae2b-68399c552ea4",
      "name": "Basic LLM Chain",
      "type": "@n8n/n8n-nodes-langchain.chainLlm",
      "position": [
        680,
        -140
      ]
    },
    {
      "id": "db2ba386-1a3b-4d46-abc3-c53f98323ca4",
      "name": "OpenRouter Chat Model",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenRouter",
      "position": [
        680,
        60
      ]
    },
    {
      "id": "ed1849e9-fb30-4763-a6bf-2ba8c6c243f7",
      "name": "Search Embeddings",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        140,
        -140
      ]
    },
    {
      "id": "e5966ced-618c-4fbf-85c9-d8fd8bf0576b",
      "name": "Embend User Message",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        -80,
        -140
      ]
    },
    {
      "id": "3aed0aa2-25ab-4f5e-b6d1-fe536bce5ef3",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -2900,
        -300
      ],
      "parameters": {
        "width": 1900,
        "height": 1080,
        "content": "## ⚠️ RUN THIS FIRST & RUN IT FOR ONLY ONCE \n(as it will convert your content in Embedding format and save it in DB and is ready for the RAG Chat)\n\n## 📌 Telegram Trigger\n\n* **Type:** `telegramTrigger`"
      }
    },
    {
      "id": "6afc7ab6-18d2-4781-bfc5-a0ae03a9ef68",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -900,
        -300
      ],
      "parameters": {
        "width": 1900,
        "height": 1080,
        "content": "## 💬 When chat message received\n\n* **Type:** `chatTrigger`\n* **Purpose:** Starts the workflow when a user sends a chat message.\n* **Details:** Sends an initial greeting message to the user.\n\n---\n\n## 🧩"
      }
    }
  ],
  "connections": {
    "Aggregate": {
      "main": [
        [
          {
            "node": "Basic LLM Chain",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Telegram Trigger": {
      "main": [
        [
          {
            "node": "Content for the Training",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Search Embeddings": {
      "main": [
        [
          {
            "node": "Aggregate",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Embend User Message": {
      "main": [
        [
          {
            "node": "Search Embeddings",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "OpenRouter Chat Model": {
      "ai_languageModel": [
        [
          {
            "node": "Basic LLM Chain",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Splitting into Chunks": {
      "main": [
        [
          {
            "node": "Embedding Uploaded document",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Content for the Training": {
      "main": [
        [
          {
            "node": "Splitting into Chunks",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "When chat message received": {
      "main": [
        [
          {
            "node": "Embend User Message",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Embedding Uploaded document": {
      "main": [
        [
          {
            "node": "Save the embedding in DB",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}