{
  "meta": {
    "instanceId": "workflow-6d8e8f1b",
    "versionId": "1.0.0",
    "createdAt": "2025-09-29T07:07:51.192008",
    "updatedAt": "2025-09-29T07:07:51.192025",
    "owner": "n8n-user",
    "license": "MIT",
    "category": "automation",
    "status": "active",
    "priority": "high",
    "environment": "production"
  },
  "name": "ERP AI chatbot for Odoo sales module",
  "tags": [
    "automation",
    "n8n",
    "production-ready",
    "excellent",
    "optimized"
  ],
  "nodes": [
    {
      "id": "abe58519-f3fe-4438-b6d6-d67071c70f0b",
      "name": "Window Buffer Memory",
      "type": "n8n-nodes-base.noOp",
      "position": [
        1360,
        700
      ],
      "parameters": {
        "sessionKey": "YOUR_CREDENTIAL_HERE",
        "sessionIdType": "customKey"
      },
      "typeVersion": 1.2,
      "notes": "This memoryBufferWindow node performs automated tasks as part of the workflow."
    },
    {
      "id": "35b63108-e40d-494f-a0dc-5c8ea296c75f",
      "name": "OpenAI Chat Model",
      "type": "n8n-nodes-base.noOp",
      "position": [
        1240,
        700
      ],
      "parameters": {
        "options": {}
      },
      "typeVersion": 1,
      "notes": "This lmChatOpenAi node performs automated tasks as part of the workflow."
    },
    {
      "id": "91ff893c-917d-46c2-b27d-48e9799452a6",
      "name": "Calculator",
      "type": "n8n-nodes-base.noOp",
      "position": [
        1480,
        700
      ],
      "parameters": {},
      "typeVersion": 1,
      "notes": "This toolCalculator node performs automated tasks as part of the workflow."
    },
    {
      "id": "b9c10744-c5b8-4949-a80f-d331746632fb",
      "name": "Schedule Trigger",
      "type": "n8n-nodes-base.scheduleTrigger",
      "position": [
        220,
        180
      ],
      "parameters": {
        "rule": {
          "interval": [
            {}
          ]
        }
      },
      "typeVersion": 1.2,
      "notes": "This scheduleTrigger node performs automated tasks as part of the workflow."
    },
    {
      "id": "4fa016bf-3f4c-4bfd-8c11-0270002de533",
      "name": "Convert to File",
      "type": "n8n-nodes-base.convertToFile",
      "position": [
        1480,
        180
      ],
      "parameters": {
        "options": {},
        "operation": "toText",
        "sourceProperty": "response.text"
      },
      "typeVersion": 1.1,
      "notes": "This convertToFile node performs automated tasks as part of the workflow."
    },
    {
      "id": "f9f0f1ed-7ccf-4c97-8d28-91399b2a4440",
      "name": "Save Summary to File",
      "type": "n8n-nodes-base.readWriteFile",
      "position": [
        1700,
        180
      ],
      "parameters": {
        "options": {
          "append": false
        },
        "fileName": "cache.txt",
        "operation": "write"
      },
      "typeVersion": 1,
      "notes": "This readWriteFile node performs automated tasks as part of the workflow."
    },
    {
      "id": "e9715c9d-7ebb-4f8c-b44e-a2ee69bf9618",
      "name": "Get All Opportunities from Odoo",
      "type": "n8n-nodes-base.odoo",
      "position": [
        460,
        180
      ],
      "parameters": {
        "options": {
          "fieldsList": [
            "won_status",
            "description",
            "email_from",
            "contact_name",
            "expected_revenue"
          ]
        },
        "resource": "opportunity",
        "operation": "getAll",
        "returnAll": true
      },
      "typeVersion": 1,
      "notes": "This odoo node performs automated tasks as part of the workflow."
    },
    {
      "id": "23b82fdb-656f-497f-84eb-4296581245ac",
      "name": "Read Summary From File",
      "type": "n8n-nodes-base.readWriteFile",
      "position": [
        540,
        540
      ],
      "parameters": {
        "options": {},
        "fileSelector": "cache.txt"
      },
      "typeVersion": 1,
      "alwaysOutputData": false,
      "notes": "This readWriteFile node performs automated tasks as part of the workflow."
    },
    {
      "id": "8d702c53-9001-4f71-80c4-17786384caf0",
      "name": "If Summary Exists",
      "type": "n8n-nodes-base.if",
      "position": [
        760,
        540
      ],
      "parameters": {
        "options": {},
        "conditions": {
          "options": {
            "leftValue": "",
            "caseSensitive": true,
            "typeValidation": "strict"
          },
          "combinator": "and",
          "conditions": [
            {
              "id": "c65a538f-f6c8-41ff-bad3-a631a5063cbb",
              "operator": {
                "type": "string",
                "operation": "exists",
                "singleValue": true
              },
              "leftValue": "={{ $json.fileName }}",
              "rightValue": ""
            }
          ]
        }
      },
      "typeVersion": 2,
      "notes": "This if node performs automated tasks as part of the workflow."
    },
    {
      "id": "4007d6e3-2d6f-4edd-afee-7df3c7dd5236",
      "name": "Merge Opportunities",
      "type": "n8n-nodes-base.aggregate",
      "position": [
        700,
        180
      ],
      "parameters": {
        "options": {},
        "aggregate": "aggregateAllItemData"
      },
      "typeVersion": 1,
      "notes": "This aggregate node performs automated tasks as part of the workflow."
    },
    {
      "id": "604de791-8351-47ed-897d-2b7fe7f0aa99",
      "name": "Extract Text From File",
      "type": "n8n-nodes-base.extractFromFile",
      "position": [
        1020,
        520
      ],
      "parameters": {
        "options": {},
        "operation": "text"
      },
      "typeVersion": 1,
      "notes": "This extractFromFile node performs automated tasks as part of the workflow."
    },
    {
      "id": "ab68228c-7d02-4d36-8c43-10a387dc3085",
      "name": "AI Conversational Agent",
      "type": "n8n-nodes-base.noOp",
      "position": [
        1240,
        520
      ],
      "parameters": {
        "text": "={{ $('Chat Trigger').item.json.chatInput }}",
        "agent": "conversationalAgent",
        "options": {
          "humanMessage": "=TOOLS\n------\nAssistant can ask the user to use tools to look up information that may be helpful in answering the users original question. The tools the human can use are:\n\n{tools}\n\n{format_instructions}\n\nAnswer questions using only the following context: {{ $json.data }}.\n\n\nUSER'S INPUT\n--------------------\nHere is the user's input (remember to respond with a markdown code snippet of a json blob with a single action, and NOTHING else):\n\n{{input}} "
        },
        "promptType": "define"
      },
      "typeVersion": 1.6,
      "notes": "This agent node performs automated tasks as part of the workflow."
    },
    {
      "id": "117af37c-7dda-4bba-a008-d67c876efa9d",
      "name": "Summarize Opportunities",
      "type": "n8n-nodes-base.noOp",
      "position": [
        1020,
        60
      ],
      "parameters": {
        "options": {
          "summarizationMethodAndPrompts": {
            "values": {
              "prompt": "=Write a summary of the following:\n\n\n{{ JSON.stringify($json.data) }}\n\nInclude important information such as won status and expected revenue for each opportunity. Also include a short description of each oppotunity and keep opportunities separate.\n\nCONCISE SUMMARY: ",
              "combineMapPrompt": "=Write a summary of the following:\n\n{{ JSON.stringify($json.data) }}\n\nInclude important information such as won status and expected revenue for each opportunity. Also include a short description of each oppotunity and keep opportunities separate.\n\nCONCISE SUMMARY: "
            }
          }
        }
      },
      "typeVersion": 2,
      "notes": "This chainSummarization node performs automated tasks as part of the workflow."
    },
    {
      "id": "e6ae17c7-15db-4c9d-9ce9-4748eaf84359",
      "name": "OpenAI Summarization Model",
      "type": "n8n-nodes-base.noOp",
      "position": [
        1000,
        220
      ],
      "parameters": {
        "model": {
          "__rl": true,
          "mode": "list",
          "value": "gpt-4-turbo",
          "cachedResultName": "gpt-4-turbo"
        },
        "options": {}
      },
      "typeVersion": 1,
      "notes": "This lmOpenAi node performs automated tasks as part of the workflow."
    },
    {
      "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."
      },
      "typeVersion": 1,
      "notes": "This stickyNote node performs automated tasks as part of the workflow."
    },
    {
      "id": "b9169b8d-7ff6-403f-b354-511c23d5da1c",
      "name": "Chat Trigger",
      "type": "n8n-nodes-base.noOp",
      "position": [
        220,
        540
      ],
      "webhookId": "09eea368-b78f-4209-9750-f28b706363c2",
      "parameters": {
        "public": true,
        "options": {}
      },
      "typeVersion": 1,
      "notes": "This chatTrigger node performs automated tasks as part of the workflow."
    },
    {
      "id": "error-83102c6f",
      "name": "Error Handler",
      "type": "n8n-nodes-base.stopAndError",
      "typeVersion": 1,
      "position": [
        1000,
        400
      ],
      "parameters": {
        "message": "Workflow execution error",
        "options": {}
      }
    }
  ],
  "active": false,
  "settings": {
    "executionOrder": "v1",
    "saveManualExecutions": true,
    "callerPolicy": "workflowsFromSameOwner",
    "errorWorkflow": null,
    "timezone": "UTC",
    "executionTimeout": 3600,
    "maxExecutions": 1000,
    "retryOnFail": true,
    "retryCount": 3,
    "retryDelay": 1000
  },
  "versionId": "315972c0-e19d-4978-88ea-9fe721de3631",
  "connections": {
    "35b63108-e40d-494f-a0dc-5c8ea296c75f": {
      "main": [
        [
          {
            "node": "error-handler-35b63108-e40d-494f-a0dc-5c8ea296c75f-803c5b1f",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "4fa016bf-3f4c-4bfd-8c11-0270002de533": {
      "main": [
        [
          {
            "node": "error-handler-4fa016bf-3f4c-4bfd-8c11-0270002de533-2cd6c921",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "f9f0f1ed-7ccf-4c97-8d28-91399b2a4440": {
      "main": [
        [
          {
            "node": "error-handler-f9f0f1ed-7ccf-4c97-8d28-91399b2a4440-bca8a6b0",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "23b82fdb-656f-497f-84eb-4296581245ac": {
      "main": [
        [
          {
            "node": "error-handler-23b82fdb-656f-497f-84eb-4296581245ac-3b176186",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "604de791-8351-47ed-897d-2b7fe7f0aa99": {
      "main": [
        [
          {
            "node": "error-handler-604de791-8351-47ed-897d-2b7fe7f0aa99-21f100b1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "e6ae17c7-15db-4c9d-9ce9-4748eaf84359": {
      "main": [
        [
          {
            "node": "error-handler-e6ae17c7-15db-4c9d-9ce9-4748eaf84359-0cfa6c2c",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  },
  "description": "Automated workflow: ERP AI chatbot for Odoo sales module. This workflow integrates 16 different services: convertToFile, stickyNote, scheduleTrigger, agent, readWriteFile. It contains 22 nodes and follows best practices for error handling and security.",
  "notes": "Excellent quality workflow: ERP AI chatbot for Odoo sales module. This workflow has been optimized for production use with comprehensive error handling, security, and documentation."
}