{
  "name": "Create long-form documents from simple titles with GPT-5 and Google Docs",
  "nodes": [
    {
      "id": "60f4490d-4cb9-4cc6-bf22-cd106c3ffef2",
      "name": "Structured Output Parser",
      "type": "@n8n/n8n-nodes-langchain.outputParserStructured",
      "position": [
        496,
        48
      ]
    },
    {
      "id": "0aa103cc-e536-4041-a546-bf2ad16cd58d",
      "name": "Split Out",
      "type": "n8n-nodes-base.splitOut",
      "position": [
        928,
        -192
      ]
    },
    {
      "id": "84a0b969-dcf6-484a-ac18-5ca1663926d0",
      "name": "Loop Over Items",
      "type": "n8n-nodes-base.splitInBatches",
      "position": [
        1152,
        -192
      ]
    },
    {
      "id": "ad643365-42ef-4e62-9c3d-7da17915bb09",
      "name": "Simple Memory",
      "type": "@n8n/n8n-nodes-langchain.memoryBufferWindow",
      "position": [
        1520,
        -80
      ]
    },
    {
      "id": "69495066-646b-4cd5-8bb2-01abb95c67c7",
      "name": "GetSections",
      "type": "n8n-nodes-base.set",
      "position": [
        704,
        -192
      ]
    },
    {
      "id": "d45e18a1-274b-42f8-a516-cdd7fa472703",
      "name": "CreateDocument",
      "type": "n8n-nodes-base.googleDocs",
      "position": [
        128,
        -336
      ]
    },
    {
      "id": "3da122af-c430-4dc0-a237-2fd6008f5e0c",
      "name": "UpdateDocument",
      "type": "n8n-nodes-base.googleDocs",
      "position": [
        1728,
        -192
      ]
    },
    {
      "id": "988ad51b-7a09-4712-907e-d852a4d228ef",
      "name": "gpt-5-mini",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "position": [
        368,
        48
      ]
    },
    {
      "id": "033dd289-00c8-4753-b0b1-0f78cdfd9e63",
      "name": "gpt-5",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "position": [
        1392,
        -80
      ]
    },
    {
      "id": "17a2ab80-75e7-4f72-92cb-c4d06b2fbf3c",
      "name": "ContentWriter",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        1376,
        -304
      ]
    },
    {
      "id": "338f10a7-01f3-454e-bd82-4b59b2be54f3",
      "name": "ContentPlanner",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        352,
        -192
      ]
    },
    {
      "id": "67ecec8d-12d3-4923-bbde-ca710d2465d4",
      "name": "On form submission",
      "type": "n8n-nodes-base.formTrigger",
      "position": [
        -96,
        -336
      ]
    },
    {
      "id": "6e4ebbe6-c39d-4b9a-832a-69824b207f06",
      "name": "Form",
      "type": "n8n-nodes-base.form",
      "position": [
        416,
        -480
      ]
    },
    {
      "id": "f3db576d-70cb-46ce-a6ec-f291c486807e",
      "name": "Sticky Note4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -992,
        -592
      ],
      "parameters": {
        "width": 848,
        "height": 992,
        "content": "# 🧭 Overview\nThis workflow takes a title and automatically creates a detailed Google Document.\nIt first builds an outline, then writes each section based on the word limit, and finally saves everythin"
      }
    }
  ],
  "connections": {
    "gpt-5": {
      "ai_languageModel": [
        [
          {
            "node": "ContentWriter",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Split Out": {
      "main": [
        [
          {
            "node": "Loop Over Items",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "gpt-5-mini": {
      "ai_languageModel": [
        [
          {
            "node": "ContentPlanner",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "GetSections": {
      "main": [
        [
          {
            "node": "Split Out",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "ContentWriter": {
      "main": [
        [
          {
            "node": "UpdateDocument",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Simple Memory": {
      "ai_memory": [
        [
          {
            "node": "ContentWriter",
            "type": "ai_memory",
            "index": 0
          }
        ]
      ]
    },
    "ContentPlanner": {
      "main": [
        [
          {
            "node": "GetSections",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "CreateDocument": {
      "main": [
        [
          {
            "node": "Form",
            "type": "main",
            "index": 0
          },
          {
            "node": "ContentPlanner",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "UpdateDocument": {
      "main": [
        [
          {
            "node": "Loop Over Items",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Loop Over Items": {
      "main": [
        [],
        [
          {
            "node": "ContentWriter",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "On form submission": {
      "main": [
        [
          {
            "node": "CreateDocument",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Structured Output Parser": {
      "ai_outputParser": [
        [
          {
            "node": "ContentPlanner",
            "type": "ai_outputParser",
            "index": 0
          }
        ]
      ]
    }
  }
}