{
  "name": "Dynamic AI model selector with GDPR compliance via Requesty and Google Sheets",
  "nodes": [
    {
      "id": "fb6de8aa-2c8f-488e-8002-7aeb96861b3d",
      "name": "Initialize Workflow",
      "type": "n8n-nodes-base.manualTrigger",
      "position": [
        -180,
        -1140
      ]
    },
    {
      "id": "5f73d2cb-368a-4ca6-af4a-7e97176b35c0",
      "name": "Fetch Available Models",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        40,
        -1040
      ]
    },
    {
      "id": "63d190c6-ac9d-41e7-8e36-a1a045c5cc13",
      "name": "Split Model Data",
      "type": "n8n-nodes-base.splitOut",
      "position": [
        260,
        -1040
      ]
    },
    {
      "id": "f95eb1c6-b6d7-492d-822c-02bc000c6749",
      "name": "Extract Model IDs",
      "type": "n8n-nodes-base.set",
      "position": [
        480,
        -1040
      ]
    },
    {
      "id": "b9595c92-7e9a-4688-aa12-bf558af42481",
      "name": "Get Current Workflow",
      "type": "n8n-nodes-base.n8n",
      "position": [
        480,
        -1240
      ]
    },
    {
      "id": "d8b903d3-53ec-47fd-9dfa-bdb131dae3bf",
      "name": "Merge Data",
      "type": "n8n-nodes-base.merge",
      "position": [
        700,
        -1140
      ]
    },
    {
      "id": "bc7dde1f-0afd-47c9-a851-ded2ceb37dbf",
      "name": "Update Dropdown Options",
      "type": "n8n-nodes-base.code",
      "position": [
        920,
        -1140
      ]
    },
    {
      "id": "f672fce1-7081-4fd1-a898-dddabe38f853",
      "name": "Update Workflow",
      "type": "n8n-nodes-base.n8n",
      "position": [
        1140,
        -1140
      ]
    },
    {
      "id": "6e12465c-2848-40fc-a1f8-ae2585d5882d",
      "name": "Model Selection Form",
      "type": "n8n-nodes-base.formTrigger",
      "position": [
        -180,
        -780
      ]
    },
    {
      "id": "fa81a3f1-0f28-4049-b6b2-f6f486e67e0d",
      "name": "Set Selected Model",
      "type": "n8n-nodes-base.set",
      "position": [
        40,
        -780
      ]
    },
    {
      "id": "0196af9b-aa3d-45bd-a6f1-92f96486ced9",
      "name": "Chat Interface",
      "type": "@n8n/n8n-nodes-langchain.chatTrigger",
      "position": [
        -180,
        -520
      ]
    },
    {
      "id": "6191c42f-ece1-421d-b9cf-c9ab213f2f36",
      "name": "AI API Request",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        480,
        -520
      ]
    },
    {
      "id": "ebcd8d4f-4d15-4755-971e-14a932adda23",
      "name": "Extract Response",
      "type": "n8n-nodes-base.set",
      "position": [
        700,
        -520
      ]
    },
    {
      "id": "0ced2b03-0d09-474a-be65-2f49ddcf95fa",
      "name": "Get Current Model",
      "type": "n8n-nodes-base.set",
      "position": [
        260,
        -520
      ]
    },
    {
      "id": "7379d69a-9066-48be-a163-fea478bb2cef",
      "name": "Save Model Selection",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        480,
        -780
      ]
    },
    {
      "id": "b8a03a91-5839-46e4-891c-e9793738f3dc",
      "name": "Clear Previous Selection",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        260,
        -780
      ]
    },
    {
      "id": "58bc8a11-7f9e-452a-ad0f-d05f3c56eda9",
      "name": "Read Current Model",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        40,
        -520
      ]
    },
    {
      "id": "9bcf3d2d-f320-44af-8c02-62b50a41a299",
      "name": "AI Agent (Optional)",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        40,
        -240
      ]
    },
    {
      "id": "32c0a603-b40e-4830-ab8d-592bcd3d9c58",
      "name": "OpenAI Chat Model",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "position": [
        40,
        20
      ]
    },
    {
      "id": "fb9667d4-2b39-4ba5-b67a-d3671f814124",
      "name": "Format Response",
      "type": "n8n-nodes-base.code",
      "position": [
        920,
        -520
      ]
    }
  ],
  "connections": {
    "Merge Data": {
      "main": [
        [
          {
            "node": "Update Dropdown Options",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "AI API Request": {
      "main": [
        [
          {
            "node": "Extract Response",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Chat Interface": {
      "main": [
        [
          {
            "node": "Read Current Model",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Extract Response": {
      "main": [
        [
          {
            "node": "Format Response",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Split Model Data": {
      "main": [
        [
          {
            "node": "Extract Model IDs",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Extract Model IDs": {
      "main": [
        [
          {
            "node": "Merge Data",
            "type": "main",
            "index": 1
          }
        ]
      ]
    },
    "Get Current Model": {
      "main": [
        [
          {
            "node": "AI API Request",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "OpenAI Chat Model": {
      "ai_languageModel": [
        [
          {
            "node": "AI Agent (Optional)",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Read Current Model": {
      "main": [
        [
          {
            "node": "Get Current Model",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Set Selected Model": {
      "main": [
        [
          {
            "node": "Clear Previous Selection",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Initialize Workflow": {
      "main": [
        [
          {
            "node": "Get Current Workflow",
            "type": "main",
            "index": 0
          },
          {
            "node": "Fetch Available Models",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get Current Workflow": {
      "main": [
        [
          {
            "node": "Merge Data",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Model Selection Form": {
      "main": [
        [
          {
            "node": "Set Selected Model",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Fetch Available Models": {
      "main": [
        [
          {
            "node": "Split Model Data",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Update Dropdown Options": {
      "main": [
        [
          {
            "node": "Update Workflow",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Clear Previous Selection": {
      "main": [
        [
          {
            "node": "Save Model Selection",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}