{
  "name": "Airbnb Guest Assistant",
  "nodes": [
    {
      "id": "b2c3d4e5-2222-4000-8000-000000000001",
      "name": "When chat message received",
      "type": "@n8n/n8n-nodes-langchain.triggerChat",
      "typeVersion": 1,
      "position": [-880, 300],
      "parameters": {}
    },
    {
      "id": "b2c3d4e5-2222-4000-8000-000000000002",
      "name": "Captures session id",
      "type": "n8n-nodes-base.code",
      "typeVersion": 2,
      "position": [-680, 300],
      "parameters": {
        "jsCode": "const sessionId = $json.sessionId || $json.chatInput?.sessionId || 'session-' + Date.now();\nreturn [{ json: { ...$json, capturedSessionId: sessionId } }];"
      }
    },
    {
      "id": "b2c3d4e5-2222-4000-8000-000000000003",
      "name": "Google Drive",
      "type": "n8n-nodes-base.googleDrive",
      "typeVersion": 3,
      "position": [-480, 120],
      "parameters": {
        "operation": "list",
        "options": { "queryString": "name contains 'house-manual' or name contains 'welcome-guide'" }
      },
      "credentials": { "googleDriveOAuth2Api": { "id": null, "name": "Google Drive OAuth2" } }
    },
    {
      "id": "b2c3d4e5-2222-4000-8000-000000000004",
      "name": "Get File Content",
      "type": "n8n-nodes-base.googleDrive",
      "typeVersion": 3,
      "position": [-280, 120],
      "parameters": { "operation": "download", "fileId": "={{$json.id}}" },
      "credentials": { "googleDriveOAuth2Api": { "id": null, "name": "Google Drive OAuth2" } }
    },
    {
      "id": "b2c3d4e5-2222-4000-8000-000000000005",
      "name": "Extract from File",
      "type": "n8n-nodes-base.extractFromFile",
      "typeVersion": 1,
      "position": [-80, 120],
      "parameters": { "operation": "text" }
    },
    {
      "id": "b2c3d4e5-2222-4000-8000-000000000006",
      "name": "Default Data Loader",
      "type": "@n8n/n8n-nodes-langchain.documentDefaultDataLoader",
      "typeVersion": 1,
      "position": [120, 120],
      "parameters": {}
    },
    {
      "id": "b2c3d4e5-2222-4000-8000-000000000007",
      "name": "Character Text Splitter",
      "type": "@n8n/n8n-nodes-langchain.textSplitterCharacterTextSplitter",
      "typeVersion": 1,
      "position": [320, 120],
      "parameters": { "chunkSize": 500, "chunkOverlap": 50 }
    },
    {
      "id": "b2c3d4e5-2222-4000-8000-000000000008",
      "name": "Embeddings OpenAI (Docs)",
      "type": "@n8n/n8n-nodes-langchain.embeddingsOpenAi",
      "typeVersion": 1,
      "position": [520, 20],
      "parameters": { "model": "text-embedding-3-small" },
      "credentials": { "openAiApi": { "id": null, "name": "OpenAI API" } }
    },
    {
      "id": "b2c3d4e5-2222-4000-8000-000000000009",
      "name": "Pinecone Vector Store (Docs)",
      "type": "@n8n/n8n-nodes-langchain.vectorStorePinecone",
      "typeVersion": 1,
      "position": [720, 120],
      "parameters": { "pineconeIndex": "airbnb-docs", "pineconeNamespace": "house-manuals" },
      "credentials": { "pineconeApi": { "id": null, "name": "Pinecone API" } }
    },
    {
      "id": "b2c3d4e5-2222-4000-8000-000000000010",
      "name": "Embeddings OpenAI (Agent)",
      "type": "@n8n/n8n-nodes-langchain.embeddingsOpenAi",
      "typeVersion": 1,
      "position": [160, 500],
      "parameters": { "model": "text-embedding-3-small" },
      "credentials": { "openAiApi": { "id": null, "name": "OpenAI API" } }
    },
    {
      "id": "b2c3d4e5-2222-4000-8000-000000000011",
      "name": "Pinecone Vector Store (Agent)",
      "type": "@n8n/n8n-nodes-langchain.vectorStorePinecone",
      "typeVersion": 1,
      "position": [360, 500],
      "parameters": { "pineconeIndex": "airbnb-docs", "pineconeNamespace": "house-manuals" },
      "credentials": { "pineconeApi": { "id": null, "name": "Pinecone API" } }
    },
    {
      "id": "b2c3d4e5-2222-4000-8000-000000000012",
      "name": "Vector Store Tool",
      "type": "@n8n/n8n-nodes-langchain.toolVectorStore",
      "typeVersion": 1,
      "position": [560, 500],
      "parameters": { "description": "Search the house manual for property info." }
    },
    {
      "id": "b2c3d4e5-2222-4000-8000-000000000013",
      "name": "SerpAPI",
      "type": "@n8n/n8n-nodes-langchain.toolSerpApi",
      "typeVersion": 1,
      "position": [560, 680],
      "parameters": { "description": "Search Google for local info." },
      "credentials": { "serpApi": { "id": null, "name": "SerpAPI" } }
    },
    {
      "id": "b2c3d4e5-2222-4000-8000-000000000014",
      "name": "Zep Memory",
      "type": "@n8n/n8n-nodes-langchain.memoryZep",
      "typeVersion": 1,
      "position": [560, 860],
      "parameters": { "sessionId": "={{$json.capturedSessionId}}", "baseURL": "http://localhost:8000" },
      "credentials": { "zepApi": { "id": null, "name": "Zep API" } }
    },
    {
      "id": "b2c3d4e5-2222-4000-8000-000000000015",
      "name": "OpenAI Chat Model",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "typeVersion": 1,
      "position": [160, 300],
      "parameters": { "options": { "model": "gpt-4", "temperature": 0.7, "maxTokens": 2000 } },
      "credentials": { "openAiApi": { "id": null, "name": "OpenAI API" } }
    },
    {
      "id": "b2c3d4e5-2222-4000-8000-000000000016",
      "name": "RAG AI Agent",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "typeVersion": 1,
      "position": [760, 300],
      "parameters": {
        "agentType": "toolsAgent",
        "systemMessage": "You are a helpful Airbnb guest assistant. Answer questions about the property and local area using your tools."
      }
    },
    {
      "id": "b2c3d4e5-2222-4000-8000-000000000017",
      "name": "Code",
      "type": "n8n-nodes-base.code",
      "typeVersion": 2,
      "position": [1160, 300],
      "parameters": {
        "jsCode": "const r = $input.first().json;\nreturn [{ json: { output: r.output || r.text } }];"
      }
    },
    {
      "id": "b2c3d4e5-2222-4000-8000-000000000018",
      "name": "Google Sheets",
      "type": "n8n-nodes-base.googleSheets",
      "typeVersion": 4,
      "position": [1360, 300],
      "parameters": {
        "operation": "appendOrUpdate", "resource": "sheet",
        "sheetName": "Conversations",
        "columns": { "mappingMode": "defineBelow", "value": "sessionId,query,response,timestamp" }
      },
      "credentials": { "googleSheetsOAuth2Api": { "id": null, "name": "Google Sheets OAuth2" } }
    }
  ],
  "connections": {
    "When chat message received": { "main": [[{ "node": "Captures session id", "type": "main", "index": 0 }]] },
    "Captures session id": { "main": [[{ "node": "RAG AI Agent", "type": "main", "index": 0 }]] },
    "Google Drive": { "main": [[{ "node": "Get File Content", "type": "main", "index": 0 }]] },
    "Get File Content": { "main": [[{ "node": "Extract from File", "type": "main", "index": 0 }]] },
    "Extract from File": { "main": [[{ "node": "Default Data Loader", "type": "main", "index": 0 }]] },
    "Default Data Loader": { "main": [[{ "node": "Character Text Splitter", "type": "main", "index": 0 }]] },
    "Character Text Splitter": { "main": [[{ "node": "Pinecone Vector Store (Docs)", "type": "main", "index": 0 }]] },
    "Embeddings OpenAI (Docs)": { "ai_embedding": [[{ "node": "Pinecone Vector Store (Docs)", "type": "ai_embedding", "index": 0 }]] },
    "Embeddings OpenAI (Agent)": { "ai_embedding": [[{ "node": "Pinecone Vector Store (Agent)", "type": "ai_embedding", "index": 0 }]] },
    "Pinecone Vector Store (Agent)": { "ai_vectorStore": [[{ "node": "Vector Store Tool", "type": "ai_vectorStore", "index": 0 }]] },
    "Vector Store Tool": { "ai_tool": [[{ "node": "RAG AI Agent", "type": "ai_tool", "index": 0 }]] },
    "SerpAPI": { "ai_tool": [[{ "node": "RAG AI Agent", "type": "ai_tool", "index": 0 }]] },
    "Zep Memory": { "ai_memory": [[{ "node": "RAG AI Agent", "type": "ai_memory", "index": 0 }]] },
    "OpenAI Chat Model": { "ai_languageModel": [[{ "node": "RAG AI Agent", "type": "ai_languageModel", "index": 0 }]] },
    "RAG AI Agent": { "main": [[{ "node": "Code", "type": "main", "index": 0 }]] },
    "Code": { "main": [[{ "node": "Google Sheets", "type": "main", "index": 0 }]] }
  },
  "settings": { "executionOrder": "v1" },
  "staticData": null,
  "pinData": {},
  "triggerCount": 1,
  "meta": { "templateCredsSetupCompleted": true }
}
