Automate WooCommerce Product Creation with AI & Google Sheets

This workflow automates WooCommerce product imports using Google Sheets and AI-driven SEO meta tag generation. It eliminates manual entry errors and speeds up product listing creation, making online store management efficient.
manualTrigger
googleSheets
splitInBatches
+6
Learn how to Build this Workflow with AI:
Workflow Identifier: 1169
NODES in Use: Manual Trigger, Google Sheets, Split In Batches, Code, WooCommerce, OpenRouter Chat Model, LangChain, Structured Output Parser, Telegram

Press CTRL+F5 if the workflow didn't load.

Visit through Desktop for Best experience

1. Opening Problem Statement

Meet Laura, the owner of a growing ecommerce store on WooCommerce. Laura spends countless hours each week manually copying product details from spreadsheets into her WooCommerce dashboard. Beyond the time drain, she often struggles to craft effective SEO meta titles and descriptions, missing out on potential Google traffic. This manual process not only wastes upwards of 10 hours a week but also leads to costly errors in product details and poor product visibility online.

Laura’s challenge is all too common among store owners juggling rapid expansions without dedicated content or SEO teams. If only there was a way to automate product creation directly from her existing product data spreadsheet and simultaneously generate optimized SEO metadata to boost search rankings — saving time and increasing sales.

2. What This Automation Does

This n8n workflow takes Laura’s Google Sheets product list and automates the entire import process into WooCommerce. Using AI through OpenRouter’s Gemini language model, it generates SEO-friendly meta titles and descriptions tailored to each product, ensuring better search engine performance.

Specifically, this automation:

  • Reads new product data from a Google Sheets document, including images, pricing, stock, and categories.
  • Processes product categories via a code node to format them correctly for WooCommerce.
  • Creates new WooCommerce products automatically with detailed info and images.
  • Uses an AI-powered SEO Expert node to generate optimized meta titles and descriptions based on product info.
  • Updates the WooCommerce products with generated SEO metadata for enhanced Google visibility.
  • Marks processed products as done in the Google Sheet to track import status.
  • Sends a Telegram notification upon completion for quick status updates.

By automating these steps, Laura can save over 10 hours per week, eliminate manual data entry mistakes, and boost her store’s Google search ranking with SEO-optimized product listings.

3. Prerequisites ⚙️

  • Google Sheets account with the product data spreadsheet 📊
  • WooCommerce store with API enabled on WordPress 🔐
  • OpenRouter API key for AI model access 🔑
  • Telegram account to receive notifications 💬 (optional)
  • n8n automation platform account (cloud or self-hosted) ⏱️
  • Yoast SEO plugin installed and enabled on WooCommerce WordPress site (to support SEO meta fields)

For those considering self-hosting n8n, reliable hosting like Hostinger is a great choice to keep this automation running seamlessly.

4. Step-by-Step Guide

Step 1: Prepare WooCommerce and Yoast SEO

First, install the Yoast SEO plugin on your WordPress WooCommerce site. Yoast is essential for managing SEO meta titles and descriptions.

Next, add the provided PHP code snippet into your theme’s functions.php file to expose Yoast meta fields via the REST API:

function abilita_yoast_meta_api() {
    $meta_keys = ['_yoast_wpseo_title', '_yoast_wpseo_metadesc'];

    foreach ($meta_keys as $meta_key) {
        register_post_meta('post', $meta_key, array(
            'type' => 'string',
            'description' => "Meta Yoast $meta_key per i post",
            'single' => true,
            'show_in_rest' => true, 
        ));

        register_post_meta('page', $meta_key, array(
            'type' => 'string',
            'description' => "Meta Yoast $meta_key per le pagine",
            'single' => true,
            'show_in_rest' => true,
        ));
    }
}
add_action('init', 'abilita_yoast_meta_api');

Expected Outcome: Yoast SEO meta fields are accessible via WooCommerce API for the workflow to update.

Common Mistake: Forgetting to enable WooCommerce REST API or incorrectly editing functions.php causing fatal errors.

Step 2: Enable WooCommerce API and Get API Credentials

Go to WooCommerce > Settings > Advanced > REST API in WordPress admin.

Create a new API key with read/write permissions and copy the consumer key and secret.

Expected Outcome: You have valid WooCommerce API credentials to connect n8n to your store.

Common Mistake: Assigning only read permissions will cause product creation to fail.

Step 3: Prepare Your Google Sheet with Product Data

