AutomationFlowsContent & Video › Automated Blog Post Generation

Automated Blog Post Generation

Automated Blog Post Generation. Uses googleSheetsTrigger, httpRequest, executeCommand, openAi. Event-driven trigger; 13 nodes.

Event trigger★★★★☆ complexityAI-powered13 nodesGoogle Sheets TriggerHTTP RequestExecute CommandOpenAIWordPress
Content & Video Trigger: Event Nodes: 13 Complexity: ★★★★☆ AI nodes: yes Added:

This workflow follows the Executecommand → HTTP Request 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
{
  "id": "SD0hIkl5bfdihz5C",
  "name": "Automated Blog Post Generation",
  "nodes": [
    {
      "parameters": {
        "pollTimes": {
          "item": [
            {
              "mode": "everyHour"
            }
          ]
        },
        "documentId": {
          "__rl": true,
          "value": "https://docs.google.com/spreadsheets/d/YOUR_SPREADSHEET_ID/edit#gid=0",
          "mode": "url"
        },
        "sheetName": {
          "__rl": true,
          "value": "gid=0",
          "mode": "list",
          "cachedResultName": "Sheet1",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/YOUR_SPREADSHEET_ID/edit#gid=0"
        },
        "event": "rowAdd"
      },
      "id": "298f036a-8c5a-400b-b066-3ec99ff4bd8c",
      "name": "Google Sheets Trigger",
      "type": "n8n-nodes-base.googleSheetsTrigger",
      "typeVersion": 1,
      "position": [
        0,
        0
      ],
      "credentials": {
        "googleSheetsTriggerOAuth2Api": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "method": "GET",
        "url": "={{'https://serpapi.com/search.json?engine=google&q=' + $node['Google Sheets Trigger'].json['Keyword'] + '&api_key=YOUR_SERPAPI_API_KEY'}}",
        "responseFormat": "json"
      },
      "id": "c98d1cae-a91d-4f81-abaf-9686ba0ac13f",
      "name": "SerpAPI Competitors",
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4,
      "position": [
        200,
        -100
      ]
    },
    {
      "parameters": {
        "functionCode": "const results = $node[\"SerpAPI Competitors\"].json[\"organic_results\"];\nlet summary = \"\";\nif (results && Array.isArray(results)) {\n  const topResults = results.slice(0, 3);\n  summary = topResults.map((res, idx) => {\n    const title = res.title || 'No title';\n    const snippet = res.snippet || (res.snippet_highlighted_words ? res.snippet_highlighted_words.join(' ') : '');\n    const link = res.link || res.url || '';\n    return `${idx+1}. ${title}${snippet ? ' - ' + snippet : ''}${link ? ' (' + link + ')' : ''}`;\n  }).join(\"\\n\");\n}\nreturn [{ \"competitor_summary\": summary }];"
      },
      "id": "d7e528d5-ea28-40c8-b809-69d6b424b861",
      "name": "Process Competitors",
      "type": "n8n-nodes-base.function",
      "typeVersion": 1,
      "position": [
        400,
        -100
      ]
    },
    {
      "parameters": {
        "command": "python3 brand_tone_analysis.py"
      },
      "id": "2a19c535-8720-453e-8b65-4c547577ba84",
      "name": "Brand Tone Analysis",
      "type": "n8n-nodes-base.executeCommand",
      "typeVersion": 1,
      "position": [
        200,
        100
      ]
    },
    {
      "parameters": {
        "mode": "mergeByIndex",
        "join": "inner"
      },
      "id": "39ab62c4-db69-4f51-a4ed-974939d7b0dd",
      "name": "Merge Insights",
      "type": "n8n-nodes-base.merge",
      "typeVersion": 1,
      "position": [
        600,
        0
      ]
    },
    {
      "parameters": {
        "prompt": "={{'Focus keyword: ' + $node['Google Sheets Trigger'].json['Keyword'] + \"\\n\" +($node['Google Sheets Trigger'].json['Prompt'] ? 'Additional context: ' + $node['Google Sheets Trigger'].json['Prompt'] + \"\\n\" : '') +($node['Brand Tone Analysis'].json['stdout'] ? 'Brand tone guidelines: ' + $node['Brand Tone Analysis'].json['stdout'] + \"\\n\" : '') +($node['Process Competitors'].json['competitor_summary'] ? 'Top search results:\\n' + $node['Process Competitors'].json['competitor_summary'] + \"\\n\\n\" : '') +'Using the above information, generate a detailed blog post outline and a full draft of a blog article about the focus keyword. ' +'The article should be well-structured, informative, and engaging. ' +'Follow SEO best practices (ensure the focus keyword is included naturally in headings and content) and adhere to the brand\\'s tone of voice. ' +'First provide a section-by-section outline, then write the complete draft content following the outline.'}}",
        "model": "gpt-4",
        "temperature": 0.7,
        "maxTokens": 3000
      },
      "id": "9f85da8a-61e0-4164-ab97-385430535fe4",
      "name": "Content Draft (GPT-4)",
      "type": "n8n-nodes-base.openAi",
      "typeVersion": 1,
      "position": [
        800,
        0
      ],
      "credentials": {
        "openAiApi": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "prompt": "={{'Please review and refine the following draft for structure, clarity, and depth while preserving the content. ' +'Make sure the text is well-organized, the language is clear and professional, and the information is thorough. ' +'Return the improved draft content only:\\n\\n' + $node['Content Draft (GPT-4)'].json['text']}}",
        "model": "gpt-4",
        "temperature": 0.5,
        "maxTokens": 2500
      },
      "id": "e1f93d2f-296a-4e5d-b352-5474c587d1e2",
      "name": "AI Review & Refinement",
      "type": "n8n-nodes-base.openAi",
      "typeVersion": 1,
      "position": [
        1000,
        0
      ],
      "credentials": {
        "openAiApi": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "prompt": "={{'Further improve the content below for reader engagement and readability. ' +'Make the tone friendly and accessible while maintaining professionalism. ' +'Ensure the text flows well and is easy to understand. Provide the revised content only:\\n\\n' + $node['AI Review & Refinement'].json['text']}}",
        "model": "gpt-4",
        "temperature": 0.7,
        "maxTokens": 2000
      },
      "id": "398faab1-3e32-4508-aac5-bf5a93252aab",
      "name": "Engagement & Readability",
      "type": "n8n-nodes-base.openAi",
      "typeVersion": 1,
      "position": [
        1200,
        0
      ],
      "credentials": {
        "openAiApi": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "method": "POST",
        "url": "https://api.yoast.com/analyze",
        "bodyParameters": {
          "parameters": [
            {
              "name": "text",
              "value": "={{$json[\"content\"]}}",
              "type": "string"
            },
            {
              "name": "focus_keyword",
              "value": "={{$node['Google Sheets Trigger'].json['Keyword']}}",
              "type": "string"
            }
          ]
        },
        "options": {
          "bodyContentType": "form-urlencoded"
        }
      },
      "id": "8553382b-10bb-4f3d-aa11-eb16cdc1ef1e",
      "name": "Yoast Analysis",
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4,
      "position": [
        1400,
        -100
      ]
    },
    {
      "parameters": {
        "method": "POST",
        "url": "https://internal-linking-api.example.com/suggest",
        "bodyParameters": {
          "parameters": [
            {
              "name": "content",
              "value": "={{$node['Engagement & Readability'].json['text']}}",
              "type": "string"
            },
            {
              "name": "limit",
              "value": 5,
              "type": "number"
            }
          ]
        },
        "options": {}
      },
      "id": "2b6f15c7-999a-4662-88f5-fe22f3211bdc",
      "name": "Internal Linking",
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4,
      "position": [
        1400,
        100
      ]
    },
    {
      "parameters": {
        "functionCode": "const content = $node[\"Engagement & Readability\"].json[\"text\"] || '';\nlet finalContent = content;\nconst linksData = $node[\"Internal Linking\"].json;\nlet links = [];\nif (linksData && Array.isArray(linksData.links)) {\n  links = linksData.links;\n} else if (Array.isArray(linksData)) {\n  links = linksData;\n} else {\n  // if the API returns directly an array or other structure, try to extract\n  if (linksData.links) { links = linksData.links; }\n  else if (linksData.recommendations) { links = linksData.recommendations; }\n}\nif (links.length > 0) {\n  finalContent += \"\\n\\nRelated articles:\\n\";\n  for (const link of links) {\n    if (typeof link === 'string') {\n      finalContent += `- ${link}\\n`;\n    } else if (link.url) {\n      const anchor = link.anchor || link.title || link.url;\n      finalContent += `- [${anchor}](${link.url})\\n`;\n    }\n  }\n}\nreturn [{ content: finalContent }];"
      },
      "id": "b4041cd7-6e24-4a0b-9618-0c9eb767b5a2",
      "name": "Internal Links Integrated",
      "type": "n8n-nodes-base.function",
      "typeVersion": 1,
      "position": [
        1600,
        100
      ]
    },
    {
      "parameters": {
        "method": "POST",
        "url": "https://api.plagiarismchecker.com/check",
        "bodyParameters": {
          "parameters": [
            {
              "name": "text",
              "value": "={{$json[\"content\"]}}",
              "type": "string"
            }
          ]
        },
        "options": {}
      },
      "id": "1188de56-bc33-4ffe-a532-11db0de4e4eb",
      "name": "Plagiarism Check",
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4,
      "position": [
        1800,
        -100
      ]
    },
    {
      "parameters": {
        "operation": "createPost",
        "postType": "post",
        "title": "={{$node['Google Sheets Trigger'].json['Keyword']}}",
        "content": "={{$node['Internal Links Integrated'].json['content']}}",
        "additionalFields": {
          "status": "draft"
        }
      },
      "id": "b3227d93-3eaf-44c1-a797-3c87e2d46b77",
      "name": "WordPress Draft",
      "type": "n8n-nodes-base.wordPress",
      "typeVersion": 1,
      "position": [
        1800,
        100
      ],
      "credentials": {
        "wordPressApi": {
          "name": "<your credential>"
        }
      }
    }
  ],
  "connections": {
    "Google Sheets Trigger": {
      "main": [
        [
          {
            "node": "SerpAPI Competitors",
            "type": "main",
            "index": 0
          },
          {
            "node": "Brand Tone Analysis",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "SerpAPI Competitors": {
      "main": [
        [
          {
            "node": "Process Competitors",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Process Competitors": {
      "main": [
        [
          {
            "node": "Merge Insights",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Brand Tone Analysis": {
      "main": [
        [
          {
            "node": "Merge Insights",
            "type": "main",
            "index": 1
          }
        ]
      ]
    },
    "Merge Insights": {
      "main": [
        [
          {
            "node": "Content Draft (GPT-4)",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Content Draft (GPT-4)": {
      "main": [
        [
          {
            "node": "AI Review & Refinement",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "AI Review & Refinement": {
      "main": [
        [
          {
            "node": "Engagement & Readability",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Engagement & Readability": {
      "main": [
        [
          {
            "node": "Internal Linking",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Internal Linking": {
      "main": [
        [
          {
            "node": "Internal Links Integrated",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Internal Links Integrated": {
      "main": [
        [
          {
            "node": "Yoast Analysis",
            "type": "main",
            "index": 0
          },
          {
            "node": "Plagiarism Check",
            "type": "main",
            "index": 0
          },
          {
            "node": "WordPress Draft",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  },
  "active": false,
  "createdAt": "2025-02-27T14:04:44.546Z",
  "updatedAt": "2025-02-27T14:04:44.546Z"
}

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

Automated Blog Post Generation. Uses googleSheetsTrigger, httpRequest, executeCommand, openAi. Event-driven trigger; 13 nodes.

Source: https://gist.github.com/Peccer/4f1373bb1ec11f71761ff585fd578615 — original creator credit. Request a take-down →

More Content & Video workflows → · Browse all categories →

Related workflows

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

Content & Video

The best content automation in the market! This advanced workflow not only creates and publishes SEO-optimized blog posts to your WordPress website but also backs up all content and images to a design

OpenAI, Output Parser Structured, Chain Llm +8
Content & Video

WP. Uses openAi, outputParserStructured, chainLlm, httpRequest. Event-driven trigger; 63 nodes.

OpenAI, Output Parser Structured, Chain Llm +8
Content & Video

100% autonomous workflow that transforms YouTube videos into unique, high-quality, SEO-optimized blog articles and automatically publishes them to WordPress. No human intervention required: it uses Yo

HTTP Request, Stop And Error, Google Sheets +8
Content & Video

This workflow automates the end-to-end process of creating, optimizing, and publishing content on WordPress.

Form Trigger, WordPress, HTTP Request +6
Content & Video

This template is ideal for creators, bloggers, and automation enthusiasts who want to auto-generate blog posts from AI-generated content — without lifting a finger. Whether you're running a tech blog,

HTTP Request, WordPress, Rss Feed Read Trigger +4