Quick overview
This workflow confirms WooCommerce cash-on-delivery orders using WhatsApp polls sent via Supergreen, tracks order status in Google Sheets, and notifies customers and ops teams with WhatsApp and Slack messages for confirmations, address changes, cancellations, shipment updates, reminders, and errors.
How it works
- Triggers when WooCommerce creates a new order, deduplicates webhook retries, normalizes customer/order details (including phone number), and routes the order based on whether the payment method is cash on delivery.
- For COD orders, it updates the WooCommerce order to on-hold, sends a 3-option WhatsApp confirmation poll via Supergreen, and logs the pending order (including the poll message ID and reminder due time) to Google Sheets.
- For prepaid (non-COD) orders, it sends a WhatsApp order confirmation via Supergreen and logs the order as confirmed in Google Sheets.
- Triggers when a customer votes on the WhatsApp poll via Supergreen, looks up the matching order in Google Sheets by poll message ID, validates the vote, and routes the decision.
- If the customer confirms, it updates the WooCommerce order to processing, marks the order as confirmed COD in Google Sheets, and sends a WhatsApp confirmation message.
- If the customer requests an address change or cancels, it updates Google Sheets accordingly, alerts the ops team in Slack for address changes (and prompts the customer to reply with a new address), or cancels the order in WooCommerce and confirms the cancellation via WhatsApp.
- Triggers on WooCommerce order updates, filters for orders that reach completed status, deduplicates notifications, sends a WhatsApp dispatched message via Supergreen, and updates the order status to Completed in Google Sheets.
- Runs every two hours to find overdue pending COD orders in Google Sheets, sends a WhatsApp reminder via Supergreen, marks the reminder as sent in Google Sheets, and alerts ops in Slack.
Setup
- Add WooCommerce API credentials and ensure WooCommerce webhooks can reach the workflow’s WooCommerce Trigger nodes.
- Install the n8n-nodes-supergreen community node, connect your Supergreen WhatsApp line, and add Supergreen API credentials.
- Add Google Sheets OAuth2 credentials, create a spreadsheet with a WooOrders sheet, and set the spreadsheet ID in the configuration values (replacing SET_GOOGLE_SHEET_ID).
- Add Slack OAuth2 credentials, choose the ops channel to receive alerts, and replace SET_SLACK_CHANNEL_ID in the configuration and error-alert message.
Requirements
Customization
- Customize codReminderHours (default 4h), codPaymentMethod slug (default cod), localize the 3 WhatsApp poll choices, or swap Google Sheets for Airtable or Postgres.