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 →
{
"name": "Content Factory Workflow",
"nodes": [
{
"parameters": {
"path": "content-generator",
"options": {}
},
"id": "content-webhook",
"name": "Content Generator Webhook",
"type": "n8n-nodes-base.webhook",
"typeVersion": 1,
"position": [
240,
300
]
},
{
"parameters": {
"resource": "completion",
"prompt": "={{ $json.prompt || 'Generate engaging content about: ' + $json.topic }}",
"model": "gpt-4",
"options": {
"maxTokens": 2000,
"temperature": 0.7
}
},
"id": "openai-content",
"name": "OpenAI Content Generation",
"type": "@n8n/n8n-nodes-langchain.openAi",
"typeVersion": 1,
"position": [
460,
300
],
"credentials": {
"openAiApi": {
"name": "<your credential>"
}
}
},
{
"parameters": {
"operation": "insert",
"table": "automation_content",
"columns": "type, title, content, status, metadata, created_at",
"values": "={{ $json.contentType || 'generated' }}, {{ $json.title || 'AI Generated Content' }}, {{ $('OpenAI Content Generation').item.json.choices[0].message.content }}, published, {{ JSON.stringify($json) }}, {{ new Date().toISOString() }}"
},
"id": "save-content",
"name": "Save to Database",
"type": "n8n-nodes-base.supabase",
"typeVersion": 1,
"position": [
680,
300
],
"credentials": {
"supabaseApi": {
"name": "<your credential>"
}
}
},
{
"parameters": {
"conditions": {
"options": {
"caseSensitive": true,
"leftValue": "",
"typeValidation": "strict"
},
"conditions": [
{
"id": "auto-publish",
"leftValue": "={{ $json.autoPublish }}",
"rightValue": true,
"operator": {
"type": "boolean",
"operation": "true"
}
}
],
"combinator": "and"
},
"options": {}
},
"id": "check-auto-publish",
"name": "Check Auto Publish",
"type": "n8n-nodes-base.if",
"typeVersion": 2,
"position": [
900,
300
]
},
{
"parameters": {
"url": "http://localhost:5678/webhook/social-media",
"sendQuery": false,
"sendHeaders": false,
"sendBody": true,
"contentType": "json",
"body": "={ \"action\": \"publish\", \"content\": {{ $('OpenAI Content Generation').item.json.choices[0].message.content }}, \"platforms\": {{ $json.platforms || [\"twitter\", \"linkedin\"] }} }"
},
"id": "trigger-social",
"name": "Trigger Social Media",
"type": "n8n-nodes-base.httpRequest",
"typeVersion": 4.2,
"position": [
1120,
300
]
},
{
"parameters": {
"respondWith": "json",
"responseBody": "={ \"status\": \"success\", \"contentId\": {{ $('Save to Database').item.json.id }}, \"content\": {{ $('OpenAI Content Generation').item.json.choices[0].message.content }}, \"autoPublished\": {{ $json.autoPublish || false }} }"
},
"id": "content-response",
"name": "Content Response",
"type": "n8n-nodes-base.respondToWebhook",
"typeVersion": 1,
"position": [
1340,
300
]
}
],
"connections": {
"Content Generator Webhook": {
"main": [
[
{
"node": "OpenAI Content Generation",
"type": "main",
"index": 0
}
]
]
},
"OpenAI Content Generation": {
"main": [
[
{
"node": "Save to Database",
"type": "main",
"index": 0
}
]
]
},
"Save to Database": {
"main": [
[
{
"node": "Check Auto Publish",
"type": "main",
"index": 0
}
]
]
},
"Check Auto Publish": {
"main": [
[
{
"node": "Trigger Social Media",
"type": "main",
"index": 0
}
],
[
{
"node": "Content Response",
"type": "main",
"index": 0
}
]
]
},
"Trigger Social Media": {
"main": [
[
{
"node": "Content Response",
"type": "main",
"index": 0
}
]
]
}
},
"settings": {
"executionOrder": "v1"
},
"staticData": null,
"tags": [
"automation",
"content",
"ai"
],
"triggerCount": 1,
"updatedAt": "2024-01-15T00:00:00.000Z",
"versionId": "1"
}
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.
openAiApisupabaseApi
For the full experience including quality scoring and batch install features for each workflow upgrade to Pro
About this workflow
Content Factory Workflow. Uses openAi, supabase, httpRequest. Webhook trigger; 6 nodes.
Source: https://github.com/longsangautomation-max/longsang/blob/9114604c1eab55c552312bb3e09de9914988af6e/workflows/content-factory.json — 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.
This powerful n8n automation workflow is designed to execute advanced B2B lead enrichment and hyper-personalization for cold email outreach. By orchestrating a complex chain of data scraping, AI analy
Eu Clara – Funil Kiwify Completo. Uses postgres, openAi, httpRequest, gmail. Webhook trigger; 70 nodes.
This workflow bridges the gap between raw product data and revenue sales tools. It automates the entire Product Qualified Lead (PQL) lifecycle—from real-time intent routing to churn prevention—reducin
Lua Nova - Sistema Completo. Uses postgres, httpRequest, openAi. Webhook trigger; 55 nodes.
User Signup & Verification: The workflow starts when a user signs up. It generates a verification code and sends it via SMS using Twilio. Code Validation: The user replies with the code. The workflow