{
  "name": "Telegram appointment scheduler bot with Google Calendar & Sheets",
  "nodes": [
    {
      "id": "7d54054d-f2d6-43dc-a323-0ff3c9cf4811",
      "name": "Telegram Trigger",
      "type": "n8n-nodes-base.telegramTrigger",
      "position": [
        -1600,
        592
      ]
    },
    {
      "id": "dca7347f-c874-42b4-bab9-0b4c86e7b54e",
      "name": "Switch",
      "type": "n8n-nodes-base.switch",
      "position": [
        -1232,
        544
      ]
    },
    {
      "id": "280a841b-1ba9-470a-9f4e-fdae5da9661d",
      "name": "Code in JavaScript",
      "type": "n8n-nodes-base.code",
      "position": [
        -736,
        304
      ]
    },
    {
      "id": "086bc82f-dddf-4f03-bebd-54bcaec07ca7",
      "name": "Create an event",
      "type": "n8n-nodes-base.googleCalendar",
      "position": [
        0,
        0
      ]
    },
    {
      "id": "fba969c8-56d9-4173-8b61-6bf08a24e20c",
      "name": "Respuesta de Cita Agendada",
      "type": "n8n-nodes-base.telegram",
      "position": [
        544,
        0
      ]
    },
    {
      "id": "6874d8cc-581a-4a48-8613-6f04e9dfd763",
      "name": "Respuesta Bot Inicial",
      "type": "n8n-nodes-base.telegram",
      "position": [
        -896,
        -192
      ]
    },
    {
      "id": "ba6c34c1-e2d3-467a-9245-08919dc661d4",
      "name": "Get many events",
      "type": "n8n-nodes-base.googleCalendar",
      "position": [
        -464,
        304
      ]
    },
    {
      "id": "b53a67b7-3c32-403c-a498-74084fbcbaf3",
      "name": "If",
      "type": "n8n-nodes-base.if",
      "position": [
        -240,
        304
      ]
    },
    {
      "id": "92ba97c4-45ae-44a5-a6f4-99e187db603e",
      "name": "Respuesta Hora no disponible",
      "type": "n8n-nodes-base.telegram",
      "position": [
        80,
        320
      ]
    },
    {
      "id": "7e7ae0c9-81f8-4372-bc55-9cefec839de7",
      "name": "Agregar cita en Google Sheets",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        256,
        0
      ]
    },
    {
      "id": "1f56c7fd-e275-42a9-93cf-583651a8d965",
      "name": "Respuesta Bot Defecto",
      "type": "n8n-nodes-base.telegram",
      "position": [
        -976,
        1392
      ]
    },
    {
      "id": "d07fad71-b4f5-43b0-87b4-5abe0f2b13e0",
      "name": "Code in JavaScript1",
      "type": "n8n-nodes-base.code",
      "position": [
        -720,
        720
      ]
    },
    {
      "id": "9e01f0c5-68b1-44e7-b056-85b8576e6f84",
      "name": "Get many events1",
      "type": "n8n-nodes-base.googleCalendar",
      "position": [
        -464,
        720
      ]
    },
    {
      "id": "6a2d5552-a1fa-449a-ac3d-e6fb8d4f498b",
      "name": "If1",
      "type": "n8n-nodes-base.if",
      "position": [
        -240,
        720
      ]
    },
    {
      "id": "6da89bc2-2a60-4a00-87a9-026a59e9d3c8",
      "name": "Delete an event",
      "type": "n8n-nodes-base.googleCalendar",
      "position": [
        208,
        848
      ]
    },
    {
      "id": "73d74b1e-9a18-49ef-abb9-d6191c892145",
      "name": "Delete rows or columns from sheet",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        768,
        848
      ]
    },
    {
      "id": "bcc018ce-5b16-4caf-b27c-96ca2aa02d36",
      "name": "Respuesta Cita Cancelada",
      "type": "n8n-nodes-base.telegram",
      "position": [
        1056,
        848
      ]
    },
    {
      "id": "09c000de-845b-4891-8a1d-6067a60a607b",
      "name": "Respuesta Cita no encontrada",
      "type": "n8n-nodes-base.telegram",
      "position": [
        208,
        560
      ]
    },
    {
      "id": "75a7d2a8-dfba-4a6d-a596-ffb4a86cf2ad",
      "name": "Code in JavaScript2",
      "type": "n8n-nodes-base.code",
      "position": [
        -688,
        1168
      ]
    },
    {
      "id": "1e9e9e69-843f-43a7-b255-14e71accac05",
      "name": "Buscar cita agendada",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        512,
        848
      ]
    },
    {
      "id": "0b205172-0b74-4743-bf06-b28dafee3c93",
      "name": "Buscar citas de cliente",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        -448,
        1168
      ]
    },
    {
      "id": "184d70ba-ad50-4f61-8f8c-286e0d387138",
      "name": "If2",
      "type": "n8n-nodes-base.if",
      "position": [
        -176,
        1232
      ]
    },
    {
      "id": "71052b88-b00e-49dd-a6a1-b78e7d3016ff",
      "name": "Respuesta Citas no encontradas",
      "type": "n8n-nodes-base.telegram",
      "position": [
        192,
        1088
      ]
    },
    {
      "id": "deb3937c-cda4-45e1-b633-5b1017b9e88d",
      "name": "Code in JavaScript3",
      "type": "n8n-nodes-base.code",
      "position": [
        192,
        1328
      ]
    },
    {
      "id": "c86aa958-6808-4d95-8d5b-e43bd07a0397",
      "name": "Respuesta de Cita Agendada1",
      "type": "n8n-nodes-base.telegram",
      "position": [
        464,
        1328
      ]
    },
    {
      "id": "81359378-4b13-4f3b-9692-fd48f6526a21",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1936,
        592
      ],
      "parameters": {
        "width": 256,
        "height": 128,
        "content": "## Start Point \nTelegram Trigger to listen the new messages from the users"
      }
    },
    {
      "id": "5466fa3f-0fc3-4e7e-9129-e53b5e519b75",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1392,
        384
      ],
      "parameters": {
        "width": 256,
        "height": 128,
        "content": "## Commands Options \n**Switch** for control the command send for the user (/help, agendar, cancelar, citas)"
      }
    },
    {
      "id": "fb9456e4-6fd4-4c61-b34d-74c6d703542e",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -688,
        -192
      ],
      "parameters": {
        "width": 208,
        "height": 112,
        "content": "## Help Response\nInformation about the Bot's functions"
      }
    },
    {
      "id": "adecfb45-5b06-4617-9452-daff282c63d5",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -656,
        112
      ],
      "parameters": {
        "width": 464,
        "height": 112,
        "content": "## \"Agendar\" Module \nFlow to schedule a appointment with Telegram Bot and register on Google Calendar and Google Sheets"
      }
    },
    {
      "id": "de5e987a-fb6d-4c10-8c4b-4752e904e9ac",
      "name": "Sticky Note4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -624,
        560
      ],
      "parameters": {
        "width": 464,
        "height": 112,
        "content": "## \"Cancelar\" Module \nFlow to cancel a appointment with Telegram Bot and register this change deleting on Google Calendar and Google Sheets"
      }
    },
    {
      "id": "204d8550-367a-49fc-a171-b64b62542033",
      "name": "Sticky Note5",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -592,
        1040
      ],
      "parameters": {
        "width": 464,
        "height": 80,
        "content": "## \"Citas\" Module \nFlow to check all the appointments from a user"
      }
    },
    {
      "id": "3d2d5f40-d8ef-4610-b0fa-33fb9c86896e",
      "name": "Sticky Note6",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -768,
        1424
      ],
      "parameters": {
        "width": 320,
        "height": 96,
        "content": "## Default Response \nBot's Response for unexpected messages"
      }
    }
  ],
  "connections": {
    "If": {
      "main": [
        [
          {
            "node": "Create an event",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Respuesta Hora no disponible",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "If1": {
      "main": [
        [
          {
            "node": "Respuesta Cita no encontrada",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Delete an event",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "If2": {
      "main": [
        [
          {
            "node": "Respuesta Citas no encontradas",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Code in JavaScript3",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Switch": {
      "main": [
        [
          {
            "node": "Respuesta Bot Inicial",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Code in JavaScript",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Code in JavaScript1",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Code in JavaScript2",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Respuesta Bot Defecto",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Create an event": {
      "main": [
        [
          {
            "node": "Agregar cita en Google Sheets",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Delete an event": {
      "main": [
        [
          {
            "node": "Buscar cita agendada",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get many events": {
      "main": [
        [
          {
            "node": "If",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get many events1": {
      "main": [
        [
          {
            "node": "If1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Telegram Trigger": {
      "main": [
        [
          {
            "node": "Switch",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Code in JavaScript": {
      "main": [
        [
          {
            "node": "Get many events",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Code in JavaScript1": {
      "main": [
        [
          {
            "node": "Get many events1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Code in JavaScript2": {
      "main": [
        [
          {
            "node": "Buscar citas de cliente",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Code in JavaScript3": {
      "main": [
        [
          {
            "node": "Respuesta de Cita Agendada1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Buscar cita agendada": {
      "main": [
        [
          {
            "node": "Delete rows or columns from sheet",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Buscar citas de cliente": {
      "main": [
        [
          {
            "node": "If2",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Agregar cita en Google Sheets": {
      "main": [
        [
          {
            "node": "Respuesta de Cita Agendada",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Delete rows or columns from sheet": {
      "main": [
        [
          {
            "node": "Respuesta Cita Cancelada",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}