{
  "nodes": [
    {
      "id": "e559ce26-07d1-4bca-aa53-082ff8480e63",
      "name": "When chat message received",
      "type": "@n8n/n8n-nodes-langchain.chatTrigger",
      "position": [
        -384,
        -192
      ],
      "parameters": {
        "options": {}
      },
      "typeVersion": 1.3
    },
    {
      "id": "517129d9-18fc-4bf3-8193-8d8ed8fb8b1f",
      "name": "AI Agent",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        -112,
        -192
      ],
      "parameters": {
        "options": {
          "systemMessage": "You are a professional Data Analysis Assistant specialized in Excel datasets. You never assume what the user wants — you only respond based on their exact question. Behavior & Tone: - Clear, concise, and professional. - Always answer in plain English, avoiding unnecessary jargon. - Use short, structured insights (bullets, small tables, or compact summaries). - Keep responses brief but meaningful — no long reports unless explicitly requested. - Provide actionable insights when appropriate, but do not invent analysis that was not asked. Instructions: 1. Only analyze the Excel data when the user asks a specific question. 2. Never output full raw data unless explicitly requested. 3. Present results in a compact format (e.g., weekly breakdown, totals, highlights) if the question relates to time or quantities. 4. If the data is insufficient, state the limitation clearly. 5. Keep a balanced tone: informative, decision-oriented, and easy to understand. 6. Never assume tasks — wait for user instructions before analyzing. 7. If a recommendation is reasonable (like stocking, trends, or anomalies), keep it short and relevant to the user’s query."
        }
      },
      "typeVersion": 2.2
    },
    {
      "id": "ed8f4fe1-272f-4657-ac41-36ffb7456bb1",
      "name": "Simple Memory",
      "type": "@n8n/n8n-nodes-langchain.memoryBufferWindow",
      "position": [
        -16,
        32
      ],
      "parameters": {},
      "typeVersion": 1.3
    },
    {
      "id": "d1a293d6-7e5b-4543-9107-9caf45b4051a",
      "name": "Retrieve bakery data",
      "type": "n8n-nodes-base.googleSheetsTool",
      "position": [
        320,
        -80
      ],
      "parameters": {
        "options": {},
        "sheetName": {
          "__rl": true,
          "mode": "list",
          "value": 764145761,
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1dCCQzjoDZak-mQD1iyGd5aHKGFeh15fsBPUIoTgAYGw/edit#gid=764145761",
          "cachedResultName": "Full Month"
        },
        "documentId": {
          "__rl": true,
          "mode": "list",
          "value": "1dCCQzjoDZak-mQD1iyGd5aHKGFeh15fsBPUIoTgAYGw",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1dCCQzjoDZak-mQD1iyGd5aHKGFeh15fsBPUIoTgAYGw/edit?usp=drivesdk",
          "cachedResultName": "Bakery data 1 month"
        }
      },
      "typeVersion": 4.7
    },
    {
      "id": "1106cbea-591d-4dd4-88dd-03ad52052e38",
      "name": "Azure OpenAI Chat Model",
      "type": "@n8n/n8n-nodes-langchain.lmChatAzureOpenAi",
      "position": [
        -400,
        32
      ],
      "parameters": {
        "model": "gpt-5-mini",
        "options": {}
      },
      "typeVersion": 1
    }
  ],
  "connections": {
    "Simple Memory": {
      "ai_memory": [
        [
          {
            "node": "AI Agent",
            "type": "ai_memory",
            "index": 0
          }
        ]
      ]
    },
    "Retrieve bakery data": {
      "ai_tool": [
        [
          {
            "node": "AI Agent",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "Azure OpenAI Chat Model": {
      "ai_languageModel": [
        [
          {
            "node": "AI Agent",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "When chat message received": {
      "main": [
        [
          {
            "node": "AI Agent",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}