AutomationFlowsAI & RAG › Generate Blogs with Gpt-4o Prompt Chaining: Outline, Evaluate & Publish to…

Generate Blogs with Gpt-4o Prompt Chaining: Outline, Evaluate & Publish to…

Original n8n title: Generate Blogs with Gpt-4o Prompt Chaining: Outline, Evaluate & Publish to Sheets

ByRahul Joshi @rahul08 on n8n.io

Description

Cron / scheduled trigger★★★★☆ complexityAI-powered11 nodesAgentLm Chat Azure Open AiGoogle Sheets
AI & RAG Trigger: Cron / scheduled Nodes: 11 Complexity: ★★★★☆ AI nodes: yes Added:

This workflow corresponds to n8n.io template #5504 — we link there as the canonical source.

This workflow follows the Agent → Google Sheets 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": "HYmhoBTyrdnZ8bAL",
  "meta": {
    "templateCredsSetupCompleted": true
  },
  "name": "AI Powered Blog Writing",
  "tags": [],
  "nodes": [
    {
      "id": "65f804e0-15e8-4e4d-8d9d-86b3822d3614",
      "name": "Outline Writer",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        536,
        380
      ],
      "parameters": {
        "text": "=Here is the topic to write a blog about: {{ $json.output }}",
        "options": {
          "systemMessage": "# Overview\nYou are an expert outline writer. Your job is to generate a structured outline for a blog post with section titles and key points."
        },
        "promptType": "define"
      },
      "typeVersion": 1.7
    },
    {
      "id": "559d723e-954a-457d-bb8e-062dc8915807",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        0,
        0
      ],
      "parameters": {
        "color": 5,
        "width": 940,
        "height": 260,
        "content": "# Prompt Chaining\n \u2705 Improved Accuracy and Quality \u2013 Each step focuses on a specific task, reducing errors and hallucinations.\n\n \u2705 Greater Control Over Each Step \u2013 You can refine or tweak individual steps without affecting the entire process.\n\n \u2705 Specialization Leads to More Effective AI Agents \u2013 Each AI agent becomes a specialist rather than a generalist, improving reliability.\n\n \u2705 Easier Debugging and Optimization \u2013 If an output isn\u2019t ideal, you only need to fix the weak link rather than redoing everything.\n\n \u2705 More Scalable and Reusable Workflows \u2013 A structured, step-by-step workflow can be repurposed for different use cases.\n"
      },
      "typeVersion": 1
    },
    {
      "id": "18e552bf-ebae-4aa0-9244-a6753ee4ec92",
      "name": "Outline Evaluation",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        912,
        380
      ],
      "parameters": {
        "text": "=Here is the outline: \n\n{{ $json.output }}",
        "options": {
          "systemMessage": "=# Overview\nYou are an expert blog evaluator. Revise this outline and ensure it covers the following key criteria: \n(1) Engaging Introduction \n(2) Clear Section Breakdown\n(3) Logical Flow\n(4) Conclusion with Key Takeaways\n\n## Output\nOnly output the revised outline."
        },
        "promptType": "define"
      },
      "typeVersion": 1.7
    },
    {
      "id": "bf5bc10e-574f-4650-9422-21647d405821",
      "name": "Blog Writer",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        1288,
        380
      ],
      "parameters": {
        "text": "=Here if the revised outline: {{ $json.output }}",
        "options": {
          "systemMessage": "=# Overview\nYou are an expert blog writer. Generate a detailed blog post using the outline with well-structured paragraphs and engaging content."
        },
        "promptType": "define"
      },
      "typeVersion": 1.7
    },
    {
      "id": "22ed99f2-2d63-40e4-9aa8-427994ecab86",
      "name": "Azure OpenAI Chat Model",
      "type": "@n8n/n8n-nodes-langchain.lmChatAzureOpenAi",
      "position": [
        624,
        600
      ],
      "parameters": {
        "model": "gpt-4o",
        "options": {}
      },
      "credentials": {
        "azureOpenAiApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "b604cdd2-c6db-48db-a946-b756e910e361",
      "name": "Azure OpenAI Chat Model1",
      "type": "@n8n/n8n-nodes-langchain.lmChatAzureOpenAi",
      "position": [
        1000,
        600
      ],
      "parameters": {
        "model": "gpt-4o",
        "options": {}
      },
      "credentials": {
        "azureOpenAiApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "67dcf633-5cc0-468a-95d9-6b85282a5419",
      "name": "Azure OpenAI Chat Model2",
      "type": "@n8n/n8n-nodes-langchain.lmChatAzureOpenAi",
      "position": [
        1376,
        600
      ],
      "parameters": {
        "model": "gpt-4o",
        "options": {}
      },
      "credentials": {
        "azureOpenAiApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "dbd44165-f8e6-41f7-b0e9-1f770596d20c",
      "name": "Schedule Trigger",
      "type": "n8n-nodes-base.scheduleTrigger",
      "position": [
        -60,
        380
      ],
      "parameters": {
        "rule": {
          "interval": [
            {
              "field": "hours",
              "hoursInterval": 5
            }
          ]
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "5b9f95c9-74a4-42b0-a1fc-335d36754cc8",
      "name": "AI Agent",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        160,
        380
      ],
      "parameters": {
        "text": "You are an AI agent specializing in generating blog topic ideas specifically for the Sparrow API testing platform. Your role is to analyze the latest trends, user needs, and industry developments related to API testing and the Sparrow platform. When provided with information about the target audience or content objectives, you will suggest a range of blog topics tailored to Sparrow\u2019s features, use cases, best practices, and integration tips. For each topic, include a clear title, a brief description outlining the blog\u2019s focus, and a note on how it benefits Sparrow users or those interested in API testing. Your recommendations should be relevant, actionable, and designed to help users maximize their experience with the Sparrow API testing platform.",
        "options": {},
        "promptType": "define"
      },
      "typeVersion": 2
    },
    {
      "id": "3ae23f34-844e-4e6f-a56e-faf8c4b1ed03",
      "name": "Azure OpenAI Chat Model3",
      "type": "@n8n/n8n-nodes-langchain.lmChatAzureOpenAi",
      "position": [
        248,
        600
      ],
      "parameters": {
        "model": "gpt-4o",
        "options": {}
      },
      "credentials": {
        "azureOpenAiApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "23d4155c-fb24-481f-a3d7-ffb03c928d41",
      "name": "Append row in sheet",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        1664,
        380
      ],
      "parameters": {
        "columns": {
          "value": {
            "Blog": "={{ $json.output }}",
            "Date": "={{ $now.format('dd/MM/yyyy') }}"
          },
          "schema": [
            {
              "id": "Date",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "Date",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Blog",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "Blog",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            }
          ],
          "mappingMode": "defineBelow",
          "matchingColumns": [],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        },
        "options": {},
        "operation": "append",
        "sheetName": {
          "__rl": true,
          "mode": "list",
          "value": "gid=0",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1BK_pkJ3kn2Xm-xOstWTQQMfHB-DZZwEf9jZ4SGRxhV8/edit#gid=0",
          "cachedResultName": "Sheet1"
        },
        "documentId": {
          "__rl": true,
          "mode": "list",
          "value": "1BK_pkJ3kn2Xm-xOstWTQQMfHB-DZZwEf9jZ4SGRxhV8",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1BK_pkJ3kn2Xm-xOstWTQQMfHB-DZZwEf9jZ4SGRxhV8/edit?usp=drivesdk",
          "cachedResultName": "Blogs"
        }
      },
      "credentials": {
        "googleSheetsOAuth2Api": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 4.6
    }
  ],
  "active": false,
  "settings": {
    "executionOrder": "v1"
  },
  "versionId": "e196efb3-acc6-4535-aa90-85c46ce2088a",
  "connections": {
    "AI Agent": {
      "main": [
        [
          {
            "node": "Outline Writer",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Blog Writer": {
      "main": [
        [
          {
            "node": "Append row in sheet",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Outline Writer": {
      "main": [
        [
          {
            "node": "Outline Evaluation",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Schedule Trigger": {
      "main": [
        [
          {
            "node": "AI Agent",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Outline Evaluation": {
      "main": [
        [
          {
            "node": "Blog Writer",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Azure OpenAI Chat Model": {
      "ai_languageModel": [
        [
          {
            "node": "Outline Writer",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Azure OpenAI Chat Model1": {
      "ai_languageModel": [
        [
          {
            "node": "Outline Evaluation",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Azure OpenAI Chat Model2": {
      "ai_languageModel": [
        [
          {
            "node": "Blog Writer",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Azure OpenAI Chat Model3": {
      "ai_languageModel": [
        [
          {
            "node": "AI Agent",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    }
  }
}

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

Description

Source: https://n8n.io/workflows/5504/ — 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

Automate post-purchase workflows by instantly fetching successful Stripe payments, matching them to corresponding automation templates in Google Sheets, and sending customers personalized access email

Lm Chat Azure Open Ai, Output Parser Structured, Google Sheets Tool +5
AI & RAG

Automatically analyze incoming lead replies from Google Sheets using Azure OpenAI GPT-4, classify their intent (Demo Request, Pricing, Objection, etc.), and create actionable follow-up tasks in ClickU

Google Sheets, ClickUp, HTTP Request +4
AI & RAG

YogiAI. Uses lmChatAzureOpenAi, googleSheets, outputParserAutofixing, outputParserStructured. Scheduled trigger; 31 nodes.

Lm Chat Azure Open Ai, Google Sheets, Output Parser Autofixing +5
AI & RAG

The YogiAI workflow automates sending daily yoga pose reminders and related information via Line Push Messages . This automation leverages data from a Google Sheets database containing yoga pose detai

Lm Chat Azure Open Ai, Google Sheets, Output Parser Autofixing +5
AI & RAG

Automate Jira backlog management with intelligent cleanup, prioritization, and AI-powered reporting. This workflow scans daily to identify stale issues, missing priorities, and overdue tasks — auto-up

Jira, Google Sheets, Slack +4