{
  "name": "AI-powered restaurant order chatbot with GPT-4o for POS integration",
  "nodes": [
    {
      "id": "62b3c7cb-1993-44f1-8b86-38a34ca1d029",
      "name": "Information Extractor",
      "type": "@n8n/n8n-nodes-langchain.informationExtractor",
      "position": [
        -200,
        500
      ]
    },
    {
      "id": "75883f27-af58-4791-9e1a-a70b83e1cead",
      "name": "OpenAI Chat Model1",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "position": [
        -180,
        740
      ]
    },
    {
      "id": "aeefdd4b-bf7d-4824-97d8-0afc356fb7d6",
      "name": "If",
      "type": "n8n-nodes-base.if",
      "position": [
        120,
        540
      ]
    },
    {
      "id": "9e3f8a1b-ccd8-4f4d-91cb-b99cc46f412f",
      "name": "Google Sheets",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        840,
        420
      ]
    },
    {
      "id": "4cc1818f-1585-42e1-a111-7b55557aebcb",
      "name": "Code",
      "type": "n8n-nodes-base.code",
      "position": [
        380,
        560
      ]
    },
    {
      "id": "a92d2745-148b-4e2a-b8f7-82d3993ff34f",
      "name": "Loop Over Items",
      "type": "n8n-nodes-base.splitInBatches",
      "position": [
        620,
        500
      ]
    },
    {
      "id": "aea89e6c-37a9-4859-adc8-b7e449701503",
      "name": "Replace Me",
      "type": "n8n-nodes-base.noOp",
      "position": [
        800,
        660
      ]
    },
    {
      "id": "b31dba52-b27e-4267-be32-a7730b4d08a8",
      "name": "No Operation, do nothing",
      "type": "n8n-nodes-base.noOp",
      "position": [
        440,
        400
      ]
    },
    {
      "id": "d7f9a381-6bc2-44d0-81ac-6e0fbe77d70a",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -260,
        220
      ],
      "parameters": {
        "width": 340,
        "height": 680,
        "content": "## JSON PARSER\n\n1.converts the textual data final order like\nitem name \nquantity \nand table name in a json.\n\n2.if the data doesn't include the above it returns null."
      }
    },
    {
      "id": "acc7a528-f767-4576-b08d-6fc386f57648",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        100,
        220
      ],
      "parameters": {
        "width": 460,
        "height": 680,
        "content": "## Refine/Split the jsons into multiple items\n\nIf the data from previous item is not null the custom code block splits the data into multiple json items in a list."
      }
    },
    {
      "id": "857a3102-f5e1-4db5-afb4-154544414701",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        580,
        220
      ],
      "parameters": {
        "width": 440,
        "height": 680,
        "content": "## Send each item as a record in Google sheet\n\n\n**Each item is looped over and produce a batch of 1 item and appended as row in sheet with timestamp.\n"
      }
    },
    {
      "id": "a1ff2b0f-0b48-4ea2-8121-4e2d72197ef7",
      "name": "Triggered on Restaurant Chat workflow",
      "type": "n8n-nodes-base.executeWorkflowTrigger",
      "position": [
        -440,
        500
      ]
    },
    {
      "id": "8689b773-a1c4-4de4-a66e-fab8c9eb6244",
      "name": "When chat message received",
      "type": "@n8n/n8n-nodes-langchain.chatTrigger",
      "position": [
        -140,
        -280
      ]
    },
    {
      "id": "de310ce2-3868-4a0f-aa9b-38253e75dbda",
      "name": "AI Agent",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        100,
        -260
      ]
    },
    {
      "id": "9dda45ee-0a92-448c-8a7e-8daa99282cda",
      "name": "OpenAI Chat Model",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "position": [
        -20,
        20
      ]
    },
    {
      "id": "0c0189d5-8fb4-4679-b2e2-221a3e2a4c88",
      "name": "Call n8n Workflow Tool",
      "type": "@n8n/n8n-nodes-langchain.toolWorkflow",
      "position": [
        360,
        20
      ]
    },
    {
      "id": "9292db7f-6ffc-486e-b31a-bcbd6ef7ab98",
      "name": "Last 5 conversations Memory",
      "type": "@n8n/n8n-nodes-langchain.memoryBufferWindow",
      "position": [
        140,
        40
      ]
    },
    {
      "id": "2782d5b6-d33b-4c89-ac79-90bf380f0828",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        60,
        -380
      ],
      "parameters": {
        "width": 340,
        "height": 300,
        "content": "## Restaurant Order Chat bot\n** It chats with the user and refines the order for the pos system in another workflow."
      }
    },
    {
      "id": "7c298718-e9e3-40d3-a612-94c578bd3100",
      "name": "Sticky Note4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        500,
        -20
      ],
      "parameters": {
        "width": null,
        "height": null,
        "content": "## Call the subworkflow\nit passes the data to the subworkflow for further process\n"
      }
    }
  ],
  "connections": {
    "If": {
      "main": [
        [
          {
            "node": "No Operation, do nothing",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Code",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Code": {
      "main": [
        [
          {
            "node": "Loop Over Items",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "AI Agent": {
      "main": [
        []
      ]
    },
    "Replace Me": {
      "main": [
        [
          {
            "node": "Loop Over Items",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Loop Over Items": {
      "main": [
        [
          {
            "node": "Google Sheets",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Replace Me",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "OpenAI Chat Model": {
      "ai_languageModel": [
        [
          {
            "node": "AI Agent",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "OpenAI Chat Model1": {
      "ai_languageModel": [
        [
          {
            "node": "Information Extractor",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Information Extractor": {
      "main": [
        [
          {
            "node": "If",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Call n8n Workflow Tool": {
      "ai_tool": [
        [
          {
            "node": "AI Agent",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "When chat message received": {
      "main": [
        [
          {
            "node": "AI Agent",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Last 5 conversations Memory": {
      "ai_memory": [
        [
          {
            "node": "AI Agent",
            "type": "ai_memory",
            "index": 0
          }
        ]
      ]
    },
    "Triggered on Restaurant Chat workflow": {
      "main": [
        [
          {
            "node": "Information Extractor",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}