AutomationFlowsAI & RAG › Generate Authentic Product Reviews with Openai for Woocommerce

Generate Authentic Product Reviews with Openai for Woocommerce

ByAli Khosravani @alikhosro on n8n.io

This workflow automatically generates natural product comments using AI and posts them to your WooCommerce store. It helps boost engagement and makes product pages look more active and authentic.

Event trigger★★★★☆ complexityAI-powered7 nodesHTTP RequestOpenAI
AI & RAG Trigger: Event Nodes: 7 Complexity: ★★★★☆ AI nodes: yes Added:

This workflow corresponds to n8n.io template #7579 — we link there as the canonical source.

This workflow follows the HTTP Request → OpenAI recipe pattern — see all workflows that pair these two integrations.

The workflow JSON

Copy or download the full n8n JSON below. Paste it into a new n8n workflow, add your credentials, activate. Full import guide →

Download .json
{
  "nodes": [
    {
      "id": "37f90234-8233-495a-b9e5-394de7c76852",
      "name": "When clicking \u2018Execute workflow\u2019",
      "type": "n8n-nodes-base.manualTrigger",
      "position": [
        0,
        -624
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "f91ce677-4b08-43f7-b742-a54f9c48e07c",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -128,
        -768
      ],
      "parameters": {
        "color": 2,
        "width": 1696,
        "height": 336,
        "content": "## Product AI Comment Generator\n\nThis workflow automatically generates short, natural-sounding product reviews using AI and posts them to your WooCommerce store. It fetches product data via the WooCommerce REST API, crafts a custom AI prompt for each product, and then submits the generated review as a product comment.\n\n"
      },
      "typeVersion": 1
    },
    {
      "id": "512931cd-db6a-4056-b8bc-4705ea1f7877",
      "name": "Fetch Products from WooCommerce",
      "type": "n8n-nodes-base.httpRequest",
      "maxTries": 5,
      "position": [
        224,
        -624
      ],
      "parameters": {
        "url": "https://example.com/wp-json/wc/v3/products?per_page=100",
        "options": {
          "timeout": 600000,
          "batching": {
            "batch": {
              "batchSize": 100
            }
          }
        },
        "authentication": "genericCredentialType",
        "genericAuthType": "httpBasicAuth"
      },
      "credentials": {
        "httpBasicAuth": {
          "name": "<your credential>"
        }
      },
      "retryOnFail": true,
      "typeVersion": 4.2,
      "waitBetweenTries": 2000
    },
    {
      "id": "aef7c79c-96aa-4252-bd69-d2f83b773661",
      "name": "Build Product Comment Prompt",
      "type": "n8n-nodes-base.set",
      "position": [
        464,
        -624
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "3af62c72-bd9b-433a-943c-4caafe23bdd5",
              "name": "prompt",
              "type": "string",
              "value": "=={{ `For the product \u201c${$json.name}\u201d, write a natural comment (one sentence). \nDescription: ${($json.short_description || $json.description || '').replace(/<[^>]*>/g,' ').slice(0,300)}` }}\nComment characteristics:\n- Some neutral, some positive, some negative, some questioning\n- Conversational tone, not formal\n- Occasionally include the brand name in the comment\n- Preferably short\n"
            }
          ]
        }
      },
      "typeVersion": 3.4
    },
    {
      "id": "849160e7-9df1-4337-a111-65fc9bd8d5e5",
      "name": "Generate Product Comment (AI)",
      "type": "@n8n/n8n-nodes-langchain.openAi",
      "position": [
        752,
        -624
      ],
      "parameters": {
        "modelId": {
          "__rl": true,
          "mode": "list",
          "value": "gpt-4o-mini",
          "cachedResultName": "GPT-4O-MINI"
        },
        "options": {},
        "messages": {
          "values": [
            {
              "content": "={{$json.prompt}}\n"
            }
          ]
        }
      },
      "credentials": {
        "openAiApi": {
          "name": "<your credential>"
        }
      },
      "retryOnFail": true,
      "typeVersion": 1.8,
      "waitBetweenTries": 2000
    },
    {
      "id": "fb93ada6-17e2-46c8-8ca3-b24efcd67c97",
      "name": "Extract AI Output",
      "type": "n8n-nodes-base.set",
      "position": [
        1104,
        -624
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "18fe84dc-59b3-440b-830d-da161cd5e3da",
              "name": "review",
              "type": "string",
              "value": "={{$json.message?.content || $json.choices?.[0]?.message?.content || $json.content}}"
            }
          ]
        }
      },
      "typeVersion": 3.4
    },
    {
      "id": "3402a419-227b-446d-96dd-7e7bbc6eedd2",
      "name": "Post Review to Product",
      "type": "n8n-nodes-base.httpRequest",
      "maxTries": 5,
      "position": [
        1360,
        -624
      ],
      "parameters": {
        "url": "https://example.com/wp-json/wc/v3/products/reviews",
        "method": "POST",
        "options": {
          "timeout": 900000
        },
        "sendBody": true,
        "authentication": "genericCredentialType",
        "bodyParameters": {
          "parameters": [
            {
              "name": "product_id",
              "value": "={{ $('Fetch Products from WooCommerce').item.json.id }}"
            },
            {
              "name": "review",
              "value": "={{ $('Generate Product Comment (AI)').item.json.message.content }}"
            },
            {
              "name": "reviewer_email",
              "value": "={{ `guest+${$('Fetch Products from WooCommerce').item.json.id}-${Math.floor(Date.now()%100000)}@example.com`.toLowerCase() }}\n"
            },
            {
              "name": "reviewer",
              "value": "={{ (() => {\n  const first = ['John','Emily','Michael','Sophia','David','Olivia','Daniel','Ava','James','Isabella','Ethan','Mia','William','Charlotte','Benjamin','Amelia','Alexander','Harper','Lucas','Ella'];\n  const last  = ['Smith','Johnson','Williams','Brown','Jones','Garcia','Miller','Davis','Rodriguez','Martinez','Hernandez','Lopez','Gonzalez','Wilson','Anderson','Thomas','Taylor','Moore','Jackson','Martin'];\n  return `${first[Math.floor(Math.random()*first.length)]} ${last[Math.floor(Math.random()*last.length)]}`;\n})() }}\n"
            }
          ]
        },
        "genericAuthType": "httpBasicAuth"
      },
      "credentials": {
        "httpBasicAuth": {
          "name": "<your credential>"
        }
      },
      "retryOnFail": true,
      "typeVersion": 4.2,
      "waitBetweenTries": 5000
    }
  ],
  "connections": {
    "Extract AI Output": {
      "main": [
        [
          {
            "node": "Post Review to Product",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Build Product Comment Prompt": {
      "main": [
        [
          {
            "node": "Generate Product Comment (AI)",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Generate Product Comment (AI)": {
      "main": [
        [
          {
            "node": "Extract AI Output",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Fetch Products from WooCommerce": {
      "main": [
        [
          {
            "node": "Build Product Comment Prompt",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "When clicking \u2018Execute workflow\u2019": {
      "main": [
        [
          {
            "node": "Fetch Products from WooCommerce",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}

Credentials you'll need

Each integration node will prompt for credentials when you import. We strip credential IDs before publishing — you'll add your own.

Pro

For the full experience including quality scoring and batch install features for each workflow upgrade to Pro

About this workflow

This workflow automatically generates natural product comments using AI and posts them to your WooCommerce store. It helps boost engagement and makes product pages look more active and authentic.

Source: https://n8n.io/workflows/7579/ — original creator credit. Request a take-down →

More AI & RAG workflows → · Browse all categories →

Related workflows

Workflows that share integrations, category, or trigger type with this one. All free to copy and import.

AI & RAG

Ask questions like “How much did I spend on food last month?” and get instant answers from your financial data — directly in Telegram.

Telegram Trigger, OpenAI, Google Sheets +2
AI & RAG

The Problem That it Solves

Google Drive Trigger, OpenAI, Google Drive +5
AI & RAG

This intelligent email automation workflow helps you maximize engagement through domain-based outreach. It utilizes AI-powered personalization and strategic follow-ups to increase response rates. The

Gmail, HTTP Request, Google Sheets +1
AI & RAG

Note: Now includes an Apify alternative for Rapid API (Some users can't create new accounts on Rapid API, so I have added an alternative for you. But immediately you are able to get access to Rapid AP

Form Trigger, Google Sheets Trigger, OpenAI +2
AI & RAG

Scrape ads – Pulls Facebook Ad Library data for "ai automation" keywords using Apify Filter & sort – Filters ads by page likes (&gt;1,000) and separates into videos, images, and text ads Analyze creat

HTTP Request, Google Drive, OpenAI +3