{
  "name": "ERP AI chatbot for Odoo sales module with OpenAI",
  "nodes": [
    {
      "id": "abe58519-f3fe-4438-b6d6-d67071c70f0b",
      "name": "Window Buffer Memory",
      "type": "@n8n/n8n-nodes-langchain.memoryBufferWindow",
      "position": [
        1360,
        700
      ]
    },
    {
      "id": "35b63108-e40d-494f-a0dc-5c8ea296c75f",
      "name": "OpenAI Chat Model",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "position": [
        1240,
        700
      ]
    },
    {
      "id": "91ff893c-917d-46c2-b27d-48e9799452a6",
      "name": "Calculator",
      "type": "@n8n/n8n-nodes-langchain.toolCalculator",
      "position": [
        1480,
        700
      ]
    },
    {
      "id": "b9c10744-c5b8-4949-a80f-d331746632fb",
      "name": "Schedule Trigger",
      "type": "n8n-nodes-base.scheduleTrigger",
      "position": [
        220,
        180
      ]
    },
    {
      "id": "4fa016bf-3f4c-4bfd-8c11-0270002de533",
      "name": "Convert to File",
      "type": "n8n-nodes-base.convertToFile",
      "position": [
        1480,
        180
      ]
    },
    {
      "id": "f9f0f1ed-7ccf-4c97-8d28-91399b2a4440",
      "name": "Save Summary to File",
      "type": "n8n-nodes-base.readWriteFile",
      "position": [
        1700,
        180
      ]
    },
    {
      "id": "e9715c9d-7ebb-4f8c-b44e-a2ee69bf9618",
      "name": "Get All Opportunities from Odoo",
      "type": "n8n-nodes-base.odoo",
      "position": [
        460,
        180
      ]
    },
    {
      "id": "23b82fdb-656f-497f-84eb-4296581245ac",
      "name": "Read Summary From File",
      "type": "n8n-nodes-base.readWriteFile",
      "position": [
        540,
        540
      ]
    },
    {
      "id": "8d702c53-9001-4f71-80c4-17786384caf0",
      "name": "If Summary Exists",
      "type": "n8n-nodes-base.if",
      "position": [
        760,
        540
      ]
    },
    {
      "id": "4007d6e3-2d6f-4edd-afee-7df3c7dd5236",
      "name": "Merge Opportunities",
      "type": "n8n-nodes-base.aggregate",
      "position": [
        700,
        180
      ]
    },
    {
      "id": "604de791-8351-47ed-897d-2b7fe7f0aa99",
      "name": "Extract Text From File",
      "type": "n8n-nodes-base.extractFromFile",
      "position": [
        1020,
        520
      ]
    },
    {
      "id": "ab68228c-7d02-4d36-8c43-10a387dc3085",
      "name": "AI Conversational Agent",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        1240,
        520
      ]
    },
    {
      "id": "117af37c-7dda-4bba-a008-d67c876efa9d",
      "name": "Summarize Opportunities",
      "type": "@n8n/n8n-nodes-langchain.chainSummarization",
      "position": [
        1020,
        60
      ]
    },
    {
      "id": "e6ae17c7-15db-4c9d-9ce9-4748eaf84359",
      "name": "OpenAI Summarization Model",
      "type": "@n8n/n8n-nodes-langchain.lmOpenAi",
      "position": [
        1000,
        220
      ]
    },
    {
      "id": "0e3a0b55-62d0-43d0-a744-a7b7ab05c087",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        200,
        -160
      ],
      "parameters": {
        "width": 446.44549763033154,
        "height": 261.8821936357484,
        "content": "# ERP chatbot for Odoo sales module\n\nSet up steps:\n* Configure the Odoo credentials\n* Configure OpenAI credentials\n* Toggle \"Make Chat Publicly Available\" from the Chat Trigger node."
      }
    },
    {
      "id": "b9169b8d-7ff6-403f-b354-511c23d5da1c",
      "name": "Chat Trigger",
      "type": "@n8n/n8n-nodes-langchain.chatTrigger",
      "position": [
        220,
        540
      ]
    }
  ],
  "connections": {
    "Calculator": {
      "ai_tool": [
        [
          {
            "node": "AI Conversational Agent",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "Chat Trigger": {
      "main": [
        [
          {
            "node": "Read Summary From File",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Convert to File": {
      "main": [
        [
          {
            "node": "Save Summary to File",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Schedule Trigger": {
      "main": [
        [
          {
            "node": "Get All Opportunities from Odoo",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "If Summary Exists": {
      "main": [
        [
          {
            "node": "Extract Text From File",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Get All Opportunities from Odoo",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "OpenAI Chat Model": {
      "ai_languageModel": [
        [
          {
            "node": "AI Conversational Agent",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Merge Opportunities": {
      "main": [
        [
          {
            "node": "Summarize Opportunities",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Save Summary to File": {
      "main": [
        [
          {
            "node": "Read Summary From File",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Window Buffer Memory": {
      "ai_memory": [
        [
          {
            "node": "AI Conversational Agent",
            "type": "ai_memory",
            "index": 0
          }
        ]
      ]
    },
    "Extract Text From File": {
      "main": [
        [
          {
            "node": "AI Conversational Agent",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Read Summary From File": {
      "main": [
        [
          {
            "node": "If Summary Exists",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Summarize Opportunities": {
      "main": [
        [
          {
            "node": "Convert to File",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "OpenAI Summarization Model": {
      "ai_languageModel": [
        [
          {
            "node": "Summarize Opportunities",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Get All Opportunities from Odoo": {
      "main": [
        [
          {
            "node": "Merge Opportunities",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}