AutomationFlowsGeneral › AI Blog Post Generator to WordPress

AI Blog Post Generator to WordPress

Original n8n title: AI Blog Post Generator

AI Blog Post Generator. Uses openAi, httpRequest. Webhook trigger; 6 nodes.

Webhook trigger★★★★☆ complexityAI-powered6 nodesOpenAIHTTP Request
General 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": "AI Blog Post Generator",
  "nodes": [
    {
      "parameters": {
        "httpMethod": "POST",
        "path": "generate-blog-post",
        "responseMode": "lastNode"
      },
      "id": "a1b2c3d4-1001-4000-8000-000000000001",
      "name": "Webhook",
      "type": "n8n-nodes-base.webhook",
      "typeVersion": 1.1,
      "position": [
        250,
        300
      ]
    },
    {
      "parameters": {
        "assignments": {
          "assignments": [
            {
              "id": "set1",
              "name": "topic",
              "value": "={{ $json.body.topic }}",
              "type": "string"
            },
            {
              "id": "set2",
              "name": "tone",
              "value": "={{ $json.body.tone || 'professional' }}",
              "type": "string"
            },
            {
              "id": "set3",
              "name": "wordCount",
              "value": "={{ $json.body.wordCount || 800 }}",
              "type": "number"
            }
          ]
        }
      },
      "id": "a1b2c3d4-1001-4000-8000-000000000002",
      "name": "Set Parameters",
      "type": "n8n-nodes-base.set",
      "typeVersion": 3.2,
      "position": [
        500,
        300
      ]
    },
    {
      "parameters": {
        "resource": "chat",
        "model": "gpt-4",
        "messages": {
          "values": [
            {
              "content": "You are an expert blog writer. Write a well-structured blog post about the following topic. Use markdown formatting with headers, bullet points, and a compelling introduction and conclusion.\n\nTopic: {{ $json.topic }}\nTone: {{ $json.tone }}\nTarget word count: {{ $json.wordCount }}\n\nReturn a JSON object with keys: title, slug, content, metaDescription, tags (array)."
            }
          ]
        },
        "options": {
          "temperature": 0.7,
          "maxTokens": 2000
        }
      },
      "id": "a1b2c3d4-1001-4000-8000-000000000003",
      "name": "OpenAI Generate Blog Post",
      "type": "@n8n/n8n-nodes-langchain.openAi",
      "typeVersion": 1.3,
      "position": [
        750,
        300
      ]
    },
    {
      "parameters": {
        "jsCode": "const response = JSON.parse($input.first().json.message.content);\nreturn [{\n  json: {\n    title: response.title,\n    slug: response.slug,\n    content: response.content,\n    metaDescription: response.metaDescription,\n    tags: response.tags,\n    status: 'draft',\n    generatedAt: new Date().toISOString()\n  }\n}];"
      },
      "id": "a1b2c3d4-1001-4000-8000-000000000004",
      "name": "Parse Response",
      "type": "n8n-nodes-base.code",
      "typeVersion": 2,
      "position": [
        1000,
        300
      ]
    },
    {
      "parameters": {
        "method": "POST",
        "url": "https://your-wordpress-site.com/wp-json/wp/v2/posts",
        "authentication": "genericCredentialType",
        "genericAuthType": "httpBasicAuth",
        "sendBody": true,
        "bodyParameters": {
          "parameters": [
            {
              "name": "title",
              "value": "={{ $json.title }}"
            },
            {
              "name": "content",
              "value": "={{ $json.content }}"
            },
            {
              "name": "slug",
              "value": "={{ $json.slug }}"
            },
            {
              "name": "status",
              "value": "draft"
            },
            {
              "name": "excerpt",
              "value": "={{ $json.metaDescription }}"
            }
          ]
        }
      },
      "id": "a1b2c3d4-1001-4000-8000-000000000005",
      "name": "WordPress Publish",
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.1,
      "position": [
        1250,
        300
      ]
    },
    {
      "parameters": {
        "respondWith": "json",
        "responseBody": "={{ JSON.stringify({ success: true, postId: $json.id, title: $json.title, status: 'draft' }) }}"
      },
      "id": "a1b2c3d4-1001-4000-8000-000000000006",
      "name": "Respond to Webhook",
      "type": "n8n-nodes-base.respondToWebhook",
      "typeVersion": 1,
      "position": [
        1500,
        300
      ]
    }
  ],
  "connections": {
    "Webhook": {
      "main": [
        [
          {
            "node": "Set Parameters",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Set Parameters": {
      "main": [
        [
          {
            "node": "OpenAI Generate Blog Post",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "OpenAI Generate Blog Post": {
      "main": [
        [
          {
            "node": "Parse Response",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Parse Response": {
      "main": [
        [
          {
            "node": "WordPress Publish",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "WordPress Publish": {
      "main": [
        [
          {
            "node": "Respond to Webhook",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  },
  "settings": {
    "executionOrder": "v1"
  }
}
Pro

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

About this workflow

AI Blog Post Generator. Uses openAi, httpRequest. Webhook trigger; 6 nodes.

Source: https://github.com/mlnjsh/n8n-workflows-mega/blob/main/workflows/ai-content/01-blog-post-generator.json — original creator credit. Request a take-down →

More General workflows → · Browse all categories →

Related workflows

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

General

Main: Submit Assignment. Uses readBinaryFile, httpRequest, openAi. Webhook trigger; 22 nodes.

Read Binary File, HTTP Request, OpenAI
General

Contact-Us. Uses emailSend, httpRequest, nocoDb, openAi. Webhook trigger; 7 nodes.

Email Send, HTTP Request, Noco Db +1
General

PDF Q&A System with Pinecone RAG. Uses openAi, httpRequest. Webhook trigger; 7 nodes.

OpenAI, HTTP Request
General

AI SEO Meta Tag Generator. Uses httpRequest, openAi. Webhook trigger; 6 nodes.

HTTP Request, OpenAI
General

RoboNuggets - Faceless POV AI Machine (R24). Uses scheduleTrigger, googleSheets, chainLlm, lmChatOpenAi. Scheduled trigger; 31 nodes.

Google Sheets, Chain Llm, OpenAI Chat +5