{
  "name": "Radha restaurant agent",
  "nodes": [
    {
      "parameters": {
        "options": {}
      },
      "type": "@n8n/n8n-nodes-langchain.chatTrigger",
      "typeVersion": 1.3,
      "position": [
        -272,
        -32
      ],
      "id": "57d76471-8bd5-45e1-b489-62e11abb6e5b",
      "name": "When chat message received",
      "webhookId": "ddb702a8-f418-4259-b450-53797660e953"
    },
    {
      "parameters": {
        "options": {
          "systemMessage": "you are a smart food ordering assistant for \"mda restaurant\"\n\nRules:-\n\n1. When a user sends their first message (like hi, hello ), reply\nwith :\n\nHow can i Help you today ?\n\nplace an order\nFaq/information\nCheck Order/Stock\n\n2. if user wants *Order* :\n\n-ask step by step :name, food item, quantity \n-check Inventroy  sheet before confirming\n   -if availalbe-> \"your order for *[item]* (x quantity)is confirmed\"\n   -if not availalbe-> \"sorry,\" your *[item]* is out of stock.\n   \n   -only confirmed orders go into Orders sheets\n   -In Orders sheet alwyas include:\n      satus =confirmed/Rejected\n\t  Description=\"Order accepted (item availalbe) \" OR order Rejected (out of stock)\"\n\t  \n3.  if user want *FAQ*:\n-Answer short and clear (delivery time, payment method,restaurant hourse) \n"
        }
      },
      "type": "@n8n/n8n-nodes-langchain.agent",
      "typeVersion": 2.2,
      "position": [
        208,
        0
      ],
      "id": "ecd03ff4-8a4b-414b-98ce-b03d0b0a5ad8",
      "name": "AI Agent"
    },
    {
      "parameters": {
        "options": {}
      },
      "type": "@n8n/n8n-nodes-langchain.lmChatGoogleGemini",
      "typeVersion": 1,
      "position": [
        -16,
        240
      ],
      "id": "203cc1ab-04be-4f88-80b4-758f1a0a50dd",
      "name": "Google Gemini Chat Model",
      "credentials": {
        "googlePalmApi": {
          "id": "eNmMd4dyl1kQewpb",
          "name": "Google Gemini(PaLM) Api account"
        }
      }
    },
    {
      "parameters": {
        "contextWindowLength": 10
      },
      "type": "@n8n/n8n-nodes-langchain.memoryBufferWindow",
      "typeVersion": 1.3,
      "position": [
        128,
        240
      ],
      "id": "2d7330cd-f1c9-4627-b2d4-a7cd68abc281",
      "name": "Simple Memory"
    },
    {
      "parameters": {
        "documentId": {
          "__rl": true,
          "value": "1F8zVUPOFlUajJDdBWsVKPgnFMHsi-EPkC9VaHXlWYRU",
          "mode": "list",
          "cachedResultName": "whatsapp n8n",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1F8zVUPOFlUajJDdBWsVKPgnFMHsi-EPkC9VaHXlWYRU/edit?usp=drivesdk"
        },
        "sheetName": {
          "__rl": true,
          "value": "gid=0",
          "mode": "list",
          "cachedResultName": "Inventory",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1F8zVUPOFlUajJDdBWsVKPgnFMHsi-EPkC9VaHXlWYRU/edit#gid=0"
        },
        "options": {}
      },
      "type": "n8n-nodes-base.googleSheetsTool",
      "typeVersion": 4.7,
      "position": [
        272,
        240
      ],
      "id": "00feef1a-d92f-487b-bfa4-f94ed9d00944",
      "name": "Get Inventory",
      "credentials": {
        "googleSheetsOAuth2Api": {
          "id": "t0CLDQL3a2pA1rtx",
          "name": "Google Sheets account"
        }
      }
    },
    {
      "parameters": {
        "documentId": {
          "__rl": true,
          "value": "1F8zVUPOFlUajJDdBWsVKPgnFMHsi-EPkC9VaHXlWYRU",
          "mode": "list",
          "cachedResultName": "whatsapp n8n",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1F8zVUPOFlUajJDdBWsVKPgnFMHsi-EPkC9VaHXlWYRU/edit?usp=drivesdk"
        },
        "sheetName": {
          "__rl": true,
          "value": 1086345091,
          "mode": "list",
          "cachedResultName": "FAQ",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1F8zVUPOFlUajJDdBWsVKPgnFMHsi-EPkC9VaHXlWYRU/edit#gid=1086345091"
        },
        "options": {}
      },
      "type": "n8n-nodes-base.googleSheetsTool",
      "typeVersion": 4.7,
      "position": [
        432,
        240
      ],
      "id": "ad632f23-32e9-4bfd-866f-d610d68150ae",
      "name": "Get FAQ",
      "credentials": {
        "googleSheetsOAuth2Api": {
          "id": "t0CLDQL3a2pA1rtx",
          "name": "Google Sheets account"
        }
      }
    },
    {
      "parameters": {
        "operation": "append",
        "documentId": {
          "__rl": true,
          "value": "1F8zVUPOFlUajJDdBWsVKPgnFMHsi-EPkC9VaHXlWYRU",
          "mode": "list",
          "cachedResultName": "whatsapp n8n",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1F8zVUPOFlUajJDdBWsVKPgnFMHsi-EPkC9VaHXlWYRU/edit?usp=drivesdk"
        },
        "sheetName": {
          "__rl": true,
          "value": 1118880682,
          "mode": "list",
          "cachedResultName": "Orders",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1F8zVUPOFlUajJDdBWsVKPgnFMHsi-EPkC9VaHXlWYRU/edit#gid=1118880682"
        },
        "columns": {
          "mappingMode": "defineBelow",
          "value": {
            "Customer Name": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('Customer_Name', ``, 'string') }}",
            "Food Item": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('Food_Item', ``, 'string') }}",
            "Quantity Ordered": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('Quantity_Ordered', ``, 'string') }}",
            "Order Date": "{{ $now.format(\"yyyy-MM-dd HH:mm:ss\") }}",
            "Status": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('Status', ``, 'string') }}"
          },
          "matchingColumns": [],
          "schema": [
            {
              "id": "Customer Name",
              "displayName": "Customer Name",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": false
            },
            {
              "id": "Food Item",
              "displayName": "Food Item",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": false
            },
            {
              "id": "Quantity Ordered",
              "displayName": "Quantity Ordered",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": false
            },
            {
              "id": "Order Date",
              "displayName": "Order Date",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": false
            },
            {
              "id": "Status",
              "displayName": "Status",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": false
            }
          ],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        },
        "options": {}
      },
      "type": "n8n-nodes-base.googleSheetsTool",
      "typeVersion": 4.7,
      "position": [
        560,
        176
      ],
      "id": "05519a02-cbb8-47e4-a698-d0851a9328bd",
      "name": "Append row in sheet in Google Sheets",
      "credentials": {
        "googleSheetsOAuth2Api": {
          "id": "t0CLDQL3a2pA1rtx",
          "name": "Google Sheets account"
        }
      }
    }
  ],
  "pinData": {},
  "connections": {
    "When chat message received": {
      "main": [
        [
          {
            "node": "AI Agent",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Google Gemini Chat Model": {
      "ai_languageModel": [
        [
          {
            "node": "AI Agent",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Simple Memory": {
      "ai_memory": [
        [
          {
            "node": "AI Agent",
            "type": "ai_memory",
            "index": 0
          }
        ]
      ]
    },
    "Get Inventory": {
      "ai_tool": [
        [
          {
            "node": "AI Agent",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "Get FAQ": {
      "ai_tool": [
        [
          {
            "node": "AI Agent",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "Append row in sheet in Google Sheets": {
      "ai_tool": [
        [
          {
            "node": "AI Agent",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    }
  },
  "active": false,
  "settings": {
    "executionOrder": "v1"
  },
  "versionId": "58500a6b-7311-4730-84b9-0f7eb17ef282",
  "meta": {
    "templateCredsSetupCompleted": true,
    "instanceId": "80495f3a5e514f444b15afce94ea17c415fb8576de401569460c4d096a8b26e3"
  },
  "id": "Ba1bo6kXa6CRWOar",
  "tags": []
}