{
  "name": "Send WhatsApp appointment reminders and reschedule bookings with Wati and Google Sheets",
  "nodes": [
    {
      "id": "587768b6-db4d-4cb8-91f9-defc74f86a98",
      "name": "📋 Flow Overview",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1664,
        -464
      ],
      "parameters": {
        "width": 660,
        "height": 802,
        "content": "## 🏥 WhatsApp Appointment Reminder System with Rescheduling\n\n**How it works:**\n1. A scheduled trigger runs every morning and reads today's + tomorrow's appointments from Google Sheets\n2. Automated rem"
      }
    },
    {
      "id": "4eb92018-6466-4079-9175-82b3965ff326",
      "name": "Sticky – Scheduled Reminders",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1600,
        896
      ],
      "parameters": {
        "width": 1264,
        "height": 386,
        "content": "### 1️⃣ Scheduled Reminder Dispatch\n**Schedule Trigger** fires every morning at 9 AM.\n**Sheets – Read Appointments** fetches all appointments for today and tomorrow.\n**Filter Upcoming Code** keeps onl"
      }
    },
    {
      "id": "0ffa61fa-5bc4-430a-b338-cfa73cfdb9a5",
      "name": "Sticky – Inbound Routing",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -672,
        736
      ],
      "parameters": {
        "width": 672,
        "height": 722,
        "content": "### 2️⃣ Inbound Reply Routing\n**WATI Trigger** receives patient replies.\n**Route Message Switch** detects the reply keyword:\n- `confirm` → mark confirmed in Sheets + send confirmation\n- `cancel` → mar"
      }
    },
    {
      "id": "cc1be22d-b584-4126-add9-8e7d74486051",
      "name": "Sticky – Confirm & Cancel",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        240,
        256
      ],
      "parameters": {
        "width": 1024,
        "height": 578,
        "content": "### 3️⃣ Confirm & Cancel\n**Confirm Flow:** Reads patient's appointment → updates status to Confirmed in Sheets → updates Google Calendar event → sends warm confirmation message.\n**Cancel Flow:** Updat"
      }
    },
    {
      "id": "f6b88221-1a95-47fc-bb8a-0aedcf2db192",
      "name": "Sticky – Reschedule",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        240,
        880
      ],
      "parameters": {
        "width": 1036,
        "height": 610,
        "content": "### 4️⃣ Reschedule Flow\n**Show Slots Code** reads available time slots from Sheets (AvailableSlots tab), filters out already-booked ones and sends a numbered list to patient.\n**Slot Selection Code** p"
      }
    },
    {
      "id": "6b67e5a5-2c05-4d16-b9ec-aee0d34585c5",
      "name": "Sticky – Status & Admin",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        256,
        1536
      ],
      "parameters": {
        "width": 852,
        "height": 340,
        "content": "### 5️⃣ My Appointment & Admin Notify\n**My Appointment Flow:** Reads Sheets for this patient's phone → sends current booking details card.\n**Admin Notify:** On cancel or reschedule, sends a summary me"
      }
    },
    {
      "id": "3caddb03-b62c-40e1-b18c-c540ffa91ac5",
      "name": "Schedule Trigger – 9AM Daily",
      "type": "n8n-nodes-base.scheduleTrigger",
      "position": [
        1696,
        1056
      ]
    },
    {
      "id": "b5cd7697-4ea0-4560-b04e-d27e72e934e5",
      "name": "Google Sheets – Read Appointments",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        1936,
        1056
      ]
    },
    {
      "id": "8c629765-fb0c-4f8b-8f79-0e6a89ae34d3",
      "name": "Filter Upcoming Appointments",
      "type": "n8n-nodes-base.code",
      "position": [
        2176,
        1056
      ]
    },
    {
      "id": "094b69e1-deaa-40f0-90a0-084f47620302",
      "name": "Build Reminder Message",
      "type": "n8n-nodes-base.code",
      "position": [
        2400,
        1056
      ]
    },
    {
      "id": "1105af0a-7f00-4fad-91bd-90883c730cd6",
      "name": "Route Message",
      "type": "n8n-nodes-base.switch",
      "position": [
        -336,
        1024
      ]
    },
    {
      "id": "d4537013-0a96-45cf-bedb-75e71ae772d4",
      "name": "Google Sheets – Read for Confirm",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        352,
        416
      ]
    },
    {
      "id": "8f8451ad-4ccd-44e0-b16f-d5c94266df73",
      "name": "Process Confirmation",
      "type": "n8n-nodes-base.code",
      "position": [
        560,
        416
      ]
    },
    {
      "id": "a70d35fe-7f7d-43fc-82fc-9cbec4db162e",
      "name": "Google Sheets – Update Status Confirmed",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        768,
        416
      ]
    },
    {
      "id": "c47004c0-95f6-455c-a443-5fc3083a5f4f",
      "name": "Google Sheets – Read for Cancel",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        352,
        656
      ]
    },
    {
      "id": "51cfff13-6e93-4013-a3dc-ba9534c867e8",
      "name": "Process Cancellation",
      "type": "n8n-nodes-base.code",
      "position": [
        608,
        656
      ]
    },
    {
      "id": "2712317e-a6c7-4c90-b239-0661081c7f44",
      "name": "Google Sheets – Update Status Cancelled",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        816,
        656
      ]
    },
    {
      "id": "c4af005b-b3c6-403c-a615-9374cac32c95",
      "name": "Google Sheets – Read Available Slots",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        368,
        1024
      ]
    },
    {
      "id": "5a32891a-5e54-496d-8929-a13e6151ab0a",
      "name": "Build Available Slots",
      "type": "n8n-nodes-base.code",
      "position": [
        624,
        1024
      ]
    },
    {
      "id": "0dc22898-bdf1-4bee-9a16-243edc5c9422",
      "name": "Google Sheets – Save Reschedule Session",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        880,
        1024
      ]
    },
    {
      "id": "d0c8c7c1-a871-4553-a6f5-d312617962b5",
      "name": "Google Sheets – Read Reschedule Session",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        384,
        1280
      ]
    },
    {
      "id": "987860c3-237a-49d6-84b6-9ac8d70fb921",
      "name": "Process Slot Selection",
      "type": "n8n-nodes-base.code",
      "position": [
        624,
        1280
      ]
    },
    {
      "id": "2f67337e-a68c-4c41-87f1-74015c5db23b",
      "name": "Google Sheets – Update Rescheduled",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        880,
        1280
      ]
    },
    {
      "id": "89deab9b-54fa-4723-a57d-6fdfed6db894",
      "name": "Google Sheets – Read My Appointment",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        368,
        1680
      ]
    },
    {
      "id": "db98d5c0-914a-48c7-82cf-6dd385b4c519",
      "name": "Build My Appointment Card",
      "type": "n8n-nodes-base.code",
      "position": [
        624,
        1680
      ]
    },
    {
      "id": "43a7f4fd-46da-4cde-aa75-6f07167ac5f3",
      "name": "Send a text message",
      "type": "n8n-nodes-wati.wati",
      "position": [
        976,
        416
      ]
    },
    {
      "id": "1394c240-f6f6-47cb-99d2-1fc1504c2939",
      "name": "Send a text message1",
      "type": "n8n-nodes-wati.wati",
      "position": [
        1024,
        656
      ]
    },
    {
      "id": "04fd6678-77d2-40c9-9e24-b15112120022",
      "name": "Send a text message2",
      "type": "n8n-nodes-wati.wati",
      "position": [
        1088,
        1024
      ]
    },
    {
      "id": "a7036637-cf66-4a16-8975-aa8261d87770",
      "name": "Send a text message3",
      "type": "n8n-nodes-wati.wati",
      "position": [
        1104,
        1280
      ]
    },
    {
      "id": "1489cd18-a11e-4ecc-b79c-a72b5a26d182",
      "name": "Send a text message4",
      "type": "n8n-nodes-wati.wati",
      "position": [
        848,
        1680
      ]
    },
    {
      "id": "561443ba-02e2-4019-9c59-44db9af5ea9b",
      "name": "Wati Trigger",
      "type": "n8n-nodes-wati.watiTrigger",
      "position": [
        -608,
        1088
      ]
    },
    {
      "id": "2c1273ed-a893-437c-ad1c-452583ba9849",
      "name": "Send a text message5",
      "type": "n8n-nodes-wati.wati",
      "position": [
        2608,
        1056
      ]
    }
  ],
  "connections": {
    "Wati Trigger": {
      "main": [
        [
          {
            "node": "Route Message",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Route Message": {
      "main": [
        [
          {
            "node": "Google Sheets – Read for Confirm",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Google Sheets – Read for Cancel",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Google Sheets – Read Available Slots",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Google Sheets – Read My Appointment",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Google Sheets – Read Reschedule Session",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Process Cancellation": {
      "main": [
        [
          {
            "node": "Google Sheets – Update Status Cancelled",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Process Confirmation": {
      "main": [
        [
          {
            "node": "Google Sheets – Update Status Confirmed",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Build Available Slots": {
      "main": [
        [
          {
            "node": "Google Sheets – Save Reschedule Session",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Build Reminder Message": {
      "main": [
        [
          {
            "node": "Send a text message5",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Process Slot Selection": {
      "main": [
        [
          {
            "node": "Google Sheets – Update Rescheduled",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Build My Appointment Card": {
      "main": [
        [
          {
            "node": "Send a text message4",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Filter Upcoming Appointments": {
      "main": [
        [
          {
            "node": "Build Reminder Message",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Schedule Trigger – 9AM Daily": {
      "main": [
        [
          {
            "node": "Google Sheets – Read Appointments",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Google Sheets – Read for Cancel": {
      "main": [
        [
          {
            "node": "Process Cancellation",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Google Sheets – Read for Confirm": {
      "main": [
        [
          {
            "node": "Process Confirmation",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Google Sheets – Read Appointments": {
      "main": [
        [
          {
            "node": "Filter Upcoming Appointments",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Google Sheets – Update Rescheduled": {
      "main": [
        [
          {
            "node": "Send a text message3",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Google Sheets – Read My Appointment": {
      "main": [
        [
          {
            "node": "Build My Appointment Card",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Google Sheets – Read Available Slots": {
      "main": [
        [
          {
            "node": "Build Available Slots",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Google Sheets – Read Reschedule Session": {
      "main": [
        [
          {
            "node": "Process Slot Selection",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Google Sheets – Save Reschedule Session": {
      "main": [
        [
          {
            "node": "Send a text message2",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Google Sheets – Update Status Cancelled": {
      "main": [
        [
          {
            "node": "Send a text message1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Google Sheets – Update Status Confirmed": {
      "main": [
        [
          {
            "node": "Send a text message",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}