{
  "name": "Generate AI newsletter drafts from Google Sheets to Notion with GPT-5-mini",
  "nodes": [
    {
      "id": "6828ddf2-9504-4944-892a-adf294822ec6",
      "name": "AI Agent",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        -256,
        -1056
      ]
    },
    {
      "id": "d8f83230-6d9b-4c25-bf45-5e1914dd7b50",
      "name": "OpenAI Chat Model",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "position": [
        -192,
        -832
      ]
    },
    {
      "id": "089d9188-2ad9-4eed-a29d-4072b0c5c35b",
      "name": "Get row(s) in sheet",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        -704,
        -928
      ]
    },
    {
      "id": "a0ac31b3-3ca6-452f-8dbe-a97fa10bfea2",
      "name": "Update row in sheet",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        768,
        -928
      ]
    },
    {
      "id": "28dafa8b-a70a-4444-95f1-3abbf9ad0e92",
      "name": "UpdateNotionBlock",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        544,
        -1056
      ]
    },
    {
      "id": "eec35fc8-d211-44b2-8329-1d799f3de22e",
      "name": "Code",
      "type": "n8n-nodes-base.code",
      "position": [
        320,
        -1056
      ]
    },
    {
      "id": "5be862bd-44bf-4ffb-a196-cf44d5b7c274",
      "name": "Create Page",
      "type": "n8n-nodes-base.notion",
      "position": [
        96,
        -1056
      ]
    },
    {
      "id": "62e67b86-a0f0-4933-9bbc-f02c159975b2",
      "name": "When clicking ‘Execute workflow’",
      "type": "n8n-nodes-base.manualTrigger",
      "position": [
        -928,
        -928
      ]
    },
    {
      "id": "25b33ac0-44b4-493e-8b3b-4591d67bf100",
      "name": "Loop Over Items",
      "type": "n8n-nodes-base.splitInBatches",
      "position": [
        -480,
        -928
      ]
    }
  ],
  "connections": {
    "Code": {
      "main": [
        [
          {
            "node": "UpdateNotionBlock",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "AI Agent": {
      "main": [
        [
          {
            "node": "Create Page",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Create Page": {
      "main": [
        [
          {
            "node": "Code",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Loop Over Items": {
      "main": [
        [],
        [
          {
            "node": "AI Agent",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "OpenAI Chat Model": {
      "ai_languageModel": [
        [
          {
            "node": "AI Agent",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "UpdateNotionBlock": {
      "main": [
        [
          {
            "node": "Update row in sheet",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get row(s) in sheet": {
      "main": [
        [
          {
            "node": "Loop Over Items",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Update row in sheet": {
      "main": [
        [
          {
            "node": "Loop Over Items",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "When clicking ‘Execute workflow’": {
      "main": [
        [
          {
            "node": "Get row(s) in sheet",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}