{
  "name": "Automated customer reservations via Telegram and PostgreSQL (Module \"Booking\")",
  "nodes": [
    {
      "id": "49db5bb8-bcae-44c1-a215-5d8d1c125f5e",
      "name": "Sticky Note10",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1800,
        -60
      ],
      "parameters": {
        "width": null,
        "height": null,
        "content": ""
      }
    },
    {
      "id": "b7d46289-6bfd-4639-acb9-951969bd88e7",
      "name": "Sticky Note11",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1800,
        200
      ],
      "parameters": {
        "width": null,
        "height": null,
        "content": ""
      }
    },
    {
      "id": "3c4778a1-6806-442d-a50a-de0e87089169",
      "name": "Sticky Note6",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1800,
        -300
      ],
      "parameters": {
        "width": null,
        "height": null,
        "content": ""
      }
    },
    {
      "id": "6c2acf36-0c01-4984-ac42-662f4f6ea072",
      "name": "Update Name",
      "type": "n8n-nodes-base.postgres",
      "position": [
        2300,
        1240
      ]
    },
    {
      "id": "2ac3bcd1-a090-48fd-a133-ffd1c7c6b889",
      "name": "Update Hour",
      "type": "n8n-nodes-base.postgres",
      "position": [
        2300,
        640
      ]
    },
    {
      "id": "ee24c24c-5083-49bd-8e0c-cfee8ef6c760",
      "name": "Get Work Hours",
      "type": "n8n-nodes-base.postgres",
      "position": [
        2740,
        240
      ]
    },
    {
      "id": "8d602e70-38e7-4639-9cec-b45e4ac46c68",
      "name": "Get Work Days",
      "type": "n8n-nodes-base.postgres",
      "position": [
        1860,
        -20
      ]
    },
    {
      "id": "32910627-3e1f-45dd-a4ec-63132762215c",
      "name": "Update bot status on START",
      "type": "n8n-nodes-base.postgres",
      "position": [
        1860,
        -280
      ]
    },
    {
      "id": "d1a8ef06-6507-4e90-8f97-0d28f3abe94a",
      "name": "Is Date correct?",
      "type": "n8n-nodes-base.if",
      "position": [
        2060,
        -20
      ]
    },
    {
      "id": "22fa9829-ef33-4a20-a6c9-a03442c0dbab",
      "name": "Commands",
      "type": "n8n-nodes-base.switch",
      "position": [
        1360,
        -80
      ]
    },
    {
      "id": "fca9aaf7-53cb-4c5d-91d2-2cb1a8591c2f",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        800,
        -300
      ],
      "parameters": {
        "width": null,
        "height": null,
        "content": ""
      }
    },
    {
      "id": "62ea839f-f934-4862-8709-a08d1a9d5e5c",
      "name": "Starts",
      "type": "n8n-nodes-base.whatsApp",
      "position": [
        860,
        -280
      ]
    },
    {
      "id": "946b34a4-b9b4-4dc0-884c-d897f4f0987b",
      "name": "Get Bot Status",
      "type": "n8n-nodes-base.postgres",
      "position": [
        860,
        -80
      ]
    },
    {
      "id": "491739c5-8dff-489a-9565-02fc4f5edf7e",
      "name": "Upsert Bot Status on START",
      "type": "n8n-nodes-base.postgres",
      "position": [
        1080,
        -280
      ]
    },
    {
      "id": "33d1bfa8-a7f1-4d28-8178-765436763a25",
      "name": "WhatsApp Trigger",
      "type": "n8n-nodes-base.whatsAppTrigger",
      "position": [
        420,
        -80
      ]
    },
    {
      "id": "8e174865-d332-4e16-a0a0-25723635de87",
      "name": "Define Flow",
      "type": "n8n-nodes-base.switch",
      "position": [
        1080,
        -80
      ]
    },
    {
      "id": "d6bc1318-df4c-4ef6-b830-66540720df6a",
      "name": "Initialization",
      "type": "n8n-nodes-base.set",
      "position": [
        640,
        -80
      ]
    },
    {
      "id": "ec733a20-b9f0-4039-8514-8217ca491b9b",
      "name": "Get book",
      "type": "n8n-nodes-base.postgres",
      "position": [
        1360,
        640
      ]
    },
    {
      "id": "d98b2950-df1f-4fc1-b18c-2290b7bf621e",
      "name": "Main Menu",
      "type": "n8n-nodes-base.whatsApp",
      "position": [
        1640,
        -80
      ]
    },
    {
      "id": "bd5ebe69-cd98-4c2c-8a5b-ea8114a4a5a4",
      "name": "Request Date",
      "type": "n8n-nodes-base.whatsApp",
      "position": [
        2740,
        -20
      ]
    },
    {
      "id": "f36f3c9d-4bd6-409d-b7af-9d96b5c03075",
      "name": "Union Number with Question",
      "type": "n8n-nodes-base.set",
      "position": [
        2300,
        -20
      ]
    },
    {
      "id": "c8e08639-5b3c-4552-af2e-b0ad0d6c89f3",
      "name": "Union list",
      "type": "n8n-nodes-base.summarize",
      "position": [
        2520,
        -20
      ]
    },
    {
      "id": "c2c75379-cec2-43c4-88c4-bc63bd1cde1e",
      "name": "Update bot status on BOOKING",
      "type": "n8n-nodes-base.postgres",
      "position": [
        2960,
        -20
      ]
    },
    {
      "id": "fca3d8b1-b320-41ed-9b42-c236679e1e6a",
      "name": "First Question?",
      "type": "n8n-nodes-base.if",
      "position": [
        1860,
        240
      ]
    },
    {
      "id": "553efef6-2dd3-40c1-86ca-df2c513dd3bf",
      "name": "Get Work Days ",
      "type": "n8n-nodes-base.postgres",
      "position": [
        2060,
        420
      ]
    },
    {
      "id": "fa7159a9-57fd-4f35-8c53-9fde5289a23e",
      "name": "Add Book",
      "type": "n8n-nodes-base.postgres",
      "position": [
        2060,
        240
      ]
    },
    {
      "id": "85885381-f773-4f8d-8b68-241822d8cd05",
      "name": "Merge1",
      "type": "n8n-nodes-base.merge",
      "position": [
        2300,
        240
      ]
    },
    {
      "id": "ad5bed52-c4c1-4e52-8321-e0ba884ca77d",
      "name": "Union Number with Question1",
      "type": "n8n-nodes-base.set",
      "position": [
        2960,
        240
      ]
    },
    {
      "id": "7a58c044-0d1f-470b-894b-5e0f994f9b5c",
      "name": "Union list1",
      "type": "n8n-nodes-base.summarize",
      "position": [
        3180,
        240
      ]
    },
    {
      "id": "7c7298b5-7f78-40e0-ab66-4966bf56e9ee",
      "name": "Merge",
      "type": "n8n-nodes-base.merge",
      "position": [
        1640,
        440
      ]
    },
    {
      "id": "e227110c-53de-443b-ad3d-1a8157f80938",
      "name": "Edit Fields",
      "type": "n8n-nodes-base.set",
      "position": [
        1360,
        440
      ]
    },
    {
      "id": "9795ad35-d291-4e82-b2ee-0f898843a535",
      "name": "Switch",
      "type": "n8n-nodes-base.switch",
      "position": [
        2060,
        640
      ]
    },
    {
      "id": "de7099bd-e95f-4c09-b4a2-a0e8708f86b1",
      "name": "Update Date AND Status",
      "type": "n8n-nodes-base.postgres",
      "position": [
        2520,
        240
      ]
    },
    {
      "id": "f7c5056a-c6b7-4c61-a0f1-d116754a70aa",
      "name": "Phone validation1",
      "type": "n8n-nodes-base.if",
      "position": [
        2300,
        840
      ]
    },
    {
      "id": "f8a30b0c-9b25-433c-8da1-30b25af14c34",
      "name": "Request Phone",
      "type": "n8n-nodes-base.whatsApp",
      "position": [
        2740,
        640
      ]
    },
    {
      "id": "8173128a-5c21-40c0-a394-abe62b3b30b8",
      "name": "Request Name",
      "type": "n8n-nodes-base.whatsApp",
      "position": [
        2740,
        840
      ]
    },
    {
      "id": "7b392a56-df82-43fb-9fa3-a7acb1df79e8",
      "name": "Phone Error",
      "type": "n8n-nodes-base.whatsApp",
      "position": [
        2740,
        1040
      ]
    },
    {
      "id": "1deb7b7c-07df-414a-ba7d-c421e15ce979",
      "name": "page booking success",
      "type": "n8n-nodes-base.whatsApp",
      "position": [
        2740,
        1240
      ]
    },
    {
      "id": "d07a6f69-2c2f-4655-8d3a-8b93c25ef911",
      "name": "Update status on BOOKED",
      "type": "n8n-nodes-base.postgres",
      "position": [
        2960,
        1240
      ]
    },
    {
      "id": "d994f535-8b42-4ea5-8466-98ecd0988b0e",
      "name": "Update Phone",
      "type": "n8n-nodes-base.postgres",
      "position": [
        2520,
        840
      ]
    },
    {
      "id": "4913b0e5-ff41-40d0-adc8-5593d2ae7614",
      "name": "Payments",
      "type": "n8n-nodes-base.whatsApp",
      "position": [
        1640,
        -280
      ]
    },
    {
      "id": "5219aa55-5017-4182-bc1a-7f65a6229ac9",
      "name": "Update bot status on PAYMENTS",
      "type": "n8n-nodes-base.postgres",
      "position": [
        3180,
        1240
      ]
    },
    {
      "id": "3a9dd518-b8a1-4503-b6bb-5345bf14ab75",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        420,
        240
      ],
      "parameters": {
        "width": null,
        "height": null,
        "content": ""
      }
    },
    {
      "id": "76705120-761e-45f2-b027-028ba9a88875",
      "name": "Sticky Note8",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1600,
        -300
      ],
      "parameters": {
        "width": null,
        "height": null,
        "content": ""
      }
    },
    {
      "id": "146316c0-6f31-4701-a3ba-63ddd87e741b",
      "name": "Request Time",
      "type": "n8n-nodes-base.whatsApp",
      "position": [
        3400,
        240
      ]
    },
    {
      "id": "d14141f8-5f5c-4f08-9e45-72831e44a01a",
      "name": "Sticky Note12",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -20,
        -300
      ],
      "parameters": {
        "width": null,
        "height": null,
        "content": ""
      }
    },
    {
      "id": "3bd6b336-c195-4aa2-adea-7176222ab22a",
      "name": "Sticky Note13",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -20,
        -80
      ],
      "parameters": {
        "width": null,
        "height": null,
        "content": ""
      }
    },
    {
      "id": "717ed12c-9495-4ed9-9b81-e89f254bb38c",
      "name": "Sticky Note14",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -20,
        240
      ],
      "parameters": {
        "width": null,
        "height": null,
        "content": ""
      }
    },
    {
      "id": "a15078a1-f6be-4dcd-b0f8-1eb43a22bdab",
      "name": "Sticky Note4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        420,
        -300
      ],
      "parameters": {
        "width": null,
        "height": null,
        "content": ""
      }
    }
  ],
  "connections": {
    "Merge": {
      "main": [
        [
          {
            "node": "First Question?",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Merge1": {
      "main": [
        [
          {
            "node": "Update Date AND Status",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Starts": {
      "main": [
        [
          {
            "node": "Upsert Bot Status on START",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Switch": {
      "main": [
        [
          {
            "node": "Update Hour",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Phone validation1",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Update Name",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Add Book": {
      "main": [
        [
          {
            "node": "Merge1",
            "type": "main",
            "index": 1
          }
        ]
      ]
    },
    "Commands": {
      "main": [
        [
          {
            "node": "Main Menu",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Get Work Days",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get book": {
      "main": [
        [
          {
            "node": "Merge",
            "type": "main",
            "index": 1
          }
        ]
      ]
    },
    "Payments": {
      "main": [
        [
          {
            "node": "Update bot status on START",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Main Menu": {
      "main": [
        [
          {
            "node": "Update bot status on START",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Union list": {
      "main": [
        [
          {
            "node": "Request Date",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Define Flow": {
      "main": [
        [
          {
            "node": "Starts",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Commands",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Get book",
            "type": "main",
            "index": 0
          },
          {
            "node": "Edit Fields",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Payments",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Edit Fields": {
      "main": [
        [
          {
            "node": "Merge",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Union list1": {
      "main": [
        [
          {
            "node": "Request Time",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Update Hour": {
      "main": [
        [
          {
            "node": "Request Phone",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Update Name": {
      "main": [
        [
          {
            "node": "page booking success",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Request Date": {
      "main": [
        [
          {
            "node": "Update bot status on BOOKING",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Update Phone": {
      "main": [
        [
          {
            "node": "Request Name",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get Work Days": {
      "main": [
        [
          {
            "node": "Is Date correct?",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get Bot Status": {
      "main": [
        [
          {
            "node": "Define Flow",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get Work Days ": {
      "main": [
        [
          {
            "node": "Merge1",
            "type": "main",
            "index": 2
          }
        ]
      ]
    },
    "Get Work Hours": {
      "main": [
        [
          {
            "node": "Union Number with Question1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Initialization": {
      "main": [
        [
          {
            "node": "Get Bot Status",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "First Question?": {
      "main": [
        [
          {
            "node": "Add Book",
            "type": "main",
            "index": 0
          },
          {
            "node": "Get Work Days ",
            "type": "main",
            "index": 0
          },
          {
            "node": "Merge1",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Switch",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Is Date correct?": {
      "main": [
        [
          {
            "node": "Union Number with Question",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "WhatsApp Trigger": {
      "main": [
        [
          {
            "node": "Initialization",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Phone validation1": {
      "main": [
        [
          {
            "node": "Update Phone",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Phone Error",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "page booking success": {
      "main": [
        [
          {
            "node": "Update status on BOOKED",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Update Date AND Status": {
      "main": [
        [
          {
            "node": "Get Work Hours",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Update status on BOOKED": {
      "main": [
        [
          {
            "node": "Update bot status on PAYMENTS",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Union Number with Question": {
      "main": [
        [
          {
            "node": "Union list",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Union Number with Question1": {
      "main": [
        [
          {
            "node": "Union list1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Update bot status on PAYMENTS": {
      "main": [
        [
          {
            "node": "Payments",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}