{
  "name": "Blog writer & editor with Google Sheets memory (GPT-4)",
  "nodes": [
    {
      "id": "2f835c89-1303-49ce-8d37-332fd9ebe7c2",
      "name": "Structured Output Parser",
      "type": "@n8n/n8n-nodes-langchain.outputParserStructured",
      "position": [
        112,
        432
      ]
    },
    {
      "id": "79ddf772-9705-46c4-ab47-33edf4a8e8c1",
      "name": "OpenAI Chat Model2",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "position": [
        -432,
        464
      ]
    },
    {
      "id": "c245a37f-d6c9-47d8-a2a2-7e43fcfdfb01",
      "name": "Simple Memory",
      "type": "@n8n/n8n-nodes-langchain.memoryBufferWindow",
      "position": [
        -64,
        352
      ]
    },
    {
      "id": "c65be9d5-1baa-4d45-8fa5-a30346e5246c",
      "name": "When Executed by Another Workflow",
      "type": "n8n-nodes-base.executeWorkflowTrigger",
      "position": [
        656,
        384
      ]
    },
    {
      "id": "18ba841f-60a7-4d88-b6b9-c3f6a2f9412f",
      "name": "google",
      "type": "@n8n/n8n-nodes-langchain.toolWorkflow",
      "position": [
        480,
        400
      ]
    },
    {
      "id": "3d176927-6920-4611-a06b-b9af3ab83aea",
      "name": "Summarize1",
      "type": "n8n-nodes-base.summarize",
      "position": [
        1168,
        384
      ]
    },
    {
      "id": "5fa065dd-68a3-4a22-ba4b-b94620ee466b",
      "name": "Filter",
      "type": "n8n-nodes-base.filter",
      "position": [
        1008,
        384
      ]
    },
    {
      "id": "6e4ea5b3-9479-4390-a67b-b11a070bae3d",
      "name": "Sticky Note6",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1072,
        -432
      ],
      "parameters": {
        "width": 400,
        "height": 1072,
        "content": "\n## ⚙️ Setup Instructions\n\n### 1️⃣ Set Up OpenAI Connection\n1. Go to [OpenAI Platform](https://platform.openai.com/api-keys)  \n2. Navigate to [OpenAI Billing](https://platform.openai.com/settings/orga"
      }
    },
    {
      "id": "53f30495-bf04-4229-9018-35525cab1a75",
      "name": "Sticky Note55",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -640,
        -432
      ],
      "parameters": {
        "width": 2032,
        "height": 1072,
        "content": "# ✍️ AI Blog Writer & Editor with Google Sheets Memory (n8n + OpenAI)\n\nChat to **write** or **reword** a blog post. The workflow stores each result in Google Sheets and uses a sub-workflow “Google too"
      }
    },
    {
      "id": "629474f3-48d0-4943-af3b-74e3d93bd79a",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        400,
        272
      ],
      "parameters": {
        "width": 912,
        "height": 304,
        "content": "## Google Sub-workflow-tool\n Count number of times the blog was written and edited  **Dont forget to update this google sheet as well**\n"
      }
    },
    {
      "id": "1f4fa21c-a2e6-4b20-b314-3d97bcc721ce",
      "name": "Sticky Note7",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -528,
        272
      ],
      "parameters": {
        "width": 288,
        "height": 304,
        "content": "### 1️⃣ Set Up OpenAI Connection\n1. Go to [OpenAI Platform](https://platform.openai.com/api-keys)  \n2. Navigate to [OpenAI Billing](https://platform.openai.com/settings/organization/billing/overview) "
      }
    },
    {
      "id": "656b9532-873f-4260-ac02-c02607be1d6a",
      "name": "Blog Writer & Editor",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        -176,
        -16
      ]
    },
    {
      "id": "3e4cb64e-bcfb-4b16-89f6-a1a94b5a2189",
      "name": "Choose to Write or Edit Blog",
      "type": "n8n-nodes-base.code",
      "position": [
        -288,
        -224
      ]
    },
    {
      "id": "32649be1-4bff-44db-bcde-574d2a67e745",
      "name": "Sticky Note10",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        176,
        -288
      ],
      "parameters": {
        "width": 352,
        "height": 384,
        "content": "### 2️⃣ Prepare Your Google Sheet\n#### Connect your Data in Google Sheets\n- Use this format: **[Sample Sheet](https://docs.google.com/spreadsheets/d/1NwnABaQIReMmG2sRGrC-lv-5kpmsKJkUlRm-KmvPsCE/edit?g"
      }
    },
    {
      "id": "1b2a04f8-ca25-4a04-9a9f-a4265a7b35ac",
      "name": "Ask about blog topic",
      "type": "@n8n/n8n-nodes-langchain.chatTrigger",
      "position": [
        -560,
        -240
      ]
    },
    {
      "id": "fb399fde-0eba-456b-aca5-f1a991ef8983",
      "name": "n8n History",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        304,
        -32
      ]
    },
    {
      "id": "c476055f-91bb-4cf7-9ee2-6051f6e34df3",
      "name": "Check if Ran 4+ times",
      "type": "n8n-nodes-base.if",
      "position": [
        720,
        32
      ]
    },
    {
      "id": "e2e5a43c-3d13-49eb-9135-c5ae024cb503",
      "name": "Get History",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        832,
        384
      ]
    }
  ],
  "connections": {
    "Filter": {
      "main": [
        [
          {
            "node": "Summarize1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "google": {
      "ai_tool": [
        [
          {
            "node": "Blog Writer & Editor",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "Get History": {
      "main": [
        [
          {
            "node": "Filter",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "n8n History": {
      "main": [
        [
          {
            "node": "Check if Ran 4+ times",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Simple Memory": {
      "ai_memory": [
        [
          {
            "node": "Blog Writer & Editor",
            "type": "ai_memory",
            "index": 0
          }
        ]
      ]
    },
    "OpenAI Chat Model2": {
      "ai_languageModel": [
        [
          {
            "node": "Blog Writer & Editor",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Ask about blog topic": {
      "main": [
        [
          {
            "node": "Choose to Write or Edit Blog",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Blog Writer & Editor": {
      "main": [
        [
          {
            "node": "n8n History",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Check if Ran 4+ times": {
      "main": [
        [],
        [
          {
            "node": "Choose to Write or Edit Blog",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Structured Output Parser": {
      "ai_outputParser": [
        [
          {
            "node": "Blog Writer & Editor",
            "type": "ai_outputParser",
            "index": 0
          }
        ]
      ]
    },
    "Choose to Write or Edit Blog": {
      "main": [
        [
          {
            "node": "Blog Writer & Editor",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "When Executed by Another Workflow": {
      "main": [
        [
          {
            "node": "Get History",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}