AI Chatbot for shoe brand

    A AI agent I made to help me with a pretent shoe brand

    Shared 7/8/2026

    0 views

    Visual Workflow

    JSON Code

    {
      "meta": {
        "instanceId": "3030cee8fd109645d0715adcf7ed93358a394039d358754fea369f0b222f6f88",
        "templateCredsSetupCompleted": true
      },
      "nodes": [
        {
          "id": "173a78db-6b54-4a65-9d8b-8a6b33a0c175",
          "name": "When chat message received",
          "type": "@n8n/n8n-nodes-langchain.chatTrigger",
          "position": [
            -368,
            80
          ],
          "webhookId": "7123af30-6a49-444f-8ae6-00f8f200ac0e",
          "parameters": {
            "mode": "webhook",
            "public": true,
            "options": {
              "responseMode": "lastNode"
            }
          },
          "executeOnce": false,
          "retryOnFail": false,
          "typeVersion": 1.4,
          "alwaysOutputData": false
        },
        {
          "id": "4dee6bd0-6907-49d1-825c-de3b3a3a2d4e",
          "name": "AI Agent",
          "type": "@n8n/n8n-nodes-langchain.agent",
          "position": [
            640,
            0
          ],
          "parameters": {
            "text": "={{ $('When chat message received').item.json.chatInput }}",
            "options": {
              "systemMessage": "=You are a no-nonsense retail sales assistant.\n\nAnalyze this shoe inventory data:\n{{ $('Code in JavaScript').first()?.json?.allShoesText || 'Inventory loading...' }}\n\nGive me a single, simple, step-by-step plan to improve sales based ONLY on the data provided above.\n\nSTRICT RULES:\n1. You have ALL 10 shoes in the text block above. Compare them against each other and explicitly tell me which single shoe is doing the best and which single shoe is doing the worst.\n2. Keep the entire response under 4 short bullet points. Be completely direct.\n3. No gibberish characters, no slashes, and no formulas. Use simple words like 'shoes', 'boxes', 'best sellers', and 'dust-gatherers'."
            },
            "promptType": "define",
            "hasOutputParser": true
          },
          "typeVersion": 3.1
        },
        {
          "id": "e7dba355-64b0-4739-a2b5-a20e84b48830",
          "name": "Simple Memory",
          "type": "@n8n/n8n-nodes-langchain.memoryBufferWindow",
          "position": [
            768,
            288
          ],
          "parameters": {},
          "typeVersion": 1.4
        },
        {
          "id": "6847c816-65f2-4727-8bd5-6911c71f9862",
          "name": "OpenAI Chat Model",
          "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
          "position": [
            592,
            288
          ],
          "parameters": {
            "model": {
              "__rl": true,
              "mode": "list",
              "value": "chat-latest",
              "cachedResultName": "chat-latest"
            },
            "options": {},
            "builtInTools": {}
          },
          "credentials": {
            "openAiApi": {
              "id": "ANcPO2fpnNzvqOes",
              "name": "OpenAI account 2"
            }
          },
          "typeVersion": 1.3
        },
        {
          "id": "65b72f07-7be3-4a0a-a6e0-9d0ce9e86c68",
          "name": "Get row(s) in sheet",
          "type": "n8n-nodes-base.googleSheets",
          "position": [
            -48,
            208
          ],
          "parameters": {
            "options": {},
            "sheetName": {
              "__rl": true,
              "mode": "list",
              "value": 25793841,
              "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1BAftXaZxR7AgitohCQ85WENJPDwTWn9xVztg1zmZmOc/edit#gid=25793841",
              "cachedResultName": "Pretend Shoe Store Sales & Reviews"
            },
            "documentId": {
              "__rl": true,
              "mode": "list",
              "value": "1BAftXaZxR7AgitohCQ85WENJPDwTWn9xVztg1zmZmOc",
              "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1BAftXaZxR7AgitohCQ85WENJPDwTWn9xVztg1zmZmOc/edit?usp=drivesdk",
              "cachedResultName": "Pretend Shoe Store Sales & Reviews"
            }
          },
          "credentials": {
            "googleSheetsOAuth2Api": {
              "id": "FEokQwkhUU6rsTv2",
              "name": "Google Sheets account"
            }
          },
          "typeVersion": 4.7
        },
        {
          "id": "efe4cdf8-351f-4d92-9331-2debc96f9613",
          "name": "Merge",
          "type": "n8n-nodes-base.merge",
          "position": [
            544,
            -240
          ],
          "parameters": {},
          "typeVersion": 3.2
        },
        {
          "id": "74826c3e-3c64-46fa-9214-a4cc7d33fe81",
          "name": "Code in JavaScript",
          "type": "n8n-nodes-base.code",
          "position": [
            272,
            192
          ],
          "parameters": {
            "jsCode": "// This forces all 10 shoe items into a single, clean text block for the AI\nconst shoes = items.map(item => item.json);\nreturn [{\n  json: {\n    allShoesText: JSON.stringify(shoes)\n  }\n}];"
          },
          "typeVersion": 2
        }
      ],
      "pinData": {},
      "connections": {
        "Merge": {
          "main": [
            []
          ]
        },
        "Simple Memory": {
          "ai_memory": [
            [
              {
                "node": "AI Agent",
                "type": "ai_memory",
                "index": 0
              }
            ]
          ]
        },
        "OpenAI Chat Model": {
          "ai_languageModel": [
            [
              {
                "node": "AI Agent",
                "type": "ai_languageModel",
                "index": 0
              }
            ]
          ]
        },
        "Code in JavaScript": {
          "main": [
            [
              {
                "node": "AI Agent",
                "type": "main",
                "index": 0
              }
            ]
          ]
        },
        "Get row(s) in sheet": {
          "main": [
            [
              {
                "node": "Code in JavaScript",
                "type": "main",
                "index": 0
              }
            ]
          ]
        },
        "When chat message received": {
          "main": [
            [
              {
                "node": "Get row(s) in sheet",
                "type": "main",
                "index": 0
              }
            ]
          ]
        }
      }
    }