{
  "name": "Smart email assistant: automate customer support with AI & Supabase",
  "nodes": [
    {
      "id": "c71e68fa-1901-4df7-b76f-9508213f0753",
      "name": "Email Monitor",
      "type": "n8n-nodes-base.gmailTrigger",
      "position": [
        -760,
        -640
      ]
    },
    {
      "id": "4a5d0db0-41c9-4824-80b2-6329bd1379d0",
      "name": "AI Email Classifier",
      "type": "@n8n/n8n-nodes-langchain.openAi",
      "position": [
        -240,
        -640
      ]
    },
    {
      "id": "cb835409-ba65-406e-ba54-60d9a62c6b5d",
      "name": "Route Email",
      "type": "n8n-nodes-base.switch",
      "position": [
        120,
        -640
      ]
    },
    {
      "id": "91198514-c899-427d-9e7a-41017897390a",
      "name": "AI Response Generator",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        620,
        -700
      ]
    },
    {
      "id": "26f65176-b37a-48cb-bd77-5d02485f0a56",
      "name": "OpenAI Chat Model2",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "position": [
        380,
        -360
      ]
    },
    {
      "id": "90b26157-6653-4f50-982f-0cfae21576bc",
      "name": "Vector Store Tool1",
      "type": "@n8n/n8n-nodes-langchain.toolVectorStore",
      "position": [
        880,
        -500
      ]
    },
    {
      "id": "9ccfe80d-195e-42a9-8168-3d76d3252817",
      "name": "OpenAI Chat Model3",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "position": [
        1320,
        -240
      ]
    },
    {
      "id": "db7eea69-2084-49ce-940b-d90c213fef1a",
      "name": "Embeddings OpenAI1",
      "type": "@n8n/n8n-nodes-langchain.embeddingsOpenAi",
      "position": [
        680,
        -120
      ]
    },
    {
      "id": "4168a0fd-05e4-4db1-a0bb-119d8a60bb23",
      "name": "Supabase Vector Store",
      "type": "@n8n/n8n-nodes-langchain.vectorStoreSupabase",
      "position": [
        740,
        -300
      ]
    },
    {
      "id": "1e71a2f2-90b9-4a34-ad67-59fdc2ee9f71",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -2400,
        -820
      ],
      "parameters": {
        "width": null,
        "height": null,
        "content": ""
      }
    },
    {
      "id": "8bbdc661-4a8b-4da6-93dc-34239eca7675",
      "name": "Default Data Loader",
      "type": "@n8n/n8n-nodes-langchain.documentDefaultDataLoader",
      "position": [
        1120,
        560
      ]
    },
    {
      "id": "1a153c81-9322-4829-99d1-f7c862dbf5bc",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -660,
        220
      ],
      "parameters": {
        "width": null,
        "height": null,
        "content": ""
      }
    },
    {
      "id": "6d4520bd-d7a8-4f67-8826-d310c15e3a01",
      "name": "Download File",
      "type": "n8n-nodes-base.googleDrive",
      "position": [
        460,
        440
      ]
    },
    {
      "id": "4afd45d7-4d67-4fef-af05-0e6e82392742",
      "name": "File Created",
      "type": "n8n-nodes-base.googleDriveTrigger",
      "position": [
        -580,
        340
      ]
    },
    {
      "id": "a3bea952-8bf0-4a86-8c31-b9042556e2ce",
      "name": "File Updated",
      "type": "n8n-nodes-base.googleDriveTrigger",
      "position": [
        -580,
        560
      ]
    },
    {
      "id": "95891826-3c3e-4e77-abed-33133672eea9",
      "name": "Extract Document Text",
      "type": "n8n-nodes-base.extractFromFile",
      "position": [
        720,
        440
      ]
    },
    {
      "id": "4cb79fec-98e2-45f3-b88f-52b5e4145b73",
      "name": "Recursive Character Text Splitter",
      "type": "@n8n/n8n-nodes-langchain.textSplitterRecursiveCharacterTextSplitter",
      "position": [
        1120,
        760
      ]
    },
    {
      "id": "ea6a2e0e-a5c4-4ee5-8c32-9e3c002a4859",
      "name": "Delete Old Doc Rows",
      "type": "n8n-nodes-base.supabase",
      "position": [
        160,
        440
      ]
    },
    {
      "id": "8a3257e2-89b8-4999-8201-39af615976da",
      "name": "Set File ID",
      "type": "n8n-nodes-base.set",
      "position": [
        -260,
        420
      ]
    },
    {
      "id": "139d3e27-90b0-4ada-b31f-7cc98b6b089f",
      "name": "Insert into Supabase Vectorstore",
      "type": "@n8n/n8n-nodes-langchain.vectorStoreSupabase",
      "position": [
        1000,
        340
      ]
    },
    {
      "id": "2db8ca4f-79f6-4407-b498-3d05d3b506ac",
      "name": "Embeddings OpenAI",
      "type": "@n8n/n8n-nodes-langchain.embeddingsOpenAi",
      "position": [
        960,
        560
      ]
    },
    {
      "id": "01463a9d-0781-4ee8-9649-f7210ad25dd4",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -860,
        -900
      ],
      "parameters": {
        "width": null,
        "height": null,
        "content": ""
      }
    },
    {
      "id": "d8fc3491-0b50-4cdb-b5bc-6cbffcd3276b",
      "name": "Create Draft",
      "type": "n8n-nodes-base.gmailTool",
      "position": [
        1440,
        -520
      ]
    }
  ],
  "connections": {
    "Route Email": {
      "main": [
        [
          {
            "node": "AI Response Generator",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Set File ID": {
      "main": [
        [
          {
            "node": "Delete Old Doc Rows",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Create Draft": {
      "ai_tool": [
        [
          {
            "node": "AI Response Generator",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "File Created": {
      "main": [
        [
          {
            "node": "Set File ID",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "File Updated": {
      "main": [
        [
          {
            "node": "Set File ID",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Download File": {
      "main": [
        [
          {
            "node": "Extract Document Text",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Email Monitor": {
      "main": [
        [
          {
            "node": "AI Email Classifier",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Embeddings OpenAI": {
      "ai_embedding": [
        [
          {
            "node": "Insert into Supabase Vectorstore",
            "type": "ai_embedding",
            "index": 0
          }
        ]
      ]
    },
    "Embeddings OpenAI1": {
      "ai_embedding": [
        [
          {
            "node": "Supabase Vector Store",
            "type": "ai_embedding",
            "index": 0
          }
        ]
      ]
    },
    "OpenAI Chat Model2": {
      "ai_languageModel": [
        [
          {
            "node": "AI Response Generator",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "OpenAI Chat Model3": {
      "ai_languageModel": [
        [
          {
            "node": "Vector Store Tool1",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Vector Store Tool1": {
      "ai_tool": [
        [
          {
            "node": "AI Response Generator",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "AI Email Classifier": {
      "main": [
        [
          {
            "node": "Route Email",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Default Data Loader": {
      "ai_document": [
        [
          {
            "node": "Insert into Supabase Vectorstore",
            "type": "ai_document",
            "index": 0
          }
        ]
      ]
    },
    "Delete Old Doc Rows": {
      "main": [
        [
          {
            "node": "Download File",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Extract Document Text": {
      "main": [
        [
          {
            "node": "Insert into Supabase Vectorstore",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Supabase Vector Store": {
      "ai_vectorStore": [
        [
          {
            "node": "Vector Store Tool1",
            "type": "ai_vectorStore",
            "index": 0
          }
        ]
      ]
    },
    "Recursive Character Text Splitter": {
      "ai_textSplitter": [
        [
          {
            "node": "Default Data Loader",
            "type": "ai_textSplitter",
            "index": 0
          }
        ]
      ]
    }
  }
}