FlowKit

Connecting WooCommerce to n8n: API keys, webhooks and e-commerce automations

Published 29 July 2026 · 4 min read

WooCommerce powers a huge share of global e-commerce — every WordPress store — but its native automation boils down to transactional emails and one plugin per task: one for invoices, one for the CRM, one for notifications. Each plugin adds load, configuration and conflict risk. n8n flips the architecture: the store emits events through webhooks, and all the logic lives outside, in workflows you control. This guide covers the prerequisites, API keys, the real-time trigger, the available operations and the most profitable automations.

Prerequisites: two WordPress settings that save an hour of debugging

WooCommerce's REST API demands two often-forgotten things:

  • Pretty permalinks: Settings → Permalinks → "Post name". With the "Plain" setting, the /wp-json/wc/v3/... routes return 404s and nothing works;
  • HTTPS: key authentication sends credentials in the clear over HTTP, so WooCommerce restricts it to encrypted connections. Your production store already has it; a test environment needs it too.

If the API still answers 401 or 403, look at security plugins (some block the REST API by default) or the host's firewall.

Authentication: the consumer key / consumer secret pair

  1. WordPress admin → WooCommerce → Settings → Advanced → REST API → Add key;
  2. Attach the key to a user, describe it ("n8n — production"), pick the permission: Read for reporting, Read/Write to act on the store;
  3. Copy the consumer key (ck_…) and consumer secret (cs_…) — shown only once;
  4. In n8n: a WooCommerce API credential with those two values and the store URL.

As always: the key lives in n8n's encrypted credentials, one key per use, minimal permission — the principles from our API credential security guide.

The WooCommerce Trigger: the store pushes its events

The WooCommerce Trigger node automatically creates a webhook in the store when the workflow is activated, on the chosen event: order.created, order.updated, order.deleted, product.created, product.updated, customer.created, customer.updated, coupon.*. WooCommerce signs each delivery (X-WC-Webhook-Signature header) and pushes the event as it happens — with one nuance: the webhook fires at the end of WordPress request processing, so on a busy site a few seconds of latency is normal.

Two production reflexes: your n8n must be reachable over HTTPS, and one order can fire order.updated several times in a row (payment, status, note) — an idempotency key or a status filter prevents replaying the same processing.

The operations: Order, Product, Customer

The WooCommerce node covers three resources with full CRUD:

  • Order: Create, Get, Get Many (filterable by status, date, customer), Update (change status, add a note), Delete;
  • Product: catalog management — price, stock, status, categories, images;
  • Customer: customer accounts and their metadata.

For the rest of the ecosystem (advanced coupons, subscriptions, taxes, reports), the /wp-json/wc/v3/ REST API can be consumed with an HTTP Request node using the same key pair in Basic Auth. One notable special case: abandoned carts. The WooCommerce cart lives in a session and isn't exposed by the standard API — use a cart-capture plugin, or work with pending/failed orders that materialize unfinished purchases, before plugging in our AI cart recovery pipeline.

The most profitable automations

This out-of-store orchestration logic isn't just a technical convenience: retail research shows value comes from integrating channels and data, not from each tool in isolation. The reference article by Peter Verhoef, P.K. Kannan and Jeffrey Inman, "From Multi-Channel Retailing to Omni-Channel Retailing" (Journal of Retailing, 2015, see on Google Scholar), describes the blurring of channel boundaries and the need for integrated customer data management across them — exactly what an n8n hub brings to a WooCommerce store: the order, the customer and the stock stop being information locked inside WordPress.

WooCommerce or Shopify for automation?

Both connect well to n8n, with different philosophies: WooCommerce gives total control (your server, your MySQL database directly accessible if needed, no commission) at the price of WordPress maintenance; Shopify offers a more standardized API and managed infrastructure, with its ecosystem's constraints. If you're weighing the two, our Shopify + n8n guide is the exact mirror of this one — and the automation patterns transfer identically.

In short

Connecting WooCommerce to n8n takes five minutes once the two prerequisites are in place (pretty permalinks, HTTPS): a consumer key/secret pair with Read/Write permission, an n8n credential, and the WooCommerce Trigger to receive orders, products and customers in real time. Start with the order → invoice → CRM trio, add stock alerts, then extend into AI (product content, reviews, recovery emails): the WordPress store becomes an event emitter, and all the intelligence lives in workflows you version and control.

FAQ

Frequently asked questions

How do I generate WooCommerce API keys for n8n?

In the WordPress admin: WooCommerce → Settings → Advanced → REST API → Add key. Pick a user, an explicit description and the permission level (Read/Write for full use), then copy the consumer key and consumer secret shown only once. In n8n, create a WooCommerce API credential with those two values and the store URL.

Why does the WooCommerce connection fail with a 401 or 404 error?

The two classic causes: WordPress permalinks set to "Plain" — the REST API requires pretty permalinks (Settings → Permalinks → Post name) — and missing HTTPS, required for key authentication. More rarely, a security plugin or the host's firewall blocks the /wp-json/wc/v3 routes.

Does the WooCommerce Trigger work in real time?

Yes: when the workflow is activated, n8n creates a webhook in WooCommerce on the chosen event (order.created, order.updated, product.updated, customer.created…). WooCommerce then pushes each event as it happens. Note that WooCommerce webhooks fire at the end of the WordPress request processing — on a slow site, a few seconds of latency is normal.

Can n8n retrieve WooCommerce abandoned carts?

Not directly: unlike orders, the cart lives in a WooCommerce session and isn't exposed by the standard REST API. You need either a cart-capture plugin that records it (and exposes its data or sends a webhook), or to work with orders in pending or failed status, which are accessible via the API and materialize unfinished purchases.

Bundle FlowKit Complet

€269