Blog/Automation

How to Send WhatsApp Upsell Messages for Shopify Cancellations with Rapiwa

Automatically send WhatsApp upsell messages to Shopify customers who cancel orders, using Rapiwa API, n8n, and Google Sheets. 56 installs. Recover revenue with personalized upsell offers.

by Ashik
How to Send WhatsApp Upsell Messages for Shopify Cancellations with Rapiwa

This n8n workflow automatically sends a personalized upsell WhatsApp message to Shopify customers when they cancel an order. Using Rapiwa API ($5/month, no per-message fees) and a Google Sheet to track previous offers, the message suggests a better-fitting product or a discounted alternative. Over 56 developers use this workflow to recover revenue from cancellations.

What This Workflow Does

When a Shopify order is cancelled:

  1. n8n detects the cancellation via Shopify webhook
  2. Looks up the customer's purchase history in a Google Sheet
  3. Selects the most relevant upsell product based on what was cancelled
  4. Sends a personalized WhatsApp message offering the alternative product
  5. Logs the upsell offer to the Google Sheet to prevent duplicate sends

Result: 8–15% of customers who receive a relevant upsell after cancellation make a new purchase within 48 hours.

Ready-made template: Import with one click: Automated WhatsApp upsell messages for Shopify cancellations with Rapiwa & Sheet →(56 installs)

Prerequisites

  • Rapiwa accountStart free 3-day trial →
  • n8n — Cloud free tier or self-hosted
  • Shopify store — Admin API access token
  • Google Sheets — for upsell product mapping and logging

Step 1: Set Up the Upsell Product Mapping Sheet

Create a Google Sheet with two tabs:

Tab 1: Product Mappings

Cancelled SKUUpsell ProductUpsell URLDiscount Code
LAPTOP-PROLAPTOP-STANDARDyourstore.com/laptop-standardCANCEL10
SHOES-XLSHOES-Lyourstore.com/shoes-lCANCEL10
COFFEE-PREMIUMCOFFEE-REGULARyourstore.com/coffee-regularCANCEL15

Tab 2: Upsell Log (to prevent duplicate messages)

order_idcustomer_phoneupsell_sentsent_at

Step 2: Import the n8n Template

  1. Go to n8n.io/workflows/10790
  2. Click Use this workflow
  3. The workflow nodes:
    • Shopify Triggerorders/cancelled
    • Google Sheets → check if upsell already sent
    • Google Sheets → fetch upsell product for cancelled SKU
    • IF node → skip if no upsell mapping found
    • Set node → build upsell message
    • HTTP Request (Rapiwa) → send WhatsApp
    • Google Sheets → log the sent upsell

Step 3: Configure Shopify Trigger

  1. Click Shopify Trigger node
  2. Credentials: enter store URL + Admin API token
  3. Topic: orders/cancelled

Step 4: Configure the Google Sheets Lookup

Lookup node: check if upsell already sent

  • Operation: Lookup Row
  • Sheet: Upsell Log
  • Lookup Column: order_id
  • Lookup Value: {{ $json.id }}

Lookup node: fetch upsell product

  • Operation: Lookup Row
  • Sheet: Product Mappings
  • Lookup Column: Cancelled SKU
  • Lookup Value: {{ $('Shopify Trigger').item.json.line_items[0].sku }}

Step 5: Configure the Rapiwa Send Node

Find the HTTP Request node "Send WhatsApp Upsell":

  • Method: POST
  • URL: https://app.rapiwa.com/send-message
  • Authorization: Bearer YOUR_API_KEY
  • Body:
{
  "number": "={{ $json.customer_phone }}",
  "message": "={{ $json.upsell_message }}"
}

Working cURL test:

curl -X POST https://app.rapiwa.com/send-message \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "number": "8801234567890",
    "message": "Hi Sarah! We noticed you cancelled your order for the Laptop Pro.\n\nMaybe our Laptop Standard is a better fit? Same quality, lower price:\n\nhttps://yourstore.com/laptop-standard\n\nUse code *CANCEL10* for 10% off — valid for 48 hours! 🎁"
  }'

Expected response:

{
  "status": "success",
  "messageId": "msg_upsell_abc123",
  "timestamp": "2026-07-05T10:30:00Z"
}

Step 6: Craft Effective Upsell Messages

The upsell message template:

Hi {{ $json.customer_first_name }}! 👋

We noticed you cancelled your order for *{{ $json.cancelled_product_name }}*.

No problem — but before you go, have you considered *{{ $json.upsell_product_name }}*?

It might be a better fit for you:
✅ {{ $json.upsell_benefit_1 }}
✅ {{ $json.upsell_benefit_2 }}
💰 Price: {{ $json.upsell_price }}

🎁 Special offer: Use code *{{ $json.discount_code }}* for 10% off.
Valid for 48 hours only.

View product: {{ $json.upsell_url }}

No pressure — just wanted you to know! 😊

What makes an effective upsell after cancellation:

  1. Acknowledge the cancellation — don't pretend it didn't happen
  2. Suggest a real alternative — not just any product, but one that's relevant to what they cancelled
  3. Explain why it's better — 2–3 bullet points of specific benefits
  4. Add a time-limited discount — 10–15% discount with 48-hour expiry
  5. Keep the tone friendly — low pressure, high value

Step 7: Log the Upsell and Avoid Duplicates

After sending, add a row to the Upsell Log sheet:

FieldValue
order_id{{ $('Shopify Trigger').item.json.id }}
customer_phone{{ $json.customer_phone }}
upsell_senttrue
sent_at{{ $now.toISO() }}

The duplicate-check node at the start will find this row and skip future runs for the same order.

Real-World Results

  • 56 Shopify stores already use this workflow
  • 8–15% of customers who receive a relevant WhatsApp upsell make a new purchase
  • Upsell conversion is 3–4x higher via WhatsApp than email for cancelled orders
  • Personalized upsells (based on the cancelled product) outperform generic discount codes by 2x

Common Errors and Fixes

  • No upsell mapping found: Not every product has a mapped upsell. The IF node should check for empty lookup results and skip gracefully.
  • Phone not available: Shopify may not store customer phone numbers. Check order.billing_address.phone and order.customer.phone — use whichever is populated.
  • Customer-requested cancellations: If the cancellation reason is customer, the upsell message is still appropriate — the customer changed their mind, so they may respond to an alternative.
  • 401 from Rapiwa: Regenerate API key in Dashboard → API Keys.

FAQ

What cancellation reasons should trigger an upsell? All cancellation types except fraud. For customer-requested, inventory, and payment-declined cancellations, an upsell makes sense. For fraud, don't send any follow-up messages.

How long after cancellation should I send the upsell? Send within 30 minutes — while the purchase intent is still warm. A 24+ hour delay drastically reduces conversion.

Does Rapiwa charge per upsell message? No. Rapiwa charges $5/month flat with no per-message fees.

Can I A/B test different upsell messages? Yes. Add a Random node in n8n to assign customers to variant A or B, send different messages, and track redemption by discount code in Shopify.

What if the customer doesn't have a mapped upsell product? The IF node routes these cases to a generic message: "We noticed you cancelled — here's 10% off your next order: store URL with code WELCOME10." It's less targeted but still recovers some revenue.