FindPrompts
n8nContent & MarketingIntermediate5 steps

AI Blog Post Pipeline

Watches a Google Sheet for new keyword rows, generates a full long-form blog draft with GPT including title, meta description and headings, then writes the result back to the sheet and notifies you in Slack. A content engine you can feed with a spreadsheet.

Google SheetsOpenAISlack

How it works

  1. 1Trigger: new row added in the keywords Google Sheet
  2. 2Generate a full blog draft with GPT from the keyword
  3. 3Extract title, meta description and body
  4. 4Write the draft back into the same sheet row
  5. 5Notify the content team in Slack

Setup

  • Connect Google Sheets OAuth2 and OpenAI credentials.
  • Replace YOUR_SHEET_ID and the Keywords/Drafts tab names.
  • Keep a column called 'keyword' in the source sheet.
  • jsonOutput mode requires a GPT model that supports JSON responses.

Workflow JSON

{
  "name": "AI Blog Post Pipeline",
  "nodes": [
    {
      "id": "11aa22bb",
      "name": "New Keyword Row",
      "type": "n8n-nodes-base.googleSheetsTrigger",
      "typeVersion": 1,
      "position": [
        240,
        300
      ],
      "parameters": {
        "pollTimes": {
          "item": [
            {
              "mode": "everyMinute"
            }
          ]
        },
        "documentId": "YOUR_SHEET_ID",
        "sheetName": "Keywords",
        "event": "rowAdded"
      }
    },
    {
      "id": "22bb33cc",
      "name": "Write Blog Draft",
      "type": "@n8n/n8n-nodes-langchain.openAi",
      "typeVersion": 1.4,
      "position": [
        460,
        300
      ],
      "parameters": {
        "modelId": "gpt-4o",
        "messages": {
          "values": [
            {
              "role": "system",
              "content": "You are an SEO content writer. Return JSON with keys: title, metaDescription, body (markdown, 800+ words, H2/H3 headings)."
            },
            {
              "role": "user",
              "content": "Write a blog post targeting the keyword: {{ $json.keyword }}"
            }
          ]
        },
        "jsonOutput": true
      }
    },
    {
      "id": "33cc44dd",
      "name": "Parse Output",
      "type": "n8n-nodes-base.set",
      "typeVersion": 3.4,
      "position": [
        680,
        300
      ],
      "parameters": {
        "assignments": {
          "assignments": [
            {
              "id": "t",
              "name": "title",
              "type": "string",
              "value": "={{ $json.message.content.title }}"
            },
            {
              "id": "m",
              "name": "metaDescription",
              "type": "string",
              "value": "={{ $json.message.content.metaDescription }}"
            },
            {
              "id": "b",
              "name": "body",
              "type": "string",
              "value": "={{ $json.message.content.body }}"
            }
          ]
        }
      }
    },
    {
      "id": "44dd55ee",
      "name": "Save Draft to Sheet",
      "type": "n8n-nodes-base.googleSheets",
      "typeVersion": 4.4,
      "position": [
        900,
        300
      ],
      "parameters": {
        "operation": "appendOrUpdate",
        "documentId": "YOUR_SHEET_ID",
        "sheetName": "Drafts",
        "columns": {
          "mappingMode": "defineBelow",
          "value": {
            "title": "={{ $json.title }}",
            "metaDescription": "={{ $json.metaDescription }}",
            "body": "={{ $json.body }}"
          }
        }
      }
    },
    {
      "id": "55ee66ff",
      "name": "Notify Slack",
      "type": "n8n-nodes-base.slack",
      "typeVersion": 2.2,
      "position": [
        1120,
        300
      ],
      "parameters": {
        "resource": "message",
        "operation": "post",
        "channelId": "#content",
        "text": "New blog draft ready: {{ $json.title }}"
      }
    }
  ],
  "connections": {
    "New Keyword Row": {
      "main": [
        [
          {
            "node": "Write Blog Draft",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Write Blog Draft": {
      "main": [
        [
          {
            "node": "Parse Output",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Parse Output": {
      "main": [
        [
          {
            "node": "Save Draft to Sheet",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Save Draft to Sheet": {
      "main": [
        [
          {
            "node": "Notify Slack",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  },
  "active": false,
  "settings": {},
  "meta": {}
}

Command Palette

Search for a command to run...