Copy the example sheet linked in the sticky note and input your product details:

  • Ensure columns like Title, SKU, Category (comma-separated category IDs), Image URL, Regular Price, Sale Price, Short Description, Description (HTML accepted), and Stock Quantity are correctly filled.
  • Set the Category column as a comma-separated list of numeric WooCommerce category IDs.
  • Set Columns B, E, and F as text, and Column I as numeric.
  • Include product image URLs accessible publicly.

Expected Outcome: A clean product list ready for automated import.

Common Mistake: Leaving category IDs as strings or not formatting the image URL correctly.

Step 4: Configure the Manual Trigger in n8n

In n8n editor, start by adding the Manual Trigger node named When clicking ‘Test workflow’.

This manual trigger allows you to run the workflow on demand.

Expected Outcome: You can start the import process by manually kicking off the workflow.

Common Mistake: Forgetting to activate the workflow after testing.

Step 5: Set Up the Google Sheets Node to Get Products

Add a Google Sheets node configured to fetch all products where the “DONE” column is empty or not marked.

Connect your Google Sheets OAuth credentials and set the correct Spreadsheet ID and Sheet GID.

Expected Outcome: The workflow retrieves all new products to process.

Common Mistake: Using a cached or wrong Sheet ID or incorrect filter causing no data retrieval.

Step 6: Add the Split In Batches Node to Loop Over Products

Use the Split In Batches node to process products individually or in manageable parts.

This avoids timeouts and handles large product lists efficiently.

Expected Outcome: Workflow processes each product record in sequence.

Common Mistake: Omitting this node might cause memory or timeout issues on large datasets.

Step 7: Normalize Categories in a Code Node

Insert a Code node named Map categories with this JavaScript code to convert category strings into an array of numeric IDs:

for (const item of $input.all()) {
  if (item.json.CATEGORY && typeof item.json.CATEGORY === 'string') {
    item.json.CATEGORY = item.json.CATEGORY
      .split(',')
      .map(id => parseInt(id))
      .filter(id => !isNaN(id));
  }
}
return $input.all();

Expected Outcome: Categories correctly formatted as an array for WooCommerce API.

Common Mistake: Category field left as string or malformed input causing API errors.

Step 8: Create Products via WooCommerce Node

Add the WooCommerce node, set to create a new product using all relevant fields (title, SKU, prices, stock, images, categories, descriptions).

Make sure to map the category array from the code node output and link your WooCommerce credentials.

Expected Outcome: New products appear in your WooCommerce store with full details.

Common Mistake: Missing required fields or misconfigured credentials.

Step 9: Update Google Sheet After Product Creation

Use another Google Sheets node to mark the product as “DONE” in the spreadsheet and record the WooCommerce product ID and permalink.

This keeps your product list synchronized with the import status.

Expected Outcome: Spreadsheet update confirms product import.

Common Mistake: Incorrect row mapping causes wrong records to update.

Step 10: Generate SEO Meta Tags with AI

Add the OpenRouter Chat Model node configured to use the Gemini-2.0 Flash model, feeding it product details.

Chain it to an SEO Expert LangChain node with a prompt designed to generate optimized meta titles (max 60 chars) and meta descriptions (max 160 chars) for each product.

Use the Structured Output Parser node to parse the returned JSON output cleanly.

Expected Outcome: SEO meta tags generated uniquely for each product.

Common Mistake: Incorrect prompt or schema causing parsing errors.

Step 11: Update WooCommerce Product with SEO Metadata

Send an update operation via the WooCommerce node to insert Yoast SEO meta title and description fields using metadata keys _yoast_wpseo_title and _yoast_wpseo_metadesc.

Expected Outcome: Products are SEO optimized in WooCommerce.

Common Mistake: Yoast SEO plugin not installed or API fields not exposed.

Step 12: Update Google Sheets with SEO Meta Titles and Descriptions

Use a final Google Sheets node to store the generated meta title and description back into corresponding columns in your product spreadsheet.

Expected Outcome: Spreadsheet metadata columns reflect the SEO optimization status.

Common Mistake: Schema mismatch causing update failures.

Step 13: Send Completion Notification via Telegram

Optionally, notify your team with a Telegram message node alerting that product creation and SEO optimization are complete.

Expected Outcome: Quick notification confirms the automation’s success.

Common Mistake: Incorrect Telegram chat ID or missing credentials.

