AI Product Importer for WooCommerce SEO Optimization - n8n Workflow

Use this powerful n8n workflow to import WooCommerce products from Google Sheets, automatically generating optimized Yoast SEO meta titles and descriptions using AI.

Workflow Preview

Ready to automate?

Download this n8n workflow template and start using it instantly.

Who is this best for?


  • E-commerce Managers needing bulk product creation.

  • SEO Specialists looking to automate metadata generation.

  • Users who rely on Google Sheets for product inventory.

  • Developers searching for advanced n8n templates integrating AI and WooCommerce.

Overview

Managing large product catalogs requires efficient data handling. This robust n8n workflow solves the tedious task of manually creating products and writing search engine optimized (SEO) metadata. It links your Google Sheets inventory directly to your WooCommerce store. The automation begins by extracting product details from the sheet. Crucially, it incorporates a specialized AI agent (using an OpenRouter-powered LLM) configured as an 'SEO Expert'. This expert analyzes the product description, title, and categories to instantly generate high-quality, character-limit-respecting meta titles and meta descriptions, essential for improved search visibility. After creation, the product is updated with the generated Yoast SEO metadata via the WooCommerce API. This sophisticated n8n template ensures that every new product is not only published swiftly but is also optimized for search from day one, significantly enhancing your operational efficiency.

How it Works

This advanced n8n workflow executes a multi-step product import and optimization process.


  1. Trigger and Fetch: The automation starts via the manual n8n trigger. The 'Get products' n8n node reads the designated Google Sheet, fetching rows that are marked for processing.

  2. Batch Processing: The 'Loop products' n8n node processes these entries in batches, ensuring stable execution for large imports.

  3. Data Transformation: The 'Map categories' code n8n node transforms the raw category IDs (from the sheet) into the array format required by the WooCommerce API.

  4. Product Creation: The 'Create product' n8n node uses the mapped data to publish the product (including descriptions, prices, and images) to WooCommerce.

  5. Completion Tracking: The 'Creation done' n8n node immediately updates the Google Sheet row with the new WooCommerce ID and permalink, marking the initial creation as complete.

  6. AI SEO Generation: The data is then fed into the AI chain. The 'SEO Expert' Langchain n8n node analyzes the product content and utilizes the 'OpenRouter Chat Model' to generate optimized metadata, which is validated by the 'Structured Output Parser'.

  7. SEO Meta Update: The 'Set SEO meta' n8n node updates the newly created WooCommerce product using the generated Yoast SEO metadata keys.

  8. Sheets Update (SEO): The 'Update meta' n8n node writes the final generated METATITLE and METADESCRIPTION back to the Google Sheet for auditing.

  9. Notification: Once the entire batch is finished, a Telegram message confirms the product creation process is complete. This complex n8n workflow delivers a fully automated solution.

Installation Guide

To deploy and utilize this n8n template, follow these steps:


  1. Import the n8n workflow: Copy the provided JSON data and paste it into your n8n instance using the 'New' -> 'Import from JSON' function.

  2. Configure Credentials:

Google Sheets: Set up your Google Sheets OAuth2 API credentials. Ensure the service account has read and write access to the product import spreadsheet.
WooCommerce: Configure your WooCommerce API credentials (Consumer Key and Consumer Secret) with read/write permissions.
OpenRouter: Set up OpenRouter API credentials for the LLM integration.
Telegram: Add your Telegram API credentials and replace CHATID in the 'Send message' n8n node parameters with your specific chat identifier.

  1. Prerequisites (WooCommerce/WordPress):

Install and activate the Yoast SEO plugin on your WordPress site.
Enable the WooCommerce REST API.
* Crucially, you must add custom code to your functions.php file (or via a snippet plugin) to enable Yoast SEO metadata fields (
yoastwpseotitle and yoastwpseo_metadesc) for the WooCommerce REST API. The necessary code is provided in the workflow's sticky notes.

  1. Prepare Google Sheet: Copy the template sheet structure linked in the workflow's sticky notes. Ensure category IDs are comma-separated and relevant columns are formatted correctly (especially B, E, and F as 'text' and I as 'numeric').

  2. Test: Once all credentials and external setups are complete, click 'Test workflow' on the manual n8n trigger node to initiate a dry run.

Node Details

When clicking ‘Test workflow’ (Manual Trigger): The initiating n8n trigger for the entire process, allowing manual start of the product batch import.
Get products (Google Sheets n8n node): Reads the source spreadsheet to gather product data, filtering for items ready for import.
Loop products (Split In Batches n8n node): Ensures sequential processing of each product item, managing input for subsequent nodes.
Map categories (Code n8n node): Executes JavaScript to transform comma-separated string inputs for product categories into an array of integers, which is the required format for the WooCommerce API. Essential pre-processing for the WooCommerce n8n node.
Create product (WooCommerce n8n node): Performs the create operation, pushing all product details (SKU, prices, descriptions, images, categories) into the WooCommerce store.
SEO Expert (Langchain Chain LLM n8n node): The core intelligence of this n8n workflow. It uses a detailed prompt instructing the AI to act as an SEO expert to generate optimized meta titles (max 60 chars) and meta descriptions (max 160 chars) based on product data.
OpenRouter Chat Model (LLM Chat n8n node): Serves as the large language model backend (using Gemini 2.0 Flash) for generating the SEO content as instructed by the 'SEO Expert' n8n node.
Structured Output Parser (Langchain n8n node): Guarantees the AI output is correctly formatted into metatitle and metadescription keys for reliable data mapping.
Set SEO meta (WooCommerce n8n node): Executes the update operation using the newly created product ID to insert the AI-generated meta titles and descriptions into the Yoast-specific metadata fields.
Creation done / Update meta (Google Sheets n8n nodes): These nodes manage the two-stage update of the source sheet, marking the product as created (with ID/permalink) and subsequently updating the row with the AI-generated metadata.

Related n8n Workflows

Free

Nodes: 10 Nodes
Updated: December 26 2025
View all
Created by

Full-stack Web Developer based in Italy specialising in Marketing & AI-powered automations. For business enquiries, send me an email at [email protected] or add me on Linkedin.com/in/davideboizza

Featured*