{
  "name": "Supabase RAG Data Pipeline",
  "nodes": [
    {
      "parameters": {
        "operation": "download",
        "fileId": {
          "__rl": true,
          "value": "={{ $json.id }}",
          "mode": "id"
        },
        "options": {}
      },
      "type": "n8n-nodes-base.googleDrive",
      "typeVersion": 3,
      "position": [
        272,
        -16
      ],
      "id": "a1fcbb98-b248-4cab-895a-f54c6a4c15d9",
      "name": "Download file",
      "credentials": {
        "googleDriveOAuth2Api": {
          "id": "VqZzm5YeRMOeGO9B",
          "name": "Google Drive account (kris)"
        }
      }
    },
    {
      "parameters": {
        "options": {}
      },
      "type": "@n8n/n8n-nodes-langchain.embeddingsOpenAi",
      "typeVersion": 1.2,
      "position": [
        416,
        192
      ],
      "id": "19264f55-995b-475f-8891-e072b5fb713d",
      "name": "Embeddings OpenAI",
      "credentials": {
        "openAiApi": {
          "id": "MzIepidaRw9ZqcPB",
          "name": "OpenAi account Credentials"
        }
      }
    },
    {
      "parameters": {
        "dataType": "binary",
        "options": {
          "metadata": {
            "metadataValues": [
              {
                "name": "fileName",
                "value": "={{ $('Download file').item.json.name }}"
              },
              {
                "name": "date",
                "value": "={{ $now }}"
              }
            ]
          }
        }
      },
      "type": "@n8n/n8n-nodes-langchain.documentDefaultDataLoader",
      "typeVersion": 1.1,
      "position": [
        576,
        192
      ],
      "id": "39599890-6cd3-4098-96b2-f31ddfbfbac2",
      "name": "Default Data Loader"
    },
    {
      "parameters": {
        "mode": "insert",
        "tableName": {
          "__rl": true,
          "value": "documents",
          "mode": "list",
          "cachedResultName": "documents"
        },
        "options": {}
      },
      "type": "@n8n/n8n-nodes-langchain.vectorStoreSupabase",
      "typeVersion": 1.3,
      "position": [
        480,
        -16
      ],
      "id": "7ba5537b-3d6c-44ed-84f2-38bbd08a4c5f",
      "name": "Supabase Vector Store",
      "credentials": {
        "supabaseApi": {
          "id": "9Fbf9AeUcOIvgivh",
          "name": "Supabase account 2"
        }
      }
    },
    {
      "parameters": {
        "operation": "download",
        "fileId": {
          "__rl": true,
          "value": "={{ $('Google Drive - Update Trigger').item.json.id }}",
          "mode": "id"
        },
        "options": {}
      },
      "type": "n8n-nodes-base.googleDrive",
      "typeVersion": 3,
      "position": [
        1408,
        0
      ],
      "id": "7e298820-6085-4d44-853a-9c13f27ed405",
      "name": "Download file1",
      "executeOnce": true,
      "credentials": {
        "googleDriveOAuth2Api": {
          "id": "VqZzm5YeRMOeGO9B",
          "name": "Google Drive account (kris)"
        }
      }
    },
    {
      "parameters": {
        "options": {}
      },
      "type": "@n8n/n8n-nodes-langchain.embeddingsOpenAi",
      "typeVersion": 1.2,
      "position": [
        1584,
        176
      ],
      "id": "8fa426d3-872c-4b48-b628-3f7825da2073",
      "name": "Embeddings OpenAI1",
      "credentials": {
        "openAiApi": {
          "id": "MzIepidaRw9ZqcPB",
          "name": "OpenAi account Credentials"
        }
      }
    },
    {
      "parameters": {
        "dataType": "binary",
        "options": {
          "metadata": {
            "metadataValues": [
              {
                "name": "fileName",
                "value": "={{ $('Download file1').item.json.metadata.fileName }}"
              },
              {
                "name": "date",
                "value": "={{ $now }}"
              }
            ]
          }
        }
      },
      "type": "@n8n/n8n-nodes-langchain.documentDefaultDataLoader",
      "typeVersion": 1.1,
      "position": [
        1776,
        192
      ],
      "id": "be14812e-db48-4f1d-b4a4-a277fc5e4f38",
      "name": "Default Data Loader1"
    },
    {
      "parameters": {
        "mode": "insert",
        "tableName": {
          "__rl": true,
          "value": "documents",
          "mode": "list",
          "cachedResultName": "documents"
        },
        "options": {}
      },
      "type": "@n8n/n8n-nodes-langchain.vectorStoreSupabase",
      "typeVersion": 1.3,
      "position": [
        1584,
        0
      ],
      "id": "5ffdfad0-4dc2-411f-8105-2fea181ceac0",
      "name": "Supabase Vector Store1",
      "credentials": {
        "supabaseApi": {
          "id": "9Fbf9AeUcOIvgivh",
          "name": "Supabase account 2"
        }
      }
    },
    {
      "parameters": {
        "content": "## 2. Update Pipeline",
        "height": 432,
        "width": 1152,
        "color": 6
      },
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        864,
        -96
      ],
      "typeVersion": 1,
      "id": "67443110-ce5a-4bfd-9fd9-6ddfde3516ec",
      "name": "Sticky Note"
    },
    {
      "parameters": {
        "content": "## 1. Create Pipeline",
        "height": 432,
        "width": 928,
        "color": 4
      },
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -96,
        -96
      ],
      "typeVersion": 1,
      "id": "4a97918c-d6f3-4c44-8227-73bf4c919953",
      "name": "Sticky Note1"
    },
    {
      "parameters": {
        "content": "## 3. Archive Pipeline",
        "height": 432,
        "width": 672,
        "color": 3
      },
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        2080,
        -96
      ],
      "typeVersion": 1,
      "id": "d0f4b0a4-44ba-4f85-ba53-2c7000e60683",
      "name": "Sticky Note2"
    },
    {
      "parameters": {
        "pollTimes": {
          "item": [
            {
              "mode": "everyMinute"
            }
          ]
        },
        "triggerOn": "specificFolder",
        "folderToWatch": {
          "__rl": true,
          "value": "1X6ycKB2ptYwILwPWPdTiRoBoDs6_WBNn",
          "mode": "list",
          "cachedResultName": "Ai Agent Knowledge Base",
          "cachedResultUrl": "https://drive.google.com/drive/folders/1X6ycKB2ptYwILwPWPdTiRoBoDs6_WBNn"
        },
        "event": "fileUpdated",
        "options": {}
      },
      "type": "n8n-nodes-base.googleDriveTrigger",
      "typeVersion": 1,
      "position": [
        1024,
        0
      ],
      "id": "8086b622-b0c2-4852-8d65-e12c38b33135",
      "name": "Google Drive - Update Trigger",
      "credentials": {
        "googleDriveOAuth2Api": {
          "id": "VqZzm5YeRMOeGO9B",
          "name": "Google Drive account (kris)"
        }
      }
    },
    {
      "parameters": {
        "pollTimes": {
          "item": [
            {
              "mode": "everyMinute"
            }
          ]
        },
        "triggerOn": "specificFolder",
        "folderToWatch": {
          "__rl": true,
          "value": "1X6ycKB2ptYwILwPWPdTiRoBoDs6_WBNn",
          "mode": "list",
          "cachedResultName": "Ai Agent Knowledge Base",
          "cachedResultUrl": "https://drive.google.com/drive/folders/1X6ycKB2ptYwILwPWPdTiRoBoDs6_WBNn"
        },
        "event": "fileCreated",
        "options": {}
      },
      "type": "n8n-nodes-base.googleDriveTrigger",
      "typeVersion": 1,
      "position": [
        48,
        -16
      ],
      "id": "7d083a14-c342-45e7-bcdd-f5fc5c7594d1",
      "name": "Google Drive - Create Trigger",
      "credentials": {
        "googleDriveOAuth2Api": {
          "id": "VqZzm5YeRMOeGO9B",
          "name": "Google Drive account (kris)"
        }
      }
    },
    {
      "parameters": {
        "operation": "update",
        "tableId": "documents",
        "filterType": "string",
        "filterString": "=metadata->>fileName=ilike.*{{$json.name}}*",
        "fieldsUi": {
          "fieldValues": [
            {
              "fieldId": "isActive",
              "fieldValue": "false"
            }
          ]
        }
      },
      "type": "n8n-nodes-base.supabase",
      "typeVersion": 1,
      "position": [
        1232,
        0
      ],
      "id": "370a21bd-9a7b-4f79-b2ab-fa85d11333b1",
      "name": "Archive Rows",
      "credentials": {
        "supabaseApi": {
          "id": "9Fbf9AeUcOIvgivh",
          "name": "Supabase account 2"
        }
      }
    },
    {
      "parameters": {
        "operation": "update",
        "tableId": "documents",
        "filterType": "string",
        "filterString": "=metadata->>fileName=ilike.*{{$json.name}}*",
        "fieldsUi": {
          "fieldValues": [
            {
              "fieldId": "isActive",
              "fieldValue": "false"
            }
          ]
        }
      },
      "type": "n8n-nodes-base.supabase",
      "typeVersion": 1,
      "position": [
        2416,
        16
      ],
      "id": "556c7999-ab86-4597-9f79-09e505503c2b",
      "name": "Archive Rows1",
      "credentials": {
        "supabaseApi": {
          "id": "9Fbf9AeUcOIvgivh",
          "name": "Supabase account 2"
        }
      }
    },
    {
      "parameters": {
        "rule": {
          "interval": [
            {}
          ]
        }
      },
      "type": "n8n-nodes-base.scheduleTrigger",
      "typeVersion": 1.2,
      "position": [
        48,
        528
      ],
      "id": "9e8bff17-691a-47f5-b7f7-f36761d27930",
      "name": "Schedule Trigger"
    },
    {
      "parameters": {
        "content": "## 4. Health Check / Reconciliation\n",
        "height": 832,
        "width": 2848,
        "color": 5
      },
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -96,
        384
      ],
      "typeVersion": 1,
      "id": "9767ddc0-098c-4337-a54d-ef48fe08e702",
      "name": "Sticky Note3"
    },
    {
      "parameters": {
        "resource": "fileFolder",
        "returnAll": true,
        "filter": {
          "folderId": {
            "__rl": true,
            "value": "1X6ycKB2ptYwILwPWPdTiRoBoDs6_WBNn",
            "mode": "list",
            "cachedResultName": "Ai Agent Knowledge Base",
            "cachedResultUrl": "https://drive.google.com/drive/folders/1X6ycKB2ptYwILwPWPdTiRoBoDs6_WBNn"
          }
        },
        "options": {}
      },
      "type": "n8n-nodes-base.googleDrive",
      "typeVersion": 3,
      "position": [
        240,
        528
      ],
      "id": "f182d7c0-ae21-4ae0-b4d4-2c6a2dd06d47",
      "name": "Search files and folders",
      "credentials": {
        "googleDriveOAuth2Api": {
          "id": "VqZzm5YeRMOeGO9B",
          "name": "Google Drive account (kris)"
        }
      }
    },
    {
      "parameters": {
        "operation": "download",
        "fileId": {
          "__rl": true,
          "value": "={{ $('Search files and folders').item.json.id }}",
          "mode": "id"
        },
        "options": {}
      },
      "type": "n8n-nodes-base.googleDrive",
      "typeVersion": 3,
      "position": [
        1904,
        528
      ],
      "id": "b3ca3e80-6a4d-47c4-a5a0-694219754060",
      "name": "Download file2",
      "credentials": {
        "googleDriveOAuth2Api": {
          "id": "VqZzm5YeRMOeGO9B",
          "name": "Google Drive account (kris)"
        }
      }
    },
    {
      "parameters": {
        "options": {}
      },
      "type": "@n8n/n8n-nodes-langchain.embeddingsOpenAi",
      "typeVersion": 1.2,
      "position": [
        2112,
        896
      ],
      "id": "eab4d5a6-247e-473c-ab75-83f820301174",
      "name": "Embeddings OpenAI2",
      "credentials": {
        "openAiApi": {
          "id": "MzIepidaRw9ZqcPB",
          "name": "OpenAi account Credentials"
        }
      }
    },
    {
      "parameters": {
        "dataType": "binary",
        "options": {
          "metadata": {
            "metadataValues": [
              {
                "name": "fileName",
                "value": "={{ $('Download file2').item.json.name }}"
              },
              {
                "name": "date",
                "value": "={{ $now }}"
              }
            ]
          }
        }
      },
      "type": "@n8n/n8n-nodes-langchain.documentDefaultDataLoader",
      "typeVersion": 1.1,
      "position": [
        2368,
        928
      ],
      "id": "d4bff47b-50d6-4883-8271-cc2f6685d2eb",
      "name": "Default Data Loader2"
    },
    {
      "parameters": {
        "mode": "insert",
        "tableName": {
          "__rl": true,
          "value": "documents",
          "mode": "list",
          "cachedResultName": "documents"
        },
        "options": {}
      },
      "type": "@n8n/n8n-nodes-langchain.vectorStoreSupabase",
      "typeVersion": 1.3,
      "position": [
        2176,
        528
      ],
      "id": "bb0932fc-1d00-4fea-9cf0-d0701032db39",
      "name": "Supabase Vector Store2",
      "credentials": {
        "supabaseApi": {
          "id": "9Fbf9AeUcOIvgivh",
          "name": "Supabase account 2"
        }
      }
    },
    {
      "parameters": {
        "operation": "getAll",
        "tableId": "documents",
        "returnAll": true,
        "matchType": "allFilters",
        "filters": {
          "conditions": [
            {
              "keyName": "=metadata->>fileName",
              "condition": "eq",
              "keyValue": "={{ $json.name }}"
            },
            {
              "keyName": "isActive",
              "condition": "eq",
              "keyValue": "true"
            }
          ]
        }
      },
      "type": "n8n-nodes-base.supabase",
      "typeVersion": 1,
      "position": [
        992,
        640
      ],
      "id": "726be101-3f66-4f0e-af12-eaafd4f46688",
      "name": "Get many rows",
      "alwaysOutputData": true,
      "credentials": {
        "supabaseApi": {
          "id": "9Fbf9AeUcOIvgivh",
          "name": "Supabase account 2"
        }
      }
    },
    {
      "parameters": {
        "options": {
          "reset": false
        }
      },
      "type": "n8n-nodes-base.splitInBatches",
      "typeVersion": 3,
      "position": [
        448,
        528
      ],
      "id": "e30f24be-b28f-4e02-b641-c0726fa27ef1",
      "name": "Loop Over Items"
    },
    {
      "parameters": {
        "conditions": {
          "options": {
            "caseSensitive": true,
            "leftValue": "",
            "typeValidation": "strict",
            "version": 2
          },
          "conditions": [
            {
              "id": "d11b4827-0e2d-4ac6-8789-5c2680c8bf32",
              "leftValue": "={{ $json.id }}",
              "rightValue": "",
              "operator": {
                "type": "number",
                "operation": "exists",
                "singleValue": true
              }
            }
          ],
          "combinator": "and"
        },
        "options": {}
      },
      "type": "n8n-nodes-base.if",
      "typeVersion": 2.2,
      "position": [
        1600,
        512
      ],
      "id": "4665715f-aea4-4d30-b313-38e585f6c79f",
      "name": "Active Record Exists?"
    },
    {
      "parameters": {
        "conditions": {
          "options": {
            "caseSensitive": true,
            "leftValue": "",
            "typeValidation": "strict",
            "version": 2
          },
          "conditions": [
            {
              "id": "d11b4827-0e2d-4ac6-8789-5c2680c8bf32",
              "leftValue": "={{ $item(\"0\").$node[\"Get many rows\"].json }}",
              "rightValue": "",
              "operator": {
                "type": "object",
                "operation": "notEmpty",
                "singleValue": true
              }
            }
          ],
          "combinator": "and"
        },
        "options": {}
      },
      "type": "n8n-nodes-base.if",
      "typeVersion": 2.2,
      "position": [
        1248,
        720
      ],
      "id": "41464e1e-3651-4b43-b763-7b543d22dc3e",
      "name": "Active Record Exists?1"
    },
    {
      "parameters": {
        "assignments": {
          "assignments": [
            {
              "id": "d7c328b8-b6c4-4330-9acc-82364c5a2663",
              "name": "name",
              "value": "={{ $json.name }}",
              "type": "string"
            }
          ]
        },
        "options": {}
      },
      "type": "n8n-nodes-base.set",
      "typeVersion": 3.4,
      "position": [
        736,
        624
      ],
      "id": "eef80164-1d5f-4018-95a6-9f443401d583",
      "name": "Set File Name"
    },
    {
      "parameters": {
        "assignments": {
          "assignments": [
            {
              "id": "d7c328b8-b6c4-4330-9acc-82364c5a2663",
              "name": "name",
              "value": "={{ $('Set File Name').item.json.name }}",
              "type": "string"
            }
          ]
        },
        "options": {}
      },
      "type": "n8n-nodes-base.set",
      "typeVersion": 3.4,
      "position": [
        1552,
        928
      ],
      "id": "7a473a3b-7e76-4d7d-be9f-ba1007931c73",
      "name": "Set File Name To Create Rows"
    },
    {
      "parameters": {
        "content": "## RAG Vector Data Pipeline",
        "height": 1504,
        "width": 3008
      },
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -160,
        -192
      ],
      "typeVersion": 1,
      "id": "096015f1-5720-4a6a-bcec-6d7be4fcd60a",
      "name": "Sticky Note4"
    },
    {
      "parameters": {
        "content": "## Customer Service Agent",
        "height": 800,
        "width": 2992
      },
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -160,
        -1040
      ],
      "typeVersion": 1,
      "id": "48154479-a20d-4729-91f2-ed80905add48",
      "name": "Sticky Note5"
    },
    {
      "parameters": {
        "content": "",
        "height": 640,
        "width": 2816,
        "color": 7
      },
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -80,
        -944
      ],
      "typeVersion": 1,
      "id": "ecab47b2-1dcb-4f9d-b9a2-851c1f249851",
      "name": "Sticky Note6"
    },
    {
      "parameters": {
        "model": {
          "__rl": true,
          "mode": "list",
          "value": "gpt-4o-mini"
        },
        "options": {}
      },
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "typeVersion": 1.2,
      "position": [
        496,
        -576
      ],
      "id": "9d2b0b2a-0fb4-44df-9cb4-7e6e26ff093b",
      "name": "OpenAI Chat Model",
      "credentials": {
        "openAiApi": {
          "id": "MzIepidaRw9ZqcPB",
          "name": "OpenAi account Credentials"
        }
      }
    },
    {
      "parameters": {},
      "type": "@n8n/n8n-nodes-langchain.memoryBufferWindow",
      "typeVersion": 1.3,
      "position": [
        720,
        -576
      ],
      "id": "a1df1248-61ed-470a-9889-cbacf1cf033b",
      "name": "Simple Memory"
    },
    {
      "parameters": {
        "options": {}
      },
      "type": "@n8n/n8n-nodes-langchain.embeddingsOpenAi",
      "typeVersion": 1.2,
      "position": [
        864,
        -448
      ],
      "id": "2c84d7a3-8dbb-4c08-a29d-40847cde2d62",
      "name": "Embeddings OpenAI3",
      "credentials": {
        "openAiApi": {
          "id": "MzIepidaRw9ZqcPB",
          "name": "OpenAi account Credentials"
        }
      }
    },
    {
      "parameters": {
        "options": {}
      },
      "type": "@n8n/n8n-nodes-langchain.chatTrigger",
      "typeVersion": 1.3,
      "position": [
        128,
        -752
      ],
      "id": "cc9b6723-3ab9-4fd5-83b1-d7f20b5ff2a2",
      "name": "When chat message received",
      "webhookId": "90ee98f2-39dc-4684-ab54-ea04e49ba48f"
    },
    {
      "parameters": {
        "options": {
          "systemMessage": "You are a customer support assistant.\nUse the Supabase vector store to find relevant company information and answer the user's question accurately.\nOnly search for rows where IsActive = true"
        }
      },
      "type": "@n8n/n8n-nodes-langchain.agent",
      "typeVersion": 1.8,
      "position": [
        624,
        -848
      ],
      "id": "9fd0bc26-8012-44e6-bb2f-5a6c3e88e5e4",
      "name": "Customer Support Agent"
    },
    {
      "parameters": {
        "mode": "retrieve-as-tool",
        "toolDescription": "retrieve the information from Supabase",
        "tableName": {
          "__rl": true,
          "value": "documents",
          "mode": "list",
          "cachedResultName": "documents"
        },
        "topK": 20,
        "includeDocumentMetadata": false,
        "options": {
          "queryName": "match_documents"
        }
      },
      "type": "@n8n/n8n-nodes-langchain.vectorStoreSupabase",
      "typeVersion": 1.3,
      "position": [
        976,
        -640
      ],
      "id": "11b65445-83c7-4ef7-8563-ec3979386b5d",
      "name": "Supabase Vector Store3",
      "credentials": {
        "supabaseApi": {
          "id": "9Fbf9AeUcOIvgivh",
          "name": "Supabase account 2"
        }
      }
    },
    {
      "parameters": {
        "pollTimes": {
          "item": [
            {
              "mode": "everyMinute"
            }
          ]
        },
        "triggerOn": "specificFolder",
        "folderToWatch": {
          "__rl": true,
          "value": "1MXZZ1aBSmo5EoSgF4GktNmoMeeApeEQ_",
          "mode": "list",
          "cachedResultName": "Trash Can - RAG DEMO",
          "cachedResultUrl": "https://drive.google.com/drive/folders/1MXZZ1aBSmo5EoSgF4GktNmoMeeApeEQ_"
        },
        "event": "fileCreated",
        "options": {}
      },
      "type": "n8n-nodes-base.googleDriveTrigger",
      "typeVersion": 1,
      "position": [
        2192,
        16
      ],
      "id": "f707cd2b-5da9-4e81-ab00-7ad7cbab63e0",
      "name": "Google Drive - Archive Trigger",
      "credentials": {
        "googleDriveOAuth2Api": {
          "id": "VqZzm5YeRMOeGO9B",
          "name": "Google Drive account (kris)"
        }
      }
    }
  ],
  "pinData": {},
  "connections": {
    "Download file": {
      "main": [
        [
          {
            "node": "Supabase Vector Store",
            "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
          }
        ]
      ]
    },
    "Download file1": {
      "main": [
        [
          {
            "node": "Supabase Vector Store1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Embeddings OpenAI1": {
      "ai_embedding": [
        [
          {
            "node": "Supabase Vector Store1",
            "type": "ai_embedding",
            "index": 0
          }
        ]
      ]
    },
    "Default Data Loader1": {
      "ai_document": [
        [
          {
            "node": "Supabase Vector Store1",
            "type": "ai_document",
            "index": 0
          }
        ]
      ]
    },
    "Google Drive - Update Trigger": {
      "main": [
        [
          {
            "node": "Archive Rows",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Google Drive - Create Trigger": {
      "main": [
        [
          {
            "node": "Download file",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Supabase Vector Store": {
      "main": [
        []
      ]
    },
    "Archive Rows": {
      "main": [
        [
          {
            "node": "Download file1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Schedule Trigger": {
      "main": [
        [
          {
            "node": "Search files and folders",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Search files and folders": {
      "main": [
        [
          {
            "node": "Loop Over Items",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Download file2": {
      "main": [
        [
          {
            "node": "Supabase Vector Store2",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Embeddings OpenAI2": {
      "ai_embedding": [
        [
          {
            "node": "Supabase Vector Store2",
            "type": "ai_embedding",
            "index": 0
          }
        ]
      ]
    },
    "Default Data Loader2": {
      "ai_document": [
        [
          {
            "node": "Supabase Vector Store2",
            "type": "ai_document",
            "index": 0
          }
        ]
      ]
    },
    "Supabase Vector Store2": {
      "main": [
        []
      ]
    },
    "Get many rows": {
      "main": [
        [
          {
            "node": "Active Record Exists?1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Loop Over Items": {
      "main": [
        [
          {
            "node": "Active Record Exists?",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Set File Name",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Active Record Exists?": {
      "main": [
        [],
        [
          {
            "node": "Download file2",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Active Record Exists?1": {
      "main": [
        [
          {
            "node": "Loop Over Items",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Set File Name To Create Rows",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Set File Name": {
      "main": [
        [
          {
            "node": "Get many rows",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Set File Name To Create Rows": {
      "main": [
        [
          {
            "node": "Loop Over Items",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "OpenAI Chat Model": {
      "ai_languageModel": [
        [
          {
            "node": "Customer Support Agent",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Simple Memory": {
      "ai_memory": [
        [
          {
            "node": "Customer Support Agent",
            "type": "ai_memory",
            "index": 0
          }
        ]
      ]
    },
    "Embeddings OpenAI3": {
      "ai_embedding": [
        [
          {
            "node": "Supabase Vector Store3",
            "type": "ai_embedding",
            "index": 0
          }
        ]
      ]
    },
    "When chat message received": {
      "main": [
        [
          {
            "node": "Customer Support Agent",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Supabase Vector Store3": {
      "ai_tool": [
        [
          {
            "node": "Customer Support Agent",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "Google Drive - Archive Trigger": {
      "main": [
        [
          {
            "node": "Archive Rows1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  },
  "active": false,
  "settings": {
    "executionOrder": "v1"
  },
  "versionId": "06ac7e10-ebe9-47d8-ab95-f0d8aa60056b",
  "meta": {
    "templateCredsSetupCompleted": true,
    "instanceId": "4aabc0aa2e160dafa4f9d9bcedde563b5af29598cd16960f637ae2fb99aea720"
  },
  "id": "YNHJD8SxcCdv2xX1",
  "tags": []
}