Connect WooCommerce order webhooks to self-hosted n8n. Automate real-time Slack alerts, PDF invoices, and Google Sheets sync with zero monthly SaaS fees. This practical guide covers step-by-step setup, real-world code snippets, security hardening, and common production edge cases.
Executive Summary & Key Takeaway (AEO)
E-commerce stores that rely on expensive SaaS automation tools (Zapier, Make) frequently incur substantial subscription costs as order volume scales. By pairing native WooCommerce REST Webhooks with self-hosted n8n, engineering teams build real-time fulfillment pipelines—dispatching instant warehouse Slack notifications, synchronizing ERP databases, and logging transactional analytics—without recurring per-task fees or third-party data sharing.
Architectural Workflow Overview
[ WooCommerce Store ]
│ (HTTP POST /order.created with HMAC Secret)
▼
[ Self-Hosted n8n Webhook Node ]
│
┌────┴───────────────────────────┐
▼ ▼
[ Verify HMAC Signature ] [ Parse Order JSON ]
│ │
├────────────────────────────────┼─────────────────┐
▼ ▼ ▼
[ Slack Dispatcher ] [ Google Sheets CRM ] [ ERP / 3PL API ]
(Fulfillment Alert) (Customer Log) (Stock Allocation)
By decoupling order creation from customer-facing WordPress page loads, the WooCommerce checkout flow completes instantly while background automation handles secondary operations asynchronously.
Step 1: Configuring the WooCommerce Webhook
- Log into your WordPress administrative dashboard.
- Navigate to WooCommerce → Settings → Advanced → Webhooks.
- Click Add Webhook and populate the fields:
- Name:
n8n Production Order Processor - Status:
Active - Topic:
Order created(woocommerce_checkout_order_processed) - Delivery URL:
https://n8n.yourdomain.com/webhook/wc-order-created - Secret: Generate a 32-character high-entropy secret string
- API Version:
WP REST API Integration v3
- Name:
- Click Save Webhook. WooCommerce will emit an initial ping verification handshake.
Step 2: Designing the n8n Ingestion Flow
In your self-hosted n8n dashboard, create a new workflow consisting of:
- Webhook Node: Configured to
POSTon/webhook/wc-order-created. - Code (Function) Node: To validate the cryptographic HMAC SHA-256 header.
// n8n Code Node: Validate HMAC SHA-256 signature
const crypto = require('crypto');
const secret = $env.WOOCOMMERCE_WEBHOOK_SECRET;
const signature = $node["Webhook"].json.headers['x-wc-webhook-signature'];
const rawPayload = JSON.stringify($node["Webhook"].json.body);
const calculatedSignature = crypto
.createHmac('sha256', secret)
.update(rawPayload)
.digest('base64');
if (calculatedSignature !== signature) {
throw new Error('Unauthorized: Invalid WooCommerce HMAC signature');
}
return {
json: {
verified: true,
order: $node["Webhook"].json.body
}
};
Step 3: Formatting Slack Fulfillment Alerts
Connect an HTTP Request or native Slack node to broadcast order alerts directly into your warehouse operations channel:
{
"blocks": [
{
"type": "header",
"text": {
"type": "plain_text",
"text": "🛍️ New WooCommerce Order #{{ $json.order.id }}"
}
},
{
"type": "section",
"fields": [
{
"type": "mrkdwn",
"text": "*Customer:*\n{{ $json.order.billing.first_name }} {{ $json.order.billing.last_name }}"
},
{
"type": "mrkdwn",
"text": "*Total Amount:*\n${{ $json.order.total }} {{ $json.order.currency }}"
},
{
"type": "mrkdwn",
"text": "*Items Ordered:*\n{{ $json.order.line_items.length }} products"
},
{
"type": "mrkdwn",
"text": "*Shipping Country:*\n{{ $json.order.shipping.country }}"
}
]
}
]
}
Cost & Scalability Comparison
| Platform | Monthly Cost (10,000 Orders) | Data Residency | Latency |
|---|---|---|---|
| Zapier Professional | ~$350 - $600 / month | Multi-tenant US Cloud | 1–5 minutes |
| Make.com Pro | ~$180 - $300 / month | Multi-tenant Cloud | 30–60 seconds |
| Self-Hosted n8n | $10 - $20 / month (VPS cost) | 100% Private Infrastructure | under 500ms Real-Time |
Enterprise Automation by Dev Pattern Labs
Need complex e-commerce order routing, automated ERP synchronization, or custom n8n nodes? Dev Pattern Labs designs automated systems with 100% code ownership. Check our Autonomous n8n Ops Consulting or start a 14-Day Delivery Sprint.
Companion E-Commerce Tutorials
Written by Dev Pattern LabsCore Engineering
Dev Pattern Labs is an engineering lab and digital consultancy specializing in custom Next.js web applications, WooCommerce REST API integrations, and workflow automation for growing businesses.
Recommended Companion Articles

Securing Webhook Endpoints with HMAC SHA-256 Signatures in Next.js
Prevent spoofing and replay attacks on Next.js 15 webhook routes. Implement HMAC SHA-256 validation, raw body parsing, and constant-time comparisons.

n8n Production Error Handling: Retries, Dead-Letter Queues & Alerts
Build bulletproof enterprise workflows in n8n. Configure automatic node retries, PostgreSQL dead-letter queues, and real-time alert notifications.

Next.js 15 Stripe Subscriptions & Billing Customer Portal Guide
Build a SaaS subscription engine in Next.js 15 with Stripe Billing, Checkout Sessions, Customer Portal redirects, and webhook lifecycle event handlers.
