{
  "name": "Automated WhatsApp upsell messages for Shopify cancellations with Rapiwa & Sheet",
  "nodes": [
    {
      "id": "992f8f2a-7ee2-4270-8610-6bfb87b60edf",
      "name": "Loop Over Items",
      "type": "n8n-nodes-base.splitInBatches",
      "position": [
        -848,
        32
      ]
    },
    {
      "id": "fc63a6b3-60a9-4449-9d32-d24b812c2adc",
      "name": "Get Specific Customer Data",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        -624,
        48
      ]
    },
    {
      "id": "f95da48b-e758-46c7-af74-2018af4cac30",
      "name": "Split Out",
      "type": "n8n-nodes-base.splitOut",
      "position": [
        -1040,
        32
      ]
    },
    {
      "id": "66fa9744-d204-41a9-8b0a-5a623badaaae",
      "name": "Get All Cancelled Order",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        -1248,
        32
      ]
    },
    {
      "id": "43fb6336-dbf8-4a88-acfc-59dd3c5812e9",
      "name": "Get Product name with re-order llink",
      "type": "n8n-nodes-base.code",
      "position": [
        -416,
        48
      ]
    },
    {
      "id": "300043d5-8f43-4818-a590-43421fd8aac8",
      "name": "Get customer info",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        -224,
        48
      ]
    },
    {
      "id": "dd349ea5-87e6-4286-9733-b6120d35e46d",
      "name": "Get Customer Total Spent",
      "type": "n8n-nodes-base.code",
      "position": [
        -48,
        48
      ]
    },
    {
      "id": "1cd4b46f-8bcb-4524-9d86-b3c822a3fad7",
      "name": "Schedule Trigger",
      "type": "n8n-nodes-base.scheduleTrigger",
      "position": [
        -1424,
        32
      ]
    },
    {
      "id": "029cce6b-37c6-44d7-9340-f8141ad9f549",
      "name": "If",
      "type": "n8n-nodes-base.if",
      "position": [
        464,
        48
      ]
    },
    {
      "id": "fd47c64f-60d9-4b9f-92e9-9014a2d83b3d",
      "name": "Rapiwa (verify number)",
      "type": "n8n-nodes-rapiwa.rapiwa",
      "position": [
        288,
        48
      ]
    },
    {
      "id": "8e53fb88-71f4-43ed-845e-08c1fce09bcd",
      "name": "Rapiwa (sent message)",
      "type": "n8n-nodes-rapiwa.rapiwa",
      "position": [
        688,
        -80
      ]
    },
    {
      "id": "fac6b716-c4c2-4f8c-afd4-c231bc7acb0e",
      "name": "Sticky Note6",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        224,
        -320
      ],
      "parameters": {
        "width": 848,
        "height": 640,
        "content": "### 1. Check valid whatsapp number Using Rapiwa\n- Purpose: Verify WhatsApp registration via Rapiwa API.\n### 3. Rapiwa Sender\n- Purpose: Send personalized WhatsApp messages for verified numbers.\n### 4."
      }
    },
    {
      "id": "887aef29-03ac-47c3-bdec-58766185a08e",
      "name": "Wait",
      "type": "n8n-nodes-base.wait",
      "position": [
        928,
        144
      ]
    },
    {
      "id": "c326b1bf-5eb5-492d-8f6e-aa297c9caf8b",
      "name": "Store State of Rows in Verified & Sent",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        928,
        -80
      ]
    },
    {
      "id": "59c8637b-478b-424f-863d-f72ea2fe4193",
      "name": "Store State of Rows in Unverified & Not Sent",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        688,
        144
      ]
    },
    {
      "id": "adb18364-ac4b-406e-a038-388155b29102",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1424,
        320
      ],
      "parameters": {
        "width": 1072,
        "height": 752,
        "content": "# Send WhatsApp Upsell Recommendation Message for Shopify\n## Overview\n- **Fetch cancelled orders** on a schedule\n- **Collect customer and product details**\n- **Verify the customer’s WhatsApp number** "
      }
    },
    {
      "id": "cf075f6e-2fe0-4e07-acfd-d95957d35af7",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1296,
        -112
      ],
      "parameters": {
        "width": 208,
        "height": 304,
        "content": "### **Get All Cancelled Order**\n* **Purpose:** Fetches all cancelled orders from the Shopify store.\n\n"
      }
    },
    {
      "id": "9e179cf5-7d2b-4809-b4b6-eb6abc94d97e",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -96,
        -80
      ],
      "parameters": {
        "width": 304,
        "height": 272,
        "content": "### **Get Customer Total Spent**\n**Purpose:** Filters out customers who have **spent 0** (keeps only those who made purchases).\n\n\n"
      }
    },
    {
      "id": "5ae248e2-ef7d-4b0b-8ddd-9b8a5d16e9bc",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -704,
        -144
      ],
      "parameters": {
        "width": 432,
        "height": 336,
        "content": "### 5. **Get Specific Customer Data**\n* **Purpose:** Fetches all orders for a **specific customer** using their `customer_id`.\n\n\n### 6. **Get Product Name with Re-order Link**\n* **Purpose:** classify "
      }
    }
  ],
  "connections": {
    "If": {
      "main": [
        [
          {
            "node": "Rapiwa (sent message)",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Store State of Rows in Unverified & Not Sent",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Wait": {
      "main": [
        [
          {
            "node": "Loop Over Items",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Split Out": {
      "main": [
        [
          {
            "node": "Loop Over Items",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Loop Over Items": {
      "main": [
        [],
        [
          {
            "node": "Get Specific Customer Data",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Schedule Trigger": {
      "main": [
        [
          {
            "node": "Get All Cancelled Order",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get customer info": {
      "main": [
        [
          {
            "node": "Get Customer Total Spent",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Rapiwa (sent message)": {
      "main": [
        [
          {
            "node": "Store State of Rows in Verified & Sent",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Rapiwa (verify number)": {
      "main": [
        [
          {
            "node": "If",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get All Cancelled Order": {
      "main": [
        [
          {
            "node": "Split Out",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get Customer Total Spent": {
      "main": [
        [
          {
            "node": "Rapiwa (verify number)",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get Specific Customer Data": {
      "main": [
        [
          {
            "node": "Get Product name with re-order llink",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get Product name with re-order llink": {
      "main": [
        [
          {
            "node": "Get customer info",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Store State of Rows in Verified & Sent": {
      "main": [
        [
          {
            "node": "Wait",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Store State of Rows in Unverified & Not Sent": {
      "main": [
        [
          {
            "node": "Wait",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}