n8n + WooCommerce Integration: Automate Orders, Inventory & More
The n8n WooCommerce integration gives store owners a direct connection between their WordPress-based shop and hundreds of other tools — without installing bloated plugins or writing custom PHP. WooCommerce powers over 35% of all online stores, but its built-in automation is limited to basic email notifications. With n8n, you can build workflows that handle everything from order routing to inventory sync to personalized customer outreach.
If you've been manually exporting CSV files, copying order details between tabs, or relying on a patchwork of WooCommerce plugins that break on every update, these five workflows will save you hours every week.
Why Automate WooCommerce with n8n
WooCommerce is flexible, but that flexibility comes with a cost: you end up managing dozens of plugins for things like accounting sync, shipping notifications, and CRM updates. Each plugin adds maintenance overhead, potential conflicts, and often a recurring subscription fee.
n8n replaces that plugin sprawl with a single automation layer. Here's what makes it a better fit than typical WooCommerce automation plugins:
- No per-task pricing — run unlimited workflows on your own instance
- 400+ integrations — connect WooCommerce to Slack, Google Sheets, Stripe, your CRM, shipping APIs, and more in one workflow
- Conditional logic — route orders differently based on product type, shipping country, order total, or customer tags
- Full API access — the WooCommerce node covers orders, products, and customers, and the HTTP Request node handles anything the REST API exposes
- Visual debugging — see exactly where a workflow failed and what data was passed at each step
Running n8n on a managed instance at n8nautomation.cloud means your WooCommerce automations stay online 24/7 without you maintaining a server — critical when you're processing customer orders.
Connecting WooCommerce to n8n
Before building workflows, you need to set up the WooCommerce credentials in n8n. The connection uses WooCommerce's REST API with consumer key authentication.
Step 1: Generate API keys in WooCommerce. In your WordPress admin, go to WooCommerce → Settings → Advanced → REST API. Click Add Key, give it a description like "n8n automation", set permissions to Read/Write, and click Generate. Copy the Consumer Key and Consumer Secret — you'll only see the secret once.
Step 2: Add credentials in n8n. In your n8n instance, go to Credentials → Add Credential → WooCommerce API. Fill in:
- Consumer Key — the key from Step 1
- Consumer Secret — the secret from Step 1
- WooCommerce URL — your store URL, e.g.
https://mystore.com
Step 3: Enable webhooks for triggers. If you want n8n to react to events in real time (new order placed, product updated), you'll use the WooCommerce Trigger node. This automatically registers a webhook in your WooCommerce store that fires when the selected event occurs. Make sure your n8n instance is publicly accessible — which it is by default on n8nautomation.cloud.
Tip: Use a dedicated API key for n8n rather than reusing an existing one. If you ever need to revoke access, you can disable just the n8n key without affecting other integrations.
Workflow 1: Automatic Order Processing Pipeline
This workflow triggers on every new WooCommerce order and routes it through a processing pipeline: logging the order, notifying your team, and updating your accounting tool.
Nodes used:
- WooCommerce Trigger — event:
order.created - IF — check if order total exceeds a threshold (e.g., $500) for priority handling
- Google Sheets — append order details (order ID, customer name, items, total) to a shared spreadsheet
- Slack — post a message to your
#orderschannel with order summary - QuickBooks / Xero / HTTP Request — create an invoice in your accounting software
How to build it:
- Add a WooCommerce Trigger node. Select your credentials and set the event to
Order Created. - Connect an IF node. Set the condition:
{{ $json.total }}greater than500. The true branch gets priority handling; the false branch follows the standard path. - On both branches, add a Google Sheets node (Append Row operation). Map columns for order number, customer email, line items, shipping address, and total.
- On the priority branch, add a Slack node that posts to a
#priority-orderschannel with the order details and a direct link to the WooCommerce admin order page. - Add an HTTP Request node at the end to push the invoice data to your accounting API.
This replaces WooCommerce's basic "new order" email with a structured pipeline that logs, notifies, and syncs — without installing a single WordPress plugin.
Workflow 2: Real-Time Inventory Sync
If you sell on multiple channels or manage inventory in an external system, keeping WooCommerce stock levels accurate is a constant headache. This workflow keeps everything in sync.
Nodes used:
- Schedule Trigger — runs every 15 minutes (or use a webhook from your inventory system)
- HTTP Request — fetch current stock levels from your inventory management system or ERP
- WooCommerce — Get All Products to pull current WooCommerce stock
- Merge — compare external stock levels with WooCommerce stock
- IF — only proceed if stock levels differ
- WooCommerce — Update Product to set the correct
stock_quantity - Slack — notify when a product hits low stock threshold
The key here is the Merge node set to mode Combine → Match Fields. Match on SKU to pair each external inventory record with its WooCommerce counterpart. Then the IF node filters to only products where the quantities don't match, so you're not making unnecessary API calls to WooCommerce.
For low-stock alerts, add a second IF node after the update: if stock_quantity drops below 10, fire a Slack message to your purchasing team with the product name, SKU, and current stock level.
Workflow 3: Post-Purchase Customer Follow-Up
Automated post-purchase emails increase repeat purchases, but WooCommerce's built-in follow-up options are limited to transactional emails. This workflow creates a timed follow-up sequence using n8n.
Nodes used:
- WooCommerce Trigger — event:
order.updated(filtered to statuscompleted) - Wait — pause for 7 days after delivery
- WooCommerce — Get Order to check that the order hasn't been refunded in the meantime
- IF — only continue if order status is still
completed - Send Email / Gmail / SendGrid — send a personalized follow-up asking for a review
- Wait — pause for another 14 days
- WooCommerce — Get Customer to check purchase history
- IF — if the customer has made 2+ purchases, send a loyalty discount code
- WooCommerce — Create Coupon with a unique code and percentage discount
- Send Email — deliver the coupon to the customer
The Wait node is what makes this work. It pauses workflow execution for a specified duration, then picks back up right where it left off. This is why running n8n on a reliable, always-on host matters — if your instance goes down during a wait period, the workflow won't resume. Managed hosting on n8nautomation.cloud handles uptime so you don't have to babysit a server.
The second half of this workflow uses the WooCommerce node's Create Coupon operation. Set the discount type to percent, the amount to your preferred discount (e.g., 15), and usage_limit to 1 so each code is single-use. Use an expression to generate the code: LOYAL-{{ $json.id }}-{{ $now.toMillis() }}.
Workflow 4: Abandoned Cart Recovery
WooCommerce doesn't track abandoned carts natively — you need a plugin or a custom solution. With n8n, you can build a recovery flow that checks for pending orders (which WooCommerce creates when a customer starts checkout) and follows up.
Nodes used:
- Schedule Trigger — runs every hour
- WooCommerce — Get All Orders with status
pendingand date filter for orders created more than 2 hours ago but less than 48 hours ago - IF — check that the order has a valid billing email
- Google Sheets — check a "contacted" log to avoid sending duplicate recovery emails
- Send Email — personalized recovery email with the items left in cart and a direct checkout link
- Google Sheets — log that this order ID has been contacted
To build the checkout recovery link, use WooCommerce's built-in cart recovery URL format: https://yourstore.com/checkout/order-pay/{{ $json.id }}/?pay_for_order=true&key={{ $json.order_key }}. This drops the customer right back into checkout with their cart intact.
The Google Sheets "contacted" log is a simple two-column sheet (Order ID, Date Contacted) that prevents the workflow from emailing the same customer every hour. Before sending, the workflow checks if the order ID exists in the sheet. If it does, the workflow skips that order.
This replaces plugins like WooCommerce Cart Abandonment Recovery or AutomateWoo's abandoned cart feature — without the annual subscription or potential plugin conflicts.
Workflow 5: Automated Sales Reporting
Instead of manually pulling reports from WooCommerce's analytics dashboard, this workflow generates a daily or weekly sales summary and delivers it to your team.
Nodes used:
- Schedule Trigger — runs daily at 8 AM or weekly on Monday mornings
- WooCommerce — Get All Orders with status
completedand date filter for the previous day/week - Code — aggregate the data: total revenue, number of orders, average order value, top-selling products
- Slack / Email — send a formatted summary to your team
- Google Sheets — append the daily/weekly totals to a running report spreadsheet
The Code node is where the real work happens. Here's the aggregation logic:
const orders = $input.all();
const totalRevenue = orders.reduce((sum, item) => sum + parseFloat(item.json.total), 0);
const orderCount = orders.length;
const avgOrderValue = orderCount > 0 ? (totalRevenue / orderCount).toFixed(2) : 0;
const productCounts = {};
orders.forEach(order => {
order.json.line_items.forEach(item => {
productCounts[item.name] = (productCounts[item.name] || 0) + item.quantity;
});
});
const topProducts = Object.entries(productCounts)
.sort((a, b) => b[1] - a[1])
.slice(0, 5)
.map(([name, qty]) => `${name}: ${qty} sold`);
return [{
json: {
totalRevenue: totalRevenue.toFixed(2),
orderCount,
avgOrderValue,
topProducts: topProducts.join('\n')
}
}];
Pipe the output into a Slack message with some formatting, and your team gets a clean daily digest without anyone logging into the WooCommerce dashboard. The Google Sheets append at the end builds a historical dataset you can use for trend analysis or share with stakeholders.
Tip: For stores with high order volumes, use the WooCommerce API's per_page parameter (max 100) with pagination in a loop. The Loop Over Items node in n8n handles this cleanly — increment the page parameter on each iteration until you get an empty response.