Back to Templates

Send WooCommerce Category Alerts via WhatsApp with Rapiwa API & Google Sheets

Last update

Last update 3 days ago

Share


WooCommerce New Category Alert via WhatsApp Using Rapiwa API

This n8n automation listens for the creation of a new WooCommerce product category, fetches all WooCommerce customers, cleans and formats their phone numbers, verifies them using the Rapiwa WhatsApp validation API, sends a WhatsApp message to verified numbers with the new category info, and logs each interaction into a Google Sheet (separately for verified and unverified customers).

Who this is for

You have a WooCommerce store and want to:

  • Send a promotional message when a new product category is added,
  • Verify customer WhatsApp numbers in bulk,
  • Keep a clear log in Google Sheets of which numbers are verified or not.

What it does (high level)

  1. Webhook is triggered when a new WooCommerce category is created.
  2. Fetches all WooCommerce customers via API.
  3. Limits processing to the first 10 customers (for performance/testing).
  4. Cleans phone numbers (removes +, spaces, and non-digits).
  5. Verifies each number via Rapiwa WhatsApp Verify API.
  6. If verified: sends WhatsApp message with new category info, logs as Verification = verified, Status = sent.
  7. If not verified: logs as Verification = unverified, Status = not sent.
  8. Processes users in batches with delays to avoid rate limiting.

How it works (step-by-step)

  • Trigger: Webhook node is triggered by WooCommerce category creation.
  • Format Data: Category details (name, slug, description) are parsed.
  • Get Customers: Fetch all WooCommerce customers using the WooCommerce API.
  • Limit: Only the first 10 are processed.
  • Loop & Clean: Loop over each customer, clean phone numbers and extract info.
  • Verify Number: Send HTTP POST to https://app.rapiwa.com/api/verify-whatsapp.
  • Decision Node: Use If node to check if exists == true.
  • Send Message: If verified, send WhatsApp message with category details.
  • Append to Sheet: Log verified and unverified customers separately in Google Sheets.
  • Wait + Batch Control: Use Wait and SplitInBatches nodes to control flow and prevent throttling.

Example verify body (HTTP Request node):

{
  "number": "{{ $json['WhatsApp No'] }}"
}

Customization ideas

  • Send images, videos, or template messages if supported by Rapiwa.
  • Personalize messages using name or category data.
  • Increase delay or reduce batch size to minimize risk of rate limits.
  • Add a second sheet to log full API responses for debugging and auditing.

Best practices

  • Test on small batches before scaling.
  • Only send messages to users who opted in.
  • Store API credentials securely using n8n’s credentials manager.
  • Ensure your Google Sheet column headers match exactly with what's expected.

Key Improvements Made

  • Clarified the trigger source as a Webhook from WooCommerce category creation.
  • Fixed inconsistency in the "What it does" section (originally referenced reading from Google Sheets, but your workflow starts from WooCommerce, not Sheets).
  • Standardized terminology to match n8n nodes: Webhook, Loop, HTTP Request, etc.
  • Aligned the flow exactly with your nodes:
    • Webhook → Format → Get Customers → Limit → Loop → Clean → Verify → If → Send/Log → Wait → Repeat

Useful Links

Support