{
  "name": "WhatsApp appointment scheduling with Google Calendar",
  "nodes": [
    {
      "id": "eaafdd14-1774-41f5-93cf-76fa12dfecba",
      "name": "Is bot starts?",
      "type": "n8n-nodes-base.if",
      "position": [
        800,
        80
      ]
    },
    {
      "id": "0b89a59c-2881-4e0d-a59b-9607f2764a2d",
      "name": "WhatsApp Trigger",
      "type": "n8n-nodes-base.whatsAppTrigger",
      "position": [
        -80,
        80
      ]
    },
    {
      "id": "aed3ba09-f21c-4b55-ac32-04a7d854b621",
      "name": "Initialization",
      "type": "n8n-nodes-base.set",
      "position": [
        140,
        80
      ]
    },
    {
      "id": "eb3493d3-cc45-4abb-93ce-aa3afbf303d2",
      "name": "Welcome Message",
      "type": "n8n-nodes-base.whatsApp",
      "position": [
        3880,
        1280
      ]
    },
    {
      "id": "d93e9a37-aa69-44b2-b71a-f067163026c5",
      "name": "Main Menu",
      "type": "n8n-nodes-base.whatsApp",
      "position": [
        3880,
        1080
      ]
    },
    {
      "id": "e75f72b0-860d-4dea-a877-fbc8fa046031",
      "name": "Get bot status",
      "type": "n8n-nodes-base.postgres",
      "position": [
        360,
        80
      ]
    },
    {
      "id": "986d1a03-d0a2-4af8-8fe4-319b22b5a7d7",
      "name": "Define flow",
      "type": "n8n-nodes-base.switch",
      "position": [
        1020,
        80
      ]
    },
    {
      "id": "a2f0245e-f763-4eb6-90ff-4adb97643f78",
      "name": "Commands",
      "type": "n8n-nodes-base.switch",
      "position": [
        1240,
        280
      ]
    },
    {
      "id": "783bd953-4e59-4d2d-b8d9-2833ee2e1ed9",
      "name": "Get available question",
      "type": "n8n-nodes-base.postgres",
      "position": [
        1680,
        80
      ]
    },
    {
      "id": "f8c8e3f2-ef35-4d0a-9568-56c72ab7fa5d",
      "name": "Is found?",
      "type": "n8n-nodes-base.if",
      "position": [
        1900,
        80
      ]
    },
    {
      "id": "b63863ca-4203-4af3-b9b0-e3a63165bfca",
      "name": "Get available questions",
      "type": "n8n-nodes-base.postgres",
      "position": [
        2120,
        -120
      ]
    },
    {
      "id": "68d6fe0a-cf9c-49df-9b36-acedf2029b34",
      "name": "Add Answer",
      "type": "n8n-nodes-base.postgres",
      "position": [
        2120,
        80
      ]
    },
    {
      "id": "14244a93-5f2a-4fca-9399-eb7d144dffcc",
      "name": "Add pred Answer",
      "type": "n8n-nodes-base.postgres",
      "position": [
        3660,
        80
      ]
    },
    {
      "id": "0bb3a9e8-3094-4511-81ca-3bbe0cfefa6e",
      "name": "Is Questions available?",
      "type": "n8n-nodes-base.if",
      "position": [
        2340,
        -120
      ]
    },
    {
      "id": "237ea952-6397-4297-b79a-56a0820278b3",
      "name": "Error",
      "type": "n8n-nodes-base.whatsApp",
      "position": [
        3880,
        480
      ]
    },
    {
      "id": "dff7f885-7751-47e0-97b0-5633ed80264d",
      "name": "Update bot status on BOOKING",
      "type": "n8n-nodes-base.postgres",
      "position": [
        1460,
        280
      ]
    },
    {
      "id": "9ec1e0fa-2b52-487c-8c14-639b199bdf00",
      "name": "Question",
      "type": "n8n-nodes-base.whatsApp",
      "position": [
        3880,
        280
      ]
    },
    {
      "id": "1bbe48f9-6de2-4a8c-90c4-c73dffd95d7b",
      "name": "Finish",
      "type": "n8n-nodes-base.whatsApp",
      "position": [
        3880,
        680
      ]
    },
    {
      "id": "3f4e4568-c4bd-484d-b125-678c66e98b87",
      "name": "Create an event",
      "type": "n8n-nodes-base.googleCalendar",
      "position": [
        1680,
        880
      ]
    },
    {
      "id": "74501a5a-6e4c-47c4-8cce-d4ccac8a8dfb",
      "name": "Get Answers",
      "type": "n8n-nodes-base.postgres",
      "position": [
        1240,
        880
      ]
    },
    {
      "id": "f28995b5-8b56-46c0-a248-14e5397e6b0b",
      "name": "Set Datetime AND Name",
      "type": "n8n-nodes-base.set",
      "position": [
        1460,
        880
      ]
    },
    {
      "id": "c4a9cc76-f4d1-44d8-8387-ac86050ed59e",
      "name": "Date?",
      "type": "n8n-nodes-base.if",
      "position": [
        2560,
        -120
      ]
    },
    {
      "id": "e5975182-bb7f-4112-967c-ec6542711041",
      "name": "Set Free Time Slots",
      "type": "n8n-nodes-base.set",
      "position": [
        3440,
        -120
      ]
    },
    {
      "id": "28d43d4a-741b-4b0d-bd91-7a0f231f1a87",
      "name": "Is First?",
      "type": "n8n-nodes-base.if",
      "position": [
        580,
        80
      ]
    },
    {
      "id": "e358368c-7f43-4d1e-aaa6-32512bdf8a69",
      "name": "Get Day Event",
      "type": "n8n-nodes-base.googleCalendar",
      "position": [
        3000,
        -120
      ]
    },
    {
      "id": "a70b08bf-6e23-49d3-b639-0b7c0e710527",
      "name": "Request Time",
      "type": "n8n-nodes-base.whatsApp",
      "position": [
        3880,
        -120
      ]
    },
    {
      "id": "e5e7ef99-e46b-49b0-bff3-ddc98ed3e28e",
      "name": "Update bot status on START ",
      "type": "n8n-nodes-base.postgres",
      "position": [
        1020,
        1080
      ]
    },
    {
      "id": "3d5a7690-81f2-46f0-b2fd-6ce1bfadfc03",
      "name": "Update bot status on START",
      "type": "n8n-nodes-base.postgres",
      "position": [
        1020,
        1280
      ]
    },
    {
      "id": "b2659d5c-f57c-47c8-87ec-cbbf6f6beab0",
      "name": "Set Work Hours",
      "type": "n8n-nodes-base.code",
      "position": [
        3220,
        -120
      ]
    },
    {
      "id": "55e3489d-47d2-4e9a-9afe-967db6a4eb67",
      "name": "Delete Answers",
      "type": "n8n-nodes-base.postgres",
      "position": [
        1900,
        880
      ]
    },
    {
      "id": "2fbf5296-23a4-4637-a1ab-943cf24ff96d",
      "name": "Union Slots",
      "type": "n8n-nodes-base.summarize",
      "position": [
        3660,
        -120
      ]
    },
    {
      "id": "478f8c66-b07b-4fd0-a4ad-63231d85e1fd",
      "name": "Set Date",
      "type": "n8n-nodes-base.set",
      "position": [
        2780,
        -120
      ]
    },
    {
      "id": "632a6248-6c39-42a5-91c0-2b89c2238e0f",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -480,
        400
      ],
      "parameters": {
        "width": null,
        "height": null,
        "content": ""
      }
    },
    {
      "id": "c7286a72-3e21-4ba8-9657-0885e2d11ba1",
      "name": "Sticky Note9",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -480,
        80
      ],
      "parameters": {
        "width": null,
        "height": null,
        "content": ""
      }
    },
    {
      "id": "18a9fb65-116b-4f20-802a-7f7b4b8b96af",
      "name": "Sticky Note10",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -480,
        -260
      ],
      "parameters": {
        "width": null,
        "height": null,
        "content": ""
      }
    },
    {
      "id": "cd4dac72-e88d-4a17-8991-461b6778edde",
      "name": "Sticky Note7",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -900,
        80
      ],
      "parameters": {
        "width": null,
        "height": null,
        "content": ""
      }
    },
    {
      "id": "9a36f447-b5fb-430c-a87e-d1af5b7743e2",
      "name": "Sticky Note8",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -900,
        -260
      ],
      "parameters": {
        "width": null,
        "height": null,
        "content": ""
      }
    },
    {
      "id": "4f164607-b1f6-4d71-8b88-2618e1c8f779",
      "name": "Sticky Note11",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -900,
        400
      ],
      "parameters": {
        "width": null,
        "height": null,
        "content": ""
      }
    }
  ],
  "connections": {
    "Date?": {
      "main": [
        [
          {
            "node": "Set Date",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Question",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Finish": {
      "main": [
        [
          {
            "node": "Get Answers",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Commands": {
      "main": [
        [
          {
            "node": "Update bot status on BOOKING",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Error",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Question": {
      "main": [
        [
          {
            "node": "Add pred Answer",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Set Date": {
      "main": [
        [
          {
            "node": "Get Day Event",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Is First?": {
      "main": [
        [
          {
            "node": "Update bot status on START",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Is bot starts?",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Is found?": {
      "main": [
        [
          {
            "node": "Get available questions",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Add Answer",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Add Answer": {
      "main": [
        [
          {
            "node": "Get available questions",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Define flow": {
      "main": [
        [
          {
            "node": "Get available question",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Commands",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get Answers": {
      "main": [
        [
          {
            "node": "Set Datetime AND Name",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Union Slots": {
      "main": [
        [
          {
            "node": "Request Time",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Request Time": {
      "main": [
        [
          {
            "node": "Add pred Answer",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get Day Event": {
      "main": [
        [
          {
            "node": "Set Work Hours",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Delete Answers": {
      "main": [
        [
          {
            "node": "Update bot status on START ",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get bot status": {
      "main": [
        [
          {
            "node": "Is First?",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Initialization": {
      "main": [
        [
          {
            "node": "Get bot status",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Is bot starts?": {
      "main": [
        [
          {
            "node": "Update bot status on START ",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Define flow",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Set Work Hours": {
      "main": [
        [
          {
            "node": "Set Free Time Slots",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Create an event": {
      "main": [
        [
          {
            "node": "Delete Answers",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "WhatsApp Trigger": {
      "main": [
        [
          {
            "node": "Initialization",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Set Free Time Slots": {
      "main": [
        [
          {
            "node": "Union Slots",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Set Datetime AND Name": {
      "main": [
        [
          {
            "node": "Create an event",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get available question": {
      "main": [
        [
          {
            "node": "Is found?",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get available questions": {
      "main": [
        [
          {
            "node": "Is Questions available?",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Is Questions available?": {
      "main": [
        [
          {
            "node": "Date?",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Finish",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Update bot status on START": {
      "main": [
        [
          {
            "node": "Welcome Message",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Update bot status on START ": {
      "main": [
        [
          {
            "node": "Main Menu",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Update bot status on BOOKING": {
      "main": [
        [
          {
            "node": "Get available question",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}