AutomationFlowsAI & RAG › Content Factory Workflow

Content Factory Workflow

Content Factory Workflow. Uses openAi, supabase, httpRequest. Webhook trigger; 6 nodes.

Webhook trigger★★★★☆ complexityAI-powered6 nodesOpenAISupabaseHTTP Request
AI & RAG Trigger: Webhook Nodes: 6 Complexity: ★★★★☆ AI nodes: yes Added:

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
{
  "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.

Pro

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 →

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

Salão Inteligente. Uses openAi, httpRequest, supabase, googleCalendar. Webhook trigger; 12 nodes.

OpenAI, HTTP Request, Supabase +1
AI & RAG

This workflow captures new leads via webhook, enriches and scores them with Apollo and Google Gemini, logs everything in Google Sheets, and automates outreach, reply handling, follow-ups, meeting prep

HTTP Request, Google Gemini, Google Sheets +3
AI & RAG

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

OpenAI, HTTP Request, Airtable
AI & RAG

Propulsar — Content Engine v3. Uses openAi, httpRequest, googleSheets. Webhook trigger; 73 nodes.

OpenAI, HTTP Request, Google Sheets
AI & RAG

Eu Clara – Funil Kiwify Completo. Uses postgres, openAi, httpRequest, gmail. Webhook trigger; 70 nodes.

Postgres, OpenAI, HTTP Request +1