{
  "name": "beyscolleciton",
  "nodes": [
    {
      "parameters": {
        "public": true,
        "mode": "webhook",
        "options": {
          "loadPreviousSession": "memory"
        }
      },
      "type": "@n8n/n8n-nodes-langchain.chatTrigger",
      "typeVersion": 1.3,
      "position": [
        -128,
        16
      ],
      "id": "a36ef2e7-dce9-470d-b916-e57a040cf795",
      "name": "When chat message received"
    },
    {
      "parameters": {
        "options": {
          "systemMessage": "=Sen bir e-ticaret asistan\u0131s\u0131n. M\u00fc\u015fterilere \u00fcr\u00fcnler hakk\u0131nda bilgi veriyorsun.\n\n## G\u00f6revlerin:\n1. M\u00fc\u015fteri sorular\u0131n\u0131 analiz et\n2. \u00dcr\u00fcn bilgileri i\u00e7in RAG sistemini kullan\n3. Fiyat, stok, beden bilgileri i\u00e7in Supabase Vector Store'dan bilgi \u00e7ek\n4. Do\u011fal ve yard\u0131msever \u015fekilde yan\u0131t ver\n\n## Kurallar:\n- Her zaman RAG sisteminden gelen g\u00fcncel verileri kullan\n- Fiyat ve stok bilgilerini hi\u00e7bir zaman tahmin etme, mutlaka veritaban\u0131ndan kontrol et\n- \u00dcr\u00fcn yoksa veya stokta yoksa a\u00e7\u0131k\u00e7a belirt\n- M\u00fc\u015fteriye alternatif \u00fcr\u00fcnler \u00f6ner\n- K\u0131sa ve \u00f6z yan\u0131tlar ver\n- Fiyatlar\u0131 do\u011fru formatta g\u00f6ster (TL, \u20ba, vs.)\n\n## RAG Sistemini Kullanma:\nM\u00fc\u015fteri \u015funlar\u0131 sordu\u011funda RAG'e ba\u015fvur:\n- \u00dcr\u00fcn \u00f6zellikleri\n- Fiyat bilgileri\n- Stok durumu\n- Beden/renk se\u00e7enekleri\n- Kargo bilgileri\n- \u0130ade ko\u015fullar\u0131\n- \u00dcr\u00fcn kar\u015f\u0131la\u015ft\u0131rmalar\u0131\n\n## Yan\u0131t Format\u0131:\n- \u00dcr\u00fcn ad\u0131 ve \u00f6zellikleri\n- Fiyat (g\u00fcncel)\n- Stok durumu (var/yok)\n- Mevcut bedenler/renkler\n- Ek \u00f6neriler (varsa)\n\n## \u00d6rnek Ak\u0131\u015f:\nM\u00fc\u015fteri: \"Siyah kot pantolon var m\u0131?\"\n1. RAG'den \"siyah kot pantolon\" ara\n2. Bulunan \u00fcr\u00fcnlerin fiyat/stok bilgilerini getir\n3. Mevcut bedenleri listele\n4. Formatlanm\u0131\u015f yan\u0131t ver\n\nM\u00fc\u015fteriye kar\u015f\u0131 her zaman profesyonel, yard\u0131msever ve samimi ol.\n\nCevaplar\u0131nda asla stok say\u0131s\u0131n\u0131 s\u00f6yleme sadece var ya da yok de.\nModel bilgilerini m\u00fc\u015fteri sormad\u0131k\u00e7a s\u00f6yleme.\n"
        }
      },
      "type": "@n8n/n8n-nodes-langchain.agent",
      "typeVersion": 2.2,
      "position": [
        208,
        0
      ],
      "id": "a76c3640-a050-4f8c-8e18-eb46d32255d2",
      "name": "AI Agent"
    },
    {
      "parameters": {
        "model": {
          "__rl": true,
          "mode": "list",
          "value": "gpt-4.1-mini"
        },
        "options": {}
      },
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "typeVersion": 1.2,
      "position": [
        48,
        400
      ],
      "id": "f4d8b320-2ce5-4eb1-bb2f-0bfcd3c4e316",
      "name": "OpenAI Chat Model",
      "credentials": {
        "openAiApi": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {},
      "type": "@n8n/n8n-nodes-langchain.memoryBufferWindow",
      "typeVersion": 1.3,
      "position": [
        48,
        208
      ],
      "id": "dac07e73-9c3b-436d-bf45-52ce6eaa8b47",
      "name": "Simple Memory"
    },
    {
      "parameters": {
        "respondWith": "allIncomingItems",
        "options": {}
      },
      "type": "n8n-nodes-base.respondToWebhook",
      "typeVersion": 1.4,
      "position": [
        560,
        16
      ],
      "id": "700dad3d-d7fd-4ce8-9d30-65e01df755a2",
      "name": "Respond to Webhook"
    },
    {
      "parameters": {
        "options": {}
      },
      "type": "@n8n/n8n-nodes-langchain.lmChatGoogleGemini",
      "typeVersion": 1,
      "position": [
        192,
        240
      ],
      "id": "ffb2e295-c303-4eed-ad43-5d11e682597e",
      "name": "Google Gemini Chat Model",
      "credentials": {
        "googlePalmApi": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {},
      "type": "n8n-nodes-base.manualTrigger",
      "typeVersion": 1,
      "position": [
        864,
        304
      ],
      "id": "493391b0-76ab-4734-b303-d6a466d880af",
      "name": "When clicking \u2018Execute workflow\u2019"
    },
    {
      "parameters": {
        "operation": "download",
        "fileId": {
          "__rl": true,
          "value": "1Dllr-5aeVdbg4Hf76uGxRqiSnFMamgbY",
          "mode": "list",
          "cachedResultName": "\u00fcr\u00fcnler.xls",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1Dllr-5aeVdbg4Hf76uGxRqiSnFMamgbY/edit?usp=drivesdk&ouid=112073682067145607046&rtpof=true&sd=true"
        },
        "options": {}
      },
      "type": "n8n-nodes-base.googleDrive",
      "typeVersion": 3,
      "position": [
        1072,
        304
      ],
      "id": "6e3ad4f4-a4f5-4eff-b0e0-c7a47ed5bcae",
      "name": "Download file",
      "credentials": {
        "googleDriveOAuth2Api": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "operation": "xlsx",
        "options": {}
      },
      "type": "n8n-nodes-base.extractFromFile",
      "typeVersion": 1,
      "position": [
        1280,
        304
      ],
      "id": "a6d3f037-310e-419f-81ef-46cb2b2f7fc4",
      "name": "Extract from File"
    },
    {
      "parameters": {
        "aggregate": "aggregateAllItemData",
        "options": {}
      },
      "type": "n8n-nodes-base.aggregate",
      "typeVersion": 1,
      "position": [
        1488,
        304
      ],
      "id": "3d217bf6-c810-48e9-b892-0c9bdbc53cad",
      "name": "Aggregate"
    },
    {
      "parameters": {
        "mode": "insert",
        "tableName": {
          "__rl": true,
          "value": "beys",
          "mode": "list",
          "cachedResultName": "beys"
        },
        "options": {
          "queryName": "match_beys"
        }
      },
      "type": "@n8n/n8n-nodes-langchain.vectorStoreSupabase",
      "typeVersion": 1.3,
      "position": [
        1984,
        304
      ],
      "id": "70d633d8-1642-49de-8d7f-575807bb05df",
      "name": "Supabase Vector Store",
      "credentials": {
        "supabaseApi": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "options": {}
      },
      "type": "@n8n/n8n-nodes-langchain.embeddingsOpenAi",
      "typeVersion": 1.2,
      "position": [
        1904,
        528
      ],
      "id": "3e7a8ce7-79a5-4248-a4ff-21e2da8efe9e",
      "name": "Embeddings OpenAI",
      "credentials": {
        "openAiApi": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "options": {}
      },
      "type": "@n8n/n8n-nodes-langchain.documentDefaultDataLoader",
      "typeVersion": 1.1,
      "position": [
        2096,
        496
      ],
      "id": "c2b36c08-d3f7-41f8-8c13-a38b48bdbdfd",
      "name": "Default Data Loader"
    },
    {
      "parameters": {
        "fieldsToSummarize": {
          "values": [
            {
              "aggregation": "concatenate",
              "field": "data"
            }
          ]
        },
        "options": {}
      },
      "type": "n8n-nodes-base.summarize",
      "typeVersion": 1.1,
      "position": [
        1696,
        304
      ],
      "id": "8ff1ae12-9a99-410d-8be6-9abd2d544b38",
      "name": "Summarize"
    },
    {
      "parameters": {
        "mode": "retrieve-as-tool",
        "toolDescription": "call this tool to look up the products information",
        "tableName": {
          "__rl": true,
          "value": "beys",
          "mode": "list",
          "cachedResultName": "beys"
        },
        "topK": 15,
        "options": {
          "queryName": "match_beys"
        }
      },
      "type": "@n8n/n8n-nodes-langchain.vectorStoreSupabase",
      "typeVersion": 1.3,
      "position": [
        464,
        208
      ],
      "id": "88b16785-3b95-4018-9984-caa85631e59e",
      "name": "Supabase Vector Store1",
      "credentials": {
        "supabaseApi": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "options": {}
      },
      "type": "@n8n/n8n-nodes-langchain.embeddingsOpenAi",
      "typeVersion": 1.2,
      "position": [
        448,
        368
      ],
      "id": "612280be-a13e-4141-b365-09eb0a86dcea",
      "name": "Embeddings OpenAI1",
      "credentials": {
        "openAiApi": {
          "name": "<your credential>"
        }
      }
    }
  ],
  "connections": {
    "When chat message received": {
      "main": [
        [
          {
            "node": "AI Agent",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "OpenAI Chat Model": {
      "ai_languageModel": [
        []
      ]
    },
    "Simple Memory": {
      "ai_memory": [
        [
          {
            "node": "AI Agent",
            "type": "ai_memory",
            "index": 0
          },
          {
            "node": "When chat message received",
            "type": "ai_memory",
            "index": 0
          }
        ]
      ]
    },
    "AI Agent": {
      "main": [
        [
          {
            "node": "Respond to Webhook",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Google Gemini Chat Model": {
      "ai_languageModel": [
        [
          {
            "node": "AI Agent",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "When clicking \u2018Execute workflow\u2019": {
      "main": [
        [
          {
            "node": "Download file",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Download file": {
      "main": [
        [
          {
            "node": "Extract from File",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Extract from File": {
      "main": [
        [
          {
            "node": "Aggregate",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Aggregate": {
      "main": [
        [
          {
            "node": "Summarize",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Embeddings OpenAI": {
      "ai_embedding": [
        [
          {
            "node": "Supabase Vector Store",
            "type": "ai_embedding",
            "index": 0
          }
        ]
      ]
    },
    "Default Data Loader": {
      "ai_document": [
        [
          {
            "node": "Supabase Vector Store",
            "type": "ai_document",
            "index": 0
          }
        ]
      ]
    },
    "Summarize": {
      "main": [
        [
          {
            "node": "Supabase Vector Store",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Supabase Vector Store1": {
      "ai_tool": [
        [
          {
            "node": "AI Agent",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "Embeddings OpenAI1": {
      "ai_embedding": [
        [
          {
            "node": "Supabase Vector Store1",
            "type": "ai_embedding",
            "index": 0
          }
        ]
      ]
    }
  },
  "active": false,
  "settings": {
    "executionOrder": "v1"
  },
  "versionId": "fb57a484-1a07-4bdf-b32b-5a79bcf73129",
  "meta": {
    "templateCredsSetupCompleted": true
  },
  "id": "nUAr3lpB3XMj6IXg",
  "tags": []
}