{
  "name": "Auto-send WooCommerce invoices via WhatsApp with Rapiwa API",
  "nodes": [
    {
      "id": "5f97a4ae-506f-4eeb-b65b-7387d6db9d37",
      "name": "If",
      "type": "n8n-nodes-base.if",
      "position": [
        1600,
        784
      ]
    },
    {
      "id": "54f3f8ff-50f7-455d-8cbc-ba13df739240",
      "name": "Wait",
      "type": "n8n-nodes-base.wait",
      "position": [
        2096,
        864
      ]
    },
    {
      "id": "61f4a6bc-43fd-44f9-a1bf-09ad7fb8cc78",
      "name": "Loop Over Items",
      "type": "n8n-nodes-base.splitInBatches",
      "position": [
        624,
        768
      ]
    },
    {
      "id": "bff871ca-9ae6-4988-ada1-6d5f5ea9f959",
      "name": "Clean Webhooks Response Data",
      "type": "n8n-nodes-base.code",
      "position": [
        192,
        768
      ]
    },
    {
      "id": "bde660f4-cf63-4d5e-bff2-65f8c77f3342",
      "name": "Clean WhatsApp Number",
      "type": "n8n-nodes-base.code",
      "position": [
        1024,
        784
      ]
    },
    {
      "id": "77e7e43e-79ca-48bd-a85d-7be61344a3bd",
      "name": "Append Rows in Sheet Verified & Sent",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        2080,
        672
      ]
    },
    {
      "id": "ffac664e-9c0c-48e8-aa24-2256cfbbaca2",
      "name": "WooCommerce Trigger",
      "type": "n8n-nodes-base.wooCommerceTrigger",
      "position": [
        -64,
        768
      ]
    },
    {
      "id": "9ed7e611-af93-4329-a39c-992cbdc51b33",
      "name": "Append Rows in Sheet Unverified & Not sent",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        1872,
        864
      ]
    },
    {
      "id": "7f93c1a4-5703-4edd-976f-fecf168023e4",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1392,
        480
      ],
      "parameters": {
        "width": 1216,
        "height": 1072,
        "content": "# Auto-Send WooCommerce Invoices via WhatsApp with Rapiwa API\n\n## Overview\nThis workflow listens for new or updated WooCommerce orders, cleans and structures the order data, processes orders in batche"
      }
    },
    {
      "id": "ffb8f162-d281-4700-a655-9c67cd3db51d",
      "name": "Sticky Note4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1504,
        272
      ],
      "parameters": {
        "width": 848,
        "height": 816,
        "content": "## If (Condition)\n- Purpose: Branch the workflow based on Rapiwa verification response.\n- It's route to `Send Message Using Rapiwa` or `Unverified & Not sent`.\n\n\n## Send Message Using Rapiwa\n- Purpose"
      }
    },
    {
      "id": "da93b6ea-eabe-49f2-82e1-74bfc22921cc",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        832,
        544
      ],
      "parameters": {
        "width": 656,
        "height": 544,
        "content": "## 1. Clean WhatsApp Number\n- Purpose: Ensure the `number` field is a string and remove non-digit characters.\n- Why it matters: Ensures Rapiwa receives a consistent numeric-only phone number.\n\n\n## 2. "
      }
    },
    {
      "id": "3b65cf78-cfc1-417b-8a45-3719a25efbf0",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -160,
        480
      ],
      "parameters": {
        "width": 624,
        "height": 608,
        "content": "## 1. WooCommerce Trigger\n- Trigger event: `order. complete`\n- Purpose: Entry point for the workflow. Receives order complete from WooCommerce.\n- Credentials: `wooCommerceApi` (example name: \"WooComme"
      }
    },
    {
      "id": "8e38d72a-772a-4203-8d71-4953684bcc8e",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -160,
        1104
      ],
      "parameters": {
        "width": 2512,
        "height": 448,
        "content": "## How to Use — Step-by-step Setup\n1) Configure credentials in n8n\n   - Rapiwa: add your Bearer token to an HTTP Bearer credential (`Rapiwa Bearer Auth`).\n   - Google Sheets: connect OAuth2 credential"
      }
    },
    {
      "id": "e2b00250-8849-48a2-8241-189cb53c4f08",
      "name": "Rapiwa (verify whatsapp number)",
      "type": "n8n-nodes-rapiwa.rapiwa",
      "position": [
        1232,
        784
      ]
    },
    {
      "id": "a02dc376-b584-46f9-8da9-3101003fffa7",
      "name": "Rapiwa (send message)",
      "type": "n8n-nodes-rapiwa.rapiwa",
      "position": [
        1872,
        672
      ]
    }
  ],
  "connections": {
    "If": {
      "main": [
        [
          {
            "node": "Rapiwa (send message)",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Append Rows in Sheet Unverified & Not sent",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Wait": {
      "main": [
        [
          {
            "node": "Loop Over Items",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Loop Over Items": {
      "main": [
        [],
        [
          {
            "node": "Clean WhatsApp Number",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "WooCommerce Trigger": {
      "main": [
        [
          {
            "node": "Clean Webhooks Response Data",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Clean WhatsApp Number": {
      "main": [
        [
          {
            "node": "Rapiwa (verify whatsapp number)",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Rapiwa (send message)": {
      "main": [
        [
          {
            "node": "Append Rows in Sheet Verified & Sent",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Clean Webhooks Response Data": {
      "main": [
        [
          {
            "node": "Loop Over Items",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Rapiwa (verify whatsapp number)": {
      "main": [
        [
          {
            "node": "If",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Append Rows in Sheet Verified & Sent": {
      "main": [
        [
          {
            "node": "Wait",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Append Rows in Sheet Unverified & Not sent": {
      "main": [
        [
          {
            "node": "Wait",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}