{
  "name": "Bella Vista Customer Bookings Support",
  "nodes": [
    {
      "parameters": {
        "public": true,
        "mode": "webhook",
        "options": {}
      },
      "type": "@n8n/n8n-nodes-langchain.chatTrigger",
      "typeVersion": 1.3,
      "position": [
        0,
        0
      ],
      "id": "3f54709b-b8e4-478e-a2b7-8fc2f28cbe09",
      "name": "When chat message received"
    },
    {
      "parameters": {
        "options": {
          "systemMessage": "=*Role*\n\nYour name is Rachel, a customer support agent for an Italian restaruant called Bella Vista.\n\nYou are responsible for providing information about the restaurant using the knowledge base system.\n\nPlese ensure your communication style is friendly and to the point.\n\n**Tools**\n\nWhen a customer want to make a booking follow these steps.\n\nCollect essentials details: customer name, email address, party size, preferred date and time  and any special requests the may have.\n\nLet the customer know their booking request has been submitted to the restaurant and they will receive a confirmation shortly.\n\n\nWhen a customer wants to speak with a real person.\n\nGet their name, email or phone number.\n\nuse the Human Support tool to send their details\nTell them their request was submitted and staff will contact them soon.\n\n\n"
        }
      },
      "type": "@n8n/n8n-nodes-langchain.agent",
      "typeVersion": 2.2,
      "position": [
        208,
        0
      ],
      "id": "8833019a-aa0e-4261-8866-6fab4c5f6f76",
      "name": "Rachel"
    },
    {
      "parameters": {
        "model": {
          "__rl": true,
          "mode": "list",
          "value": "gpt-4.1-mini"
        },
        "options": {}
      },
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "typeVersion": 1.2,
      "position": [
        80,
        208
      ],
      "id": "a1951372-376f-4df8-b3a5-acb7a2a1d860",
      "name": "OpenAI Chat Model",
      "credentials": {
        "openAiApi": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "options": {}
      },
      "type": "@n8n/n8n-nodes-langchain.embeddingsOpenAi",
      "typeVersion": 1.2,
      "position": [
        384,
        544
      ],
      "id": "2d1fb0f4-d755-4a35-905d-ae9f3ea9f837",
      "name": "Embeddings OpenAI",
      "credentials": {
        "openAiApi": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "sendTo": "n8ndemos@gmail.com",
        "subject": "New booking",
        "message": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('Message', ``, 'string') }}",
        "options": {
          "appendAttribution": false
        }
      },
      "type": "n8n-nodes-base.gmailTool",
      "typeVersion": 2.1,
      "position": [
        752,
        320
      ],
      "id": "ac7c83a6-6d50-425b-84cb-634297b7c7b9",
      "name": "Make booking",
      "credentials": {
        "gmailOAuth2": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "sendTo": "n8ndemos@gmail.com",
        "subject": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('Subject', ``, 'string') }}",
        "message": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('Message', ``, 'string') }}",
        "options": {
          "appendAttribution": false
        }
      },
      "type": "n8n-nodes-base.gmailTool",
      "typeVersion": 2.1,
      "position": [
        880,
        320
      ],
      "id": "73e2c06f-cca7-4d6f-99e2-455c61bc2602",
      "name": "Human Support",
      "credentials": {
        "gmailOAuth2": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {},
      "type": "@n8n/n8n-nodes-langchain.memoryPostgresChat",
      "typeVersion": 1.3,
      "position": [
        224,
        208
      ],
      "id": "a8da487c-3d4e-4620-8be2-a6b70e525056",
      "name": "Postgres Chat Memory",
      "credentials": {
        "postgres": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "mode": "retrieve-as-tool",
        "toolDescription": "Use this tool to fetch documents related to the restaurant's knowledge base.",
        "options": {}
      },
      "type": "@n8n/n8n-nodes-langchain.vectorStorePGVector",
      "typeVersion": 1.3,
      "position": [
        352,
        304
      ],
      "id": "a1951f92-9ee3-4775-b48c-5af48e843d8b",
      "name": "Postgres PGVector Store",
      "credentials": {
        "postgres": {
          "name": "<your credential>"
        }
      }
    }
  ],
  "connections": {
    "When chat message received": {
      "main": [
        [
          {
            "node": "Rachel",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "OpenAI Chat Model": {
      "ai_languageModel": [
        [
          {
            "node": "Rachel",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Embeddings OpenAI": {
      "ai_embedding": [
        [
          {
            "node": "Postgres PGVector Store",
            "type": "ai_embedding",
            "index": 0
          }
        ]
      ]
    },
    "Make booking": {
      "ai_tool": [
        [
          {
            "node": "Rachel",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "Human Support": {
      "ai_tool": [
        [
          {
            "node": "Rachel",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "Postgres Chat Memory": {
      "ai_memory": [
        [
          {
            "node": "Rachel",
            "type": "ai_memory",
            "index": 0
          }
        ]
      ]
    },
    "Postgres PGVector Store": {
      "ai_tool": [
        [
          {
            "node": "Rachel",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    }
  },
  "active": true,
  "settings": {
    "executionOrder": "v1"
  },
  "versionId": "c7bf772a-6bad-43d2-83be-c6bd8fe08d38",
  "meta": {
    "templateCredsSetupCompleted": true
  },
  "id": "X7so57K29nYy1D82",
  "tags": []
}