{
  "name": "AI-Powered Dental Appointment System with Telegram, Google Calendar and Sheets",
  "nodes": [
    {
      "id": "d8ecf225-ae9b-4b5b-9cab-1155e351da38",
      "name": "Simple Memory",
      "type": "@n8n/n8n-nodes-langchain.memoryBufferWindow",
      "position": [
        -400,
        848
      ]
    },
    {
      "id": "6a7e57f1-cdef-4e34-8335-b4277ef8bccc",
      "name": "Structured Output Parser",
      "type": "@n8n/n8n-nodes-langchain.outputParserStructured",
      "position": [
        -288,
        880
      ]
    },
    {
      "id": "30821b05-b41f-4754-9488-45f2ae8b2167",
      "name": "Edit Fields",
      "type": "n8n-nodes-base.set",
      "position": [
        368,
        816
      ]
    },
    {
      "id": "cbe4a275-aa80-4461-9e11-1b00d47ea74a",
      "name": "Booking Tool",
      "type": "@n8n/n8n-nodes-langchain.mcpClientTool",
      "position": [
        816,
        864
      ]
    },
    {
      "id": "f3bc773f-f163-4034-8edb-b12a0edbfd8b",
      "name": "Simple Memory1",
      "type": "@n8n/n8n-nodes-langchain.memoryBufferWindow",
      "position": [
        752,
        736
      ]
    },
    {
      "id": "a661e647-3728-4dc0-850f-dc7f9bae5141",
      "name": "Structured Output Parser1",
      "type": "@n8n/n8n-nodes-langchain.outputParserStructured",
      "position": [
        960,
        880
      ]
    },
    {
      "id": "657997cb-83bd-4bda-8f89-2a2c61233ed9",
      "name": "Google Gemini Chat Model2",
      "type": "@n8n/n8n-nodes-langchain.lmChatGoogleGemini",
      "position": [
        -288,
        1008
      ]
    },
    {
      "id": "39fa3829-1459-455b-bec5-1a234ac0e36e",
      "name": "Google Gemini Chat Model3",
      "type": "@n8n/n8n-nodes-langchain.lmChatGoogleGemini",
      "position": [
        912,
        992
      ]
    },
    {
      "id": "e6d5ca85-8a19-4093-bf93-bf55a56f0225",
      "name": "Planning Agent",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        -368,
        656
      ]
    },
    {
      "id": "1bc89ac5-2e1e-4e19-8a81-73be4f5a700c",
      "name": "Booking Agent",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        704,
        560
      ]
    },
    {
      "id": "7fb776be-8a3e-4613-9636-bdcfec291554",
      "name": "Mail and Sheet Entry",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        1744,
        496
      ]
    },
    {
      "id": "341208f3-efc4-4a52-9304-5ceef874cba3",
      "name": "Send a message in Gmail",
      "type": "n8n-nodes-base.gmailTool",
      "position": [
        1888,
        736
      ]
    },
    {
      "id": "7b236794-f5d0-468b-8f05-04360d52aa21",
      "name": "Edit Fields1",
      "type": "n8n-nodes-base.set",
      "position": [
        1376,
        400
      ]
    },
    {
      "id": "0a81f7b1-dc03-4a35-bfbd-d8b4d483a3ef",
      "name": "Append or update row in sheet in Google Sheets",
      "type": "n8n-nodes-base.googleSheetsTool",
      "position": [
        2032,
        816
      ]
    },
    {
      "id": "eca8fe11-f0c2-4e73-adef-09d093168474",
      "name": "OpenAI Chat Model",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "position": [
        -528,
        880
      ]
    },
    {
      "id": "a4735e64-0012-4bee-b6b8-e69861321048",
      "name": "OpenAI Chat Model1",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "position": [
        656,
        864
      ]
    },
    {
      "id": "d1edf8f0-e070-450d-bc14-60dbc40117ba",
      "name": "OpenAI Chat Model2",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "position": [
        1728,
        768
      ]
    },
    {
      "id": "21436ba1-ebfb-4874-b8f5-59746e8bc6db",
      "name": "Webhook",
      "type": "n8n-nodes-base.webhook",
      "position": [
        -656,
        480
      ]
    },
    {
      "id": "fd5e1157-8542-4095-b8fb-eeeb2bd2110c",
      "name": "Respond to Webhook",
      "type": "n8n-nodes-base.respondToWebhook",
      "position": [
        352,
        464
      ]
    },
    {
      "id": "dd3b45a9-2355-4b82-8ea4-3bd3b78df298",
      "name": "Respond to Webhook1",
      "type": "n8n-nodes-base.respondToWebhook",
      "position": [
        2352,
        480
      ]
    },
    {
      "id": "03d0ff46-5d0d-4278-ac49-a30bbaa92c2a",
      "name": "Telegram Trigger",
      "type": "n8n-nodes-base.telegramTrigger",
      "position": [
        -656,
        672
      ]
    },
    {
      "id": "7a55dd83-fc81-4660-9cf0-27b1b4c477f3",
      "name": "Send a text message",
      "type": "n8n-nodes-base.telegram",
      "position": [
        352,
        624
      ]
    },
    {
      "id": "5172b705-da26-43fb-bd20-fa58db0dbb31",
      "name": "Send a text message1",
      "type": "n8n-nodes-base.telegram",
      "position": [
        2384,
        736
      ]
    },
    {
      "id": "2ecd402a-e1f3-4a16-9212-3cb74c5185da",
      "name": "Switch App",
      "type": "n8n-nodes-base.switch",
      "position": [
        2112,
        528
      ]
    },
    {
      "id": "d5442bd5-53f1-4cbf-98b2-492cc93efc12",
      "name": "MCP Server Trigger",
      "type": "@n8n/n8n-nodes-langchain.mcpTrigger",
      "position": [
        -464,
        1776
      ]
    },
    {
      "id": "ecef514c-e557-45e0-af48-d038efb03f53",
      "name": "When Executed by Another Workflow",
      "type": "n8n-nodes-base.executeWorkflowTrigger",
      "position": [
        384,
        1856
      ]
    },
    {
      "id": "6931e638-bf8a-4243-9ddd-ef83a9dbe149",
      "name": "Operation",
      "type": "n8n-nodes-base.switch",
      "position": [
        784,
        1808
      ]
    },
    {
      "id": "b72baf20-2589-485a-958a-a1f0e8cc3ba2",
      "name": "validate_busy_time",
      "type": "@n8n/n8n-nodes-langchain.toolWorkflow",
      "position": [
        -656,
        2112
      ]
    },
    {
      "id": "f5440371-1384-4401-acba-c0e71f03e57a",
      "name": "create_new_event",
      "type": "@n8n/n8n-nodes-langchain.toolWorkflow",
      "position": [
        -512,
        2112
      ]
    },
    {
      "id": "d64d15c6-428f-4459-b4aa-d35601a78db3",
      "name": "delete_event",
      "type": "@n8n/n8n-nodes-langchain.toolWorkflow",
      "position": [
        -240,
        2112
      ]
    },
    {
      "id": "f4b95ab2-7d29-4384-8e7c-bd37ca18a578",
      "name": "update_event",
      "type": "@n8n/n8n-nodes-langchain.toolWorkflow",
      "position": [
        -368,
        2112
      ]
    },
    {
      "id": "12f0508d-64d4-427f-a4c7-f8c2e68af0bf",
      "name": "validate_availability_event",
      "type": "n8n-nodes-base.googleCalendar",
      "position": [
        1424,
        1392
      ]
    },
    {
      "id": "e5b040f6-8a9b-463c-a935-29180c24ffca",
      "name": "check_availability_to_create",
      "type": "n8n-nodes-base.googleCalendar",
      "position": [
        1104,
        1856
      ]
    },
    {
      "id": "009bed43-ec83-4a70-bf68-a53db45c0e28",
      "name": "If",
      "type": "n8n-nodes-base.if",
      "position": [
        1312,
        1856
      ]
    },
    {
      "id": "b8ee56ec-79a0-4394-83e0-b699a4cd3679",
      "name": "Stop and Error",
      "type": "n8n-nodes-base.stopAndError",
      "position": [
        1536,
        1952
      ]
    },
    {
      "id": "4b54c6d0-b206-445e-86af-d4478a0e8f13",
      "name": "create_event",
      "type": "n8n-nodes-base.googleCalendar",
      "position": [
        1536,
        1792
      ]
    },
    {
      "id": "9bd7714b-7f4f-4227-9797-61533950d0d3",
      "name": "delete_event1",
      "type": "n8n-nodes-base.googleCalendar",
      "position": [
        1440,
        1616
      ]
    },
    {
      "id": "247b3321-a40a-43b9-9b5f-f97172f22704",
      "name": "get_event_in_time_gap",
      "type": "n8n-nodes-base.googleCalendar",
      "position": [
        1184,
        2336
      ]
    },
    {
      "id": "b83ca468-6220-4f27-96f5-117b400d14e0",
      "name": "update_calendar",
      "type": "n8n-nodes-base.googleCalendar",
      "position": [
        1184,
        2112
      ]
    },
    {
      "id": "916207aa-b64e-45fd-8ded-6e9bf582e689",
      "name": "get_events_in_gap_time",
      "type": "@n8n/n8n-nodes-langchain.toolWorkflow",
      "position": [
        -96,
        2112
      ]
    },
    {
      "id": "80016448-d7a7-459d-a98e-481cd570bb88",
      "name": "map_data",
      "type": "n8n-nodes-base.set",
      "position": [
        560,
        1856
      ]
    },
    {
      "id": "8a8c36fc-270b-48f9-acef-09150d77febc",
      "name": "response_data_get_data",
      "type": "n8n-nodes-base.set",
      "position": [
        1392,
        2336
      ]
    },
    {
      "id": "1bc9eaa3-f57b-4338-a7d3-2e0d88bc2f29",
      "name": "Edit Fields2",
      "type": "n8n-nodes-base.set",
      "position": [
        1664,
        1408
      ]
    },
    {
      "id": "0c645d1e-1069-4737-9618-f78bcc1baac3",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1792,
        144
      ],
      "parameters": {
        "width": null,
        "height": null,
        "content": ""
      }
    },
    {
      "id": "f532caa4-5901-44f8-91c5-8abc746a213e",
      "name": "Feedback or Next",
      "type": "n8n-nodes-base.switch",
      "position": [
        32,
        816
      ]
    },
    {
      "id": "9bfb0b82-1a48-4172-9040-72573c748639",
      "name": "Webhook/Telegram",
      "type": "n8n-nodes-base.switch",
      "position": [
        160,
        656
      ]
    },
    {
      "id": "026f7e39-47b6-4f93-a467-bc84d81d45c1",
      "name": "Success/Fail Booking",
      "type": "n8n-nodes-base.switch",
      "position": [
        1120,
        432
      ]
    },
    {
      "id": "ac72eadc-25b1-44c9-a4d9-9009e21119f8",
      "name": "Switch",
      "type": "n8n-nodes-base.switch",
      "position": [
        1264,
        768
      ]
    },
    {
      "id": "b8c8ca71-d9d5-4f62-9e26-dd2bb26ad0df",
      "name": "Respond to Webhook2",
      "type": "n8n-nodes-base.respondToWebhook",
      "position": [
        1440,
        656
      ]
    },
    {
      "id": "3fbbae26-5772-4509-9b3f-22fa59b887bd",
      "name": "Send a text message2",
      "type": "n8n-nodes-base.telegram",
      "position": [
        1440,
        848
      ]
    },
    {
      "id": "96369b80-bb1b-4aed-9581-39fec4baca75",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        592,
        240
      ],
      "parameters": {
        "width": null,
        "height": null,
        "content": ""
      }
    },
    {
      "id": "fe6cdb0f-976a-4544-8aa5-7d684bd3cc3f",
      "name": "Sticky Note4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1744,
        192
      ],
      "parameters": {
        "width": null,
        "height": null,
        "content": ""
      }
    },
    {
      "id": "75cf9cd8-b6d7-402b-a06a-ff4788592dfa",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -592,
        176
      ],
      "parameters": {
        "width": null,
        "height": null,
        "content": ""
      }
    }
  ],
  "connections": {
    "If": {
      "main": [
        [
          {
            "node": "create_event",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Stop and Error",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Switch": {
      "main": [
        [
          {
            "node": "Respond to Webhook2",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Send a text message2",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Webhook": {
      "main": [
        [
          {
            "node": "Planning Agent",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "map_data": {
      "main": [
        [
          {
            "node": "Operation",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Operation": {
      "main": [
        [
          {
            "node": "validate_availability_event",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "delete_event1",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "check_availability_to_create",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "update_calendar",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "get_event_in_time_gap",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Switch App": {
      "main": [
        [
          {
            "node": "Respond to Webhook1",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Send a text message1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Edit Fields": {
      "main": [
        [
          {
            "node": "Booking Agent",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Booking Tool": {
      "ai_tool": [
        [
          {
            "node": "Booking Agent",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "Edit Fields1": {
      "main": [
        [
          {
            "node": "Mail and Sheet Entry",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "delete_event": {
      "ai_tool": [
        [
          {
            "node": "MCP Server Trigger",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "update_event": {
      "ai_tool": [
        [
          {
            "node": "MCP Server Trigger",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "Booking Agent": {
      "main": [
        [
          {
            "node": "Success/Fail Booking",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Switch",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Simple Memory": {
      "ai_memory": [
        [
          {
            "node": "Planning Agent",
            "type": "ai_memory",
            "index": 0
          }
        ]
      ]
    },
    "Planning Agent": {
      "main": [
        [
          {
            "node": "Feedback or Next",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Simple Memory1": {
      "ai_memory": [
        [
          {
            "node": "Booking Agent",
            "type": "ai_memory",
            "index": 0
          }
        ]
      ]
    },
    "Feedback or Next": {
      "main": [
        [
          {
            "node": "Webhook/Telegram",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Edit Fields",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Telegram Trigger": {
      "main": [
        [
          {
            "node": "Planning Agent",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Webhook/Telegram": {
      "main": [
        [
          {
            "node": "Respond to Webhook",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Send a text message",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "create_new_event": {
      "ai_tool": [
        [
          {
            "node": "MCP Server Trigger",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "OpenAI Chat Model": {
      "ai_languageModel": [
        [
          {
            "node": "Planning Agent",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "OpenAI Chat Model1": {
      "ai_languageModel": [
        [
          {
            "node": "Booking Agent",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "OpenAI Chat Model2": {
      "ai_languageModel": [
        [
          {
            "node": "Mail and Sheet Entry",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "validate_busy_time": {
      "ai_tool": [
        [
          {
            "node": "MCP Server Trigger",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "Mail and Sheet Entry": {
      "main": [
        [
          {
            "node": "Switch App",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Success/Fail Booking": {
      "main": [
        [
          {
            "node": "Edit Fields1",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Switch",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "get_event_in_time_gap": {
      "main": [
        [
          {
            "node": "response_data_get_data",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "get_events_in_gap_time": {
      "ai_tool": [
        [
          {
            "node": "MCP Server Trigger",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "Send a message in Gmail": {
      "ai_tool": [
        [
          {
            "node": "Mail and Sheet Entry",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "Structured Output Parser": {
      "ai_outputParser": [
        [
          {
            "node": "Planning Agent",
            "type": "ai_outputParser",
            "index": 0
          }
        ]
      ]
    },
    "Google Gemini Chat Model2": {
      "ai_languageModel": [
        [
          {
            "node": "Structured Output Parser",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Google Gemini Chat Model3": {
      "ai_languageModel": [
        [
          {
            "node": "Structured Output Parser1",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Structured Output Parser1": {
      "ai_outputParser": [
        [
          {
            "node": "Booking Agent",
            "type": "ai_outputParser",
            "index": 0
          }
        ]
      ]
    },
    "validate_availability_event": {
      "main": [
        [
          {
            "node": "Edit Fields2",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "check_availability_to_create": {
      "main": [
        [
          {
            "node": "If",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "When Executed by Another Workflow": {
      "main": [
        [
          {
            "node": "map_data",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Append or update row in sheet in Google Sheets": {
      "ai_tool": [
        [
          {
            "node": "Mail and Sheet Entry",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    }
  }
}