{
  "name": "AI-powered knowledge assistant using Google Sheets, OpenAI, and Supabase Vector Search",
  "nodes": [
    {
      "id": "6bdbfe7d-5763-4047-876a-c61aae517887",
      "name": "AI Agent",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        720,
        420
      ]
    },
    {
      "id": "07c33b29-da37-4283-a9b9-314ffd3247d0",
      "name": "Extract Message",
      "type": "n8n-nodes-base.set",
      "position": [
        -80,
        420
      ]
    },
    {
      "id": "7c33317a-95a5-4f21-92b3-7c1dcf97bc43",
      "name": "Format Conversation",
      "type": "n8n-nodes-base.function",
      "position": [
        360,
        420
      ]
    },
    {
      "id": "bfcd6c1b-2db4-49c0-9855-c8d5f3e979ab",
      "name": "OpenAI Chat Model",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "position": [
        580,
        640
      ]
    },
    {
      "id": "eadfe308-8c1d-4a41-a218-a091c53df572",
      "name": "Embeddings OpenAI",
      "type": "@n8n/n8n-nodes-langchain.embeddingsOpenAi",
      "position": [
        800,
        1040
      ]
    },
    {
      "id": "141cb0cc-f004-495f-9ce9-2261daca70d7",
      "name": "Vector Store LLM",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "position": [
        1000,
        840
      ]
    },
    {
      "id": "d48725fd-6f18-4ea6-8d26-4a2b9252c317",
      "name": "Vector Store Tool",
      "type": "@n8n/n8n-nodes-langchain.toolVectorStore",
      "position": [
        820,
        640
      ]
    },
    {
      "id": "d8859552-a2d7-4ada-a57e-2d542f80cbf1",
      "name": "Supabase Vector Store",
      "type": "@n8n/n8n-nodes-langchain.vectorStoreSupabase",
      "position": [
        720,
        840
      ]
    },
    {
      "id": "544ca207-6c7d-4f70-85bc-e9954fb404a4",
      "name": "Conversation Memory",
      "type": "@n8n/n8n-nodes-langchain.memoryBufferWindow",
      "position": [
        700,
        640
      ]
    },
    {
      "id": "1c4c501e-6d24-43ab-9781-1ca2b36898a1",
      "name": "Google Sheets Trigger",
      "type": "n8n-nodes-base.googleSheetsTrigger",
      "position": [
        -520,
        250
      ]
    },
    {
      "id": "6f3c6a51-12d3-41af-8c2f-e84a7d442f80",
      "name": "Check If New Message",
      "type": "n8n-nodes-base.if",
      "position": [
        -300,
        250
      ]
    },
    {
      "id": "7019c655-2740-420c-8fe6-b1342ae3dd13",
      "name": "Merge Response Data",
      "type": "n8n-nodes-base.merge",
      "position": [
        1120,
        200
      ]
    },
    {
      "id": "47034580-420c-4b11-870e-07be8ea37436",
      "name": "Generate Timestamp ID",
      "type": "n8n-nodes-base.function",
      "position": [
        -20,
        180
      ]
    },
    {
      "id": "575fc087-be86-40c1-b7d2-7d8e0d9fb7f5",
      "name": "Get Chat History",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        140,
        420
      ]
    },
    {
      "id": "7b4a3d27-03aa-4229-90b6-ba5180af0eea",
      "name": "Update AI Response",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        1440,
        360
      ]
    },
    {
      "id": "892ac40d-b3dc-4cb5-b634-0afae0e91a71",
      "name": "Web Search Tool",
      "type": "@n8n/n8n-nodes-langchain.toolSerpApi",
      "position": [
        1120,
        640
      ]
    },
    {
      "id": "8169a7cc-1585-44d7-80c2-e5ebdfd37532",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -580,
        140
      ],
      "parameters": {
        "width": null,
        "height": null,
        "content": ""
      }
    },
    {
      "id": "32cb9197-527d-4d12-b67a-51cecf2b866e",
      "name": "Sticky Note7",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1240,
        140
      ],
      "parameters": {
        "width": null,
        "height": null,
        "content": ""
      }
    },
    {
      "id": "0d2f99a7-8140-4679-802d-65c0336e351a",
      "name": "Sticky Note6",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1240,
        580
      ],
      "parameters": {
        "width": null,
        "height": null,
        "content": ""
      }
    }
  ],
  "connections": {
    "AI Agent": {
      "main": [
        [
          {
            "node": "Merge Response Data",
            "type": "main",
            "index": 1
          }
        ]
      ]
    },
    "Extract Message": {
      "main": [
        [
          {
            "node": "Get Chat History",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Web Search Tool": {
      "ai_tool": [
        [
          {
            "node": "AI Agent",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "Get Chat History": {
      "main": [
        [
          {
            "node": "Format Conversation",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Vector Store LLM": {
      "ai_languageModel": [
        [
          {
            "node": "Vector Store Tool",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Embeddings OpenAI": {
      "ai_embedding": [
        [
          {
            "node": "Supabase Vector Store",
            "type": "ai_embedding",
            "index": 0
          }
        ]
      ]
    },
    "OpenAI Chat Model": {
      "ai_languageModel": [
        [
          {
            "node": "AI Agent",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Vector Store Tool": {
      "ai_tool": [
        [
          {
            "node": "AI Agent",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "Conversation Memory": {
      "ai_memory": [
        [
          {
            "node": "AI Agent",
            "type": "ai_memory",
            "index": 0
          }
        ]
      ]
    },
    "Format Conversation": {
      "main": [
        [
          {
            "node": "AI Agent",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Merge Response Data": {
      "main": [
        [
          {
            "node": "Update AI Response",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Check If New Message": {
      "main": [
        [
          {
            "node": "Extract Message",
            "type": "main",
            "index": 0
          },
          {
            "node": "Generate Timestamp ID",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Generate Timestamp ID": {
      "main": [
        [
          {
            "node": "Merge Response Data",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Google Sheets Trigger": {
      "main": [
        [
          {
            "node": "Check If New Message",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Supabase Vector Store": {
      "ai_vectorStore": [
        [
          {
            "node": "Vector Store Tool",
            "type": "ai_vectorStore",
            "index": 0
          }
        ]
      ]
    }
  }
}