5. Customizations ✏️

  • Change AI Model or Prompt: In the OpenRouter Chat Model node, switch from Gemini 2.0 to any supported AI model or tailor the SEO Expert LangChain prompt to focus on different keywords or styles.
  • Adjust Product Fields: Modify the WooCommerce node to add custom fields such as product attributes, tags, or custom prices.
  • Batch Size Configuration: Change the Split In Batches node settings to process multiple products at once or slow down the rate for API limits.
  • Add Error Logging: Insert a Code node after critical steps to capture and log errors to a Google Sheet or Slack channel.
  • Integrate with Other Messaging Apps: Swap Telegram node for Slack or email notifications depending on your team’s preferences.

6. Troubleshooting 🔧

Problem: “Invalid WooCommerce API credentials”
Cause: API keys are incorrect or do not have write permissions.
Solution: Verify API keys in WooCommerce settings, regenerate if necessary, and ensure they have read/write access.

Problem: “Categories field not accepted by WooCommerce API”
Cause: Categories not formatted as an integer array.
Solution: Check the Code node that converts categories from comma strings to integer arrays. Make sure the category IDs exist in your WooCommerce store.

Problem: “SEO meta fields not updating”
Cause: Yoast SEO plugin missing or REST API access for meta fields is not enabled.
Solution: Confirm Yoast SEO is installed and active. Also review the PHP snippet in functions.php to enable the meta keys via REST API.

Problem: “AI output parsing error”
Cause: The AI response does not match expected JSON schema.
Solution: Adjust the Structured Output Parser node’s schema and ensure prompt clearly requests JSON formatted output.

7. Pre-Production Checklist ✅

  • Confirm Google Sheet has correct headers and formatted product data.
  • Test WooCommerce API credentials with a simple GET request.
  • Verify Yoast SEO plugin fields are accessible via REST API.
  • Run the workflow with sample data in manual trigger mode.
  • Check that each product is created correctly and SEO fields updated.
  • Ensure Google Sheets updates happen on the right rows.
  • Test Telegram notifications if enabled.

8. Deployment Guide

Activate the workflow inside n8n by switching it from inactive to active status.

Use the manual trigger to run an initial test with your product sheet.

Once confirmed, schedule the trigger (e.g., cron or webhook) to run automatically when product sheets update.

Monitor the Execution logs in n8n for errors and review Google Sheets for correct syncing.

10. Conclusion

You’ve just automated the entire WooCommerce product import process from spreadsheet data, coupled with AI-driven SEO meta creation — saving hours of tedious manual inputs.

This workflow not only eliminates human errors but also boosts product search visibility with expertly crafted SEO tags generated by the OpenRouter AI model.

Next, consider expanding this automation to handle bulk price updates, integrate with email marketing tools, or automate inventory alerts to take your ecommerce operations to the next level.

With this setup, Laura and many WooCommerce store owners can now enjoy streamlined product management and increased online sales efficiency.

Related Workflows

Automate Viral UGC Video Creation Using n8n + Degaus (Beginner-Friendly Guide)

Learn how to automate viral UGC video creation using n8n, AI prompts, and Degaus. This beginner-friendly guide shows how to import, configure, and run the workflow without technical complexity.
Form Trigger
Google Sheets
Gmail
+37
Free

AI SEO Blog Writer Automation in n8n (Beginner Guide)

A complete beginner guide to building an AI-powered SEO blog writer automation using n8n.
AI Agent
Google Sheets
httpRequest
+5
Free

Automate CrowdStrike Alerts with VirusTotal, Jira & Slack

This workflow automates processing of CrowdStrike detections by enriching threat data via VirusTotal, creating Jira tickets for incident tracking, and notifying teams on Slack for quick response. Save hours daily by transforming complex threat data into actionable alerts effortlessly.
scheduleTrigger
httpRequest
jira
+5
Free

Automate Telegram Invoices to Notion with AI Summaries & Reports

Save hours on financial tracking by automating invoice extraction from Telegram photos to Notion using Google Gemini AI. This workflow extracts data, records transactions, and generates detailed spending reports with charts sent on schedule via Telegram.
lmChatGoogleGemini
telegramTrigger
notion
+9
Free

Automate Email Replies with n8n and AI-Powered Summarization

Save hours managing your inbox with this n8n workflow that uses IMAP email triggers, AI summarization, and vector search to draft concise replies requiring minimal review. Automate business email processing efficiently with AI guidance and Gmail integration.
emailReadImap
vectorStoreQdrant
emailSend
+12
Free

Automate Email Campaigns Using n8n with Gmail & Google Sheets

This n8n workflow automates personalized email outreach campaigns by integrating Gmail and Google Sheets, saving hours of manual follow-up work and reducing errors in email sequences. It ensures timely follow-ups based on previous email interactions, optimizing communication efficiency.
googleSheets
gmail
code
+5
Free