WooCommerce Product Lifecycle Management and Testing - n8n Workflow

Use this sequential n8n workflow template to automate the creation, updating, and retrieval of products within your WooCommerce store using the dedicated n8n node.

Workflow Preview

Ready to automate?

Download this n8n workflow template and start using it instantly.

Who is this best for?


  • E-commerce store owners and administrators looking to automate inventory and product updates.

  • Developers integrating WooCommerce with other backend systems.

  • n8n users who need a foundational n8n template to understand data passing between WooCommerce nodes.

  • Technical users aiming to test WooCommerce API connection credentials within n8n.

Overview

Effective management of e-commerce inventory requires reliable and automated tools. This n8n workflow provides a robust demonstration of core API interactions with WooCommerce. Starting from a simple manual n8n trigger, the n8n workflow successfully creates a new product, immediately updates its stock quantity (a common maintenance task), and then retrieves the final updated record. This sequence confirms API operability and demonstrates the crucial ability of an n8n node to pass dynamic data (like a newly generated Product ID) to subsequent nodes. This n8n template is invaluable for establishing the groundwork for more complex synchronization and management automations.

How it Works

This automation operates in a simple, linear fashion, triggered manually for testing:


  1. Start: The n8n workflow initiates when the user clicks 'execute' on the 'On clicking 'execute'' n8n trigger node.

  2. Creation (WooCommerce): The first WooCommerce n8n node receives the signal and creates a new product named 'n8n Sweatshirt' with a specified price and description.

  3. Updating (WooCommerce1): The workflow immediately proceeds to the second WooCommerce n8n node. This node uses an expression (={{$node["WooCommerce"].json["id"]}}) to dynamically grab the ID of the product created in the previous step. It then updates that product's inventory, setting the stockQuantity to 100.

  4. Verification (WooCommerce2): The final WooCommerce n8n node performs a 'get' operation. It uses the same dynamic ID to retrieve the product details, verifying that the initial creation and subsequent inventory update were successful and persisted in WooCommerce. This structured n8n workflow ensures reliable data handling.

Installation Guide

To utilize this highly valuable n8n template, follow these steps:


  1. Import the JSON: Copy the provided n8n workflow JSON code.

  2. Navigate to n8n: In your n8n instance, go to the Workflows section and select 'New'. Click the options menu and choose 'Import from JSON'. Paste the code.

  3. Set up WooCommerce Credentials: The n8n workflow requires credentials for the WooCommerce n8n node named 'woocommerce'.

Go to 'Credentials' in your n8n UI.
Add a new credential of type 'WooCommerce API'.
* Enter your Store URL, Consumer Key, and Consumer Secret. These details must have read and write permissions for product management.

  1. Apply Credentials: Ensure all three WooCommerce n8n node instances are linked to the newly created credential.

  2. Execute: Run the n8n workflow manually using the 'Execute Workflow' button to test the full CRUD sequence. Monitor the output of the final n8n node to confirm product creation and stock update.

Node Details

On clicking 'execute' (Manual Trigger): The starting n8n trigger for this demonstration n8n workflow. It allows users to manually initiate the process for testing and validation.
WooCommerce (Create): This is the first WooCommerce n8n node. Its function is to create a new product, 'n8n Sweatshirt,' with a regular price of '30'. This step generates the unique ID required for subsequent operations.
WooCommerce1 (Update): This WooCommerce n8n node performs an update operation. The key configuration here is the use of an expression (={{$node["WooCommerce"].json["id"]}}) to link the ID from the creation step, ensuring the correct product is updated. It sets the stockQuantity to 100.
WooCommerce2 (Get): This final WooCommerce n8n node retrieves the full product details using the dynamically passed Product ID. The operation confirms that the previous create and update actions within the n8n workflow were successful, providing verification data in the output.

Related n8n Workflows

Free

Nodes: 2 Nodes
Updated: December 26 2025
View all
Created by
ghagrawal17
ghagrawal17

Featured*