This workflow corresponds to n8n.io template #5445 — 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 →
{
"id": "pgpdUduSobC5XGsE",
"meta": {
"templateCredsSetupCompleted": false
},
"name": "OpenAi Blog Post Writer",
"tags": [],
"nodes": [
{
"id": "af8cadb7-3d81-4a81-a41a-9232ccfe8791",
"name": "Trigger on Schedule",
"type": "n8n-nodes-base.scheduleTrigger",
"notes": "Change day and time schedule for the triggering of this node. ",
"position": [
-40,
-120
],
"parameters": {
"rule": {
"interval": [
{
"field": "hours",
"hoursInterval": 6,
"triggerAtMinute": 17
}
]
}
},
"typeVersion": 1.2
},
{
"id": "2ffc32c1-8abf-4e77-aa19-5b53a65ec359",
"name": "Pull Woocommerce Product",
"type": "n8n-nodes-base.httpRequest",
"notes": "Uses Basic Auth credentials to connect to the WooCommerce REST API.\n\n\ud83d\udee0\ufe0f Required:\n- Valid WooCommerce API key with Read permissions\n- Domain updated to match the current store\n- Basic Auth credentials selected from n8n credentials manager\n\n\ud83d\udd01 Behavior:\n- Pulls 100 products (paginated if needed)\n- Used as source input for downstream automation (e.g., blog post or sync)",
"position": [
240,
-200
],
"parameters": {
"url": "https://yourwebsite.com/wp-json/wc/v3/products?per_page=100",
"options": {},
"authentication": "genericCredentialType",
"genericAuthType": "httpBasicAuth"
},
"credentials": {
"httpBasicAuth": {
"name": "<your credential>"
}
},
"notesInFlow": true,
"typeVersion": 4.2
},
{
"id": "626696fb-922e-4d7a-acbc-9d991f3d59c2",
"name": "Create Blog Post About Product Selected Via GPT-4.1-MINI",
"type": "@n8n/n8n-nodes-langchain.openAi",
"notes": "Change OpenAi credentials and adjust prompt and tone input. ",
"position": [
920,
-260
],
"parameters": {
"modelId": {
"__rl": true,
"mode": "list",
"value": "gpt-4.1-mini",
"cachedResultName": "GPT-4.1-MINI"
},
"options": {},
"messages": {
"values": [
{
"content": "=Write a fun, curiosity-driven blog post for the following product {{ $json.permalink }}. The post should appeal to people looking for quirky, unique, or thoughtful gifts\u2014like birthdays, holidays, viral TikTok items, minimalist gifts, or AI-themed stuff. Make it casual, catchy, and shareable. Avoid sounding corporate. Only write one. INclude the link to the product in the post. "
}
]
}
},
"credentials": {
"openAiApi": {
"name": "<your credential>"
}
},
"notesInFlow": true,
"typeVersion": 1.8
},
{
"id": "fd64d732-62f4-4c63-a53e-4ca352437bf2",
"name": "Publish to Wordpress",
"type": "n8n-nodes-base.httpRequest",
"notes": "Select basic auth credentials and adjust domain name as needed. ",
"position": [
1600,
-320
],
"parameters": {
"url": "https://yourwebsite.com/wp-json/wp/v2/posts",
"method": "POST",
"options": {},
"sendBody": true,
"authentication": "genericCredentialType",
"bodyParameters": {
"parameters": [
{
"name": "title",
"value": "={{$json[\"title\"]}}"
},
{
"name": "content",
"value": "={{ $json.content }}"
},
{
"name": "excerpt",
"value": "={{ $json.excerpt }}"
},
{
"name": "slug",
"value": "={{$json[\"slug\"]}}"
},
{
"name": "status",
"value": "publish"
},
{
"name": "categories[0]",
"value": "1"
}
]
},
"genericAuthType": "httpBasicAuth"
},
"credentials": {
"httpBasicAuth": {
"name": "<your credential>"
}
},
"notesInFlow": true,
"typeVersion": 4.2
},
{
"id": "204cfa52-1c8b-4bf0-b645-28913c6fbd18",
"name": "Return Only One",
"type": "n8n-nodes-base.code",
"position": [
700,
-220
],
"parameters": {
"jsCode": "// Pass through the first item only\nreturn items[0];\n"
},
"typeVersion": 2
},
{
"id": "d901393d-555d-4ba7-a5ea-6d2626bccca2",
"name": "Sticky Note",
"type": "n8n-nodes-base.stickyNote",
"position": [
180,
-300
],
"parameters": {
"content": "Pull 100 Woocommerce Products. Set shop's authentication credentials here. "
},
"typeVersion": 1
},
{
"id": "b23f799e-df15-4a67-a818-9d5619a61d38",
"name": "Sticky Note1",
"type": "n8n-nodes-base.stickyNote",
"position": [
900,
-340
],
"parameters": {
"width": 380,
"content": "Create blog post about selected product via OpenAi. Set OpenAi credentials here. "
},
"typeVersion": 1
},
{
"id": "9c18e11d-48a1-4b1a-b5ac-3872407678c4",
"name": "Sort Products Randomly",
"type": "n8n-nodes-base.sort",
"position": [
500,
-200
],
"parameters": {
"type": "random"
},
"typeVersion": 1
},
{
"id": "8cf8ef2f-6e3e-47e5-a7d2-d48e98bf2217",
"name": "Format Post For Publishing",
"type": "n8n-nodes-base.code",
"position": [
1320,
-300
],
"parameters": {
"jsCode": "const raw = $input.first().json.message.content || \"\";\n\nif (!raw) {\n throw new Error(\"No content found in 'content' field.\");\n}\n\n// Extract title and content\nlet title = \"\";\nlet content = \"\";\n\nif (raw.includes(\"\\n\\n\")) {\n const [maybeTitle, ...rest] = raw.split(\"\\n\\n\");\n if (maybeTitle.length < 120) {\n title = maybeTitle.trim();\n content = rest.join(\"\\n\\n\").trim();\n } else {\n content = raw.trim();\n }\n} else {\n content = raw.trim();\n}\n\nif (!title) {\n const firstLine = content.split(\"\\n\")[0];\n if (firstLine.length < 120) {\n title = firstLine.trim();\n content = content.replace(firstLine, \"\").trim();\n } else {\n title = \"Untitled Blog Post\";\n }\n}\n\n// Slugify\nconst slug = title\n .toLowerCase()\n .replace(/[^a-z0-9]+/g, \"-\")\n .replace(/(^-|-$)/g, \"\");\n\n// Excerpt: first ~30 words\nconst excerpt = content.split(/\\s+/).slice(0, 30).join(\" \") + \"...\";\n\nreturn [\n {\n json: {\n title,\n slug,\n excerpt,\n content,\n },\n },\n];\n"
},
"typeVersion": 2
},
{
"id": "4ff33de0-46c5-4609-85fa-d0c396dd185e",
"name": "Sticky Note2",
"type": "n8n-nodes-base.stickyNote",
"position": [
1460,
-360
],
"parameters": {
"width": 260,
"content": "Set your Wordpress authentication credentials here. "
},
"typeVersion": 1
}
],
"active": false,
"settings": {
"executionOrder": "v1"
},
"versionId": "8102db42-7cef-4061-9600-a5526abd94f2",
"connections": {
"Return Only One": {
"main": [
[
{
"node": "Create Blog Post About Product Selected Via GPT-4.1-MINI",
"type": "main",
"index": 0
}
]
]
},
"Trigger on Schedule": {
"main": [
[
{
"node": "Pull Woocommerce Product",
"type": "main",
"index": 0
}
]
]
},
"Sort Products Randomly": {
"main": [
[
{
"node": "Return Only One",
"type": "main",
"index": 0
}
]
]
},
"Pull Woocommerce Product": {
"main": [
[
{
"node": "Sort Products Randomly",
"type": "main",
"index": 0
}
]
]
},
"Format Post For Publishing": {
"main": [
[
{
"node": "Publish to Wordpress",
"type": "main",
"index": 0
}
]
]
},
"Create Blog Post About Product Selected Via GPT-4.1-MINI": {
"main": [
[
{
"node": "Format Post For Publishing",
"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.
httpBasicAuthopenAiApi
For the full experience including quality scoring and batch install features for each workflow upgrade to Pro
About this workflow
This workflow automatically creates and publishes engaging blog posts for products in your WooCommerce store using OpenAI. Every 6 hours (schedule adjustable), it randomly selects a product from your store, generates a fun, curiosity-driven post, formats it for WordPress, and…
Source: https://n8n.io/workflows/5445/ — original creator credit. Request a take-down →
Related workflows
Workflows that share integrations, category, or trigger type with this one. All free to copy and import.
AI Institutional Stock Valuation Engine with Risk Scoring & Scenario Targets
Overview This is a production-grade, fully automated stock analysis system built entirely in n8n. It combines institutional-level financial analysis, dual AI model consensus, and a self-improving back
This automation is a complete end-to-end system designed to find, qualify, and contact B2B leads — fully automated and powered by AI. Searches for target companies on LinkedIn via Ghost Genius API, us
This comprehensive n8n automation template orchestrates a complete end-to-end workflow for generating engaging short-form Point-of-View (POV) style videos using multiple AI services and automatically
A professional AI equity analysis automation built on n8n that transforms structured financial data and real-time news into disciplined, risk-adjusted price targets and actionable BUY/HOLD/SELL signal