{
  "name": "Generate social content pillars, calendars and posts using Google Sheets and OpenAI",
  "nodes": [
    {
      "id": "04b04cd0-3c4e-41ba-9f4c-0e0f5547220a",
      "name": "Google Sheets Trigger",
      "type": "n8n-nodes-base.googleSheetsTrigger",
      "position": [
        928,
        416
      ]
    },
    {
      "id": "5b9976be-a203-4a5d-9fb9-f5cb4e3938a8",
      "name": "Get row(s) in sheet",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        1136,
        416
      ]
    },
    {
      "id": "e86df2d7-2b26-4987-93e1-be9e37f664ef",
      "name": "Append row in sheet",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        1968,
        416
      ]
    },
    {
      "id": "f97be825-9e96-48a1-88a1-d974eb7f6af4",
      "name": "Append row in sheet6",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        2896,
        416
      ]
    },
    {
      "id": "0e032038-22f4-4e44-a92f-7d7a7fa67de6",
      "name": "Switch By Format",
      "type": "n8n-nodes-base.switch",
      "position": [
        3104,
        416
      ]
    },
    {
      "id": "b6661718-aba7-4fd9-8259-43e2aa2dc390",
      "name": "Append row in sheet7",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        4112,
        448
      ]
    },
    {
      "id": "954ccf90-59c9-4cbe-a0b5-fc6204c78b22",
      "name": "Loop Over Items",
      "type": "n8n-nodes-base.splitInBatches",
      "position": [
        3344,
        432
      ]
    },
    {
      "id": "c98a8083-86f6-4557-852d-35f8592ff1fc",
      "name": "Wait",
      "type": "n8n-nodes-base.wait",
      "position": [
        4320,
        448
      ]
    },
    {
      "id": "47209c08-feea-468f-aab3-5e05b19a36ef",
      "name": "Message a model",
      "type": "@n8n/n8n-nodes-langchain.openAi",
      "position": [
        1360,
        416
      ]
    },
    {
      "id": "3b4e1674-7265-4203-8ffe-14580272a447",
      "name": "Message a model6",
      "type": "@n8n/n8n-nodes-langchain.openAi",
      "position": [
        3568,
        448
      ]
    },
    {
      "id": "13ef0690-d43f-46f9-a311-3162ac381d05",
      "name": "Code in JavaScript",
      "type": "n8n-nodes-base.code",
      "position": [
        1712,
        416
      ]
    },
    {
      "id": "6e90cf2e-3ed5-43e0-bccd-3385c7d65981",
      "name": "Code in JavaScript6",
      "type": "n8n-nodes-base.code",
      "position": [
        3920,
        448
      ]
    },
    {
      "id": "0380e171-b0f8-483e-b1b6-bdc6a92c2d32",
      "name": "Message a model7",
      "type": "@n8n/n8n-nodes-langchain.openAi",
      "position": [
        2272,
        416
      ]
    },
    {
      "id": "55b6f70f-6ecf-4427-ab90-1f508a9f80a9",
      "name": "Code in JavaScript7",
      "type": "n8n-nodes-base.code",
      "position": [
        2624,
        416
      ]
    },
    {
      "id": "f4ac988c-1854-40a9-998c-c832deddee6d",
      "name": "Sticky Note4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        48,
        96
      ],
      "parameters": {
        "width": 832,
        "height": 640,
        "content": "## Smart Content Calendar Orchestration Workflow\n\nThis workflow is an end-to-end content planning and execution system that automates how brands design, structure, and generate social media content at"
      }
    },
    {
      "id": "2d665b97-3481-472a-a30a-49e0d4708016",
      "name": "Sticky Note5",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        896,
        96
      ],
      "parameters": {
        "width": 1264,
        "height": 640,
        "content": "## Step 1: Input Capture & Trigger\nListens for new or updated rows in the planning Google Sheet and captures all brand, platform, scheduling, and promotion inputs that drive the entire workflow.\n"
      }
    },
    {
      "id": "20adcc4c-9804-4927-95ab-14cb350a2a6c",
      "name": "Sticky Note6",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        2176,
        96
      ],
      "parameters": {
        "width": 1104,
        "height": 640,
        "content": "## Step 2: Calendar Generation & Routing\nGenerates content pillars and a full posting calendar, then routes items by format (Video vs Non-Video) to ensure the correct content creation flow runs.\n"
      }
    },
    {
      "id": "95dc9cea-f769-4723-9294-49763d5ddcc0",
      "name": "Sticky Note7",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        3296,
        96
      ],
      "parameters": {
        "width": 1216,
        "height": 640,
        "content": "## Step 3: Post Creation & Final Storage\nProcesses each calendar item one by one to generate complete post content and stores publish-ready outputs in the final Google Sheet.\n"
      }
    }
  ],
  "connections": {
    "Wait": {
      "main": [
        [
          {
            "node": "Loop Over Items",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Loop Over Items": {
      "main": [
        [],
        [
          {
            "node": "Message a model6",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Message a model": {
      "main": [
        [
          {
            "node": "Code in JavaScript",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Message a model6": {
      "main": [
        [
          {
            "node": "Code in JavaScript6",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Message a model7": {
      "main": [
        [
          {
            "node": "Code in JavaScript7",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Switch By Format": {
      "main": [
        [],
        [
          {
            "node": "Loop Over Items",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Code in JavaScript": {
      "main": [
        [
          {
            "node": "Append row in sheet",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Append row in sheet": {
      "main": [
        [
          {
            "node": "Message a model7",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Code in JavaScript6": {
      "main": [
        [
          {
            "node": "Append row in sheet7",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Code in JavaScript7": {
      "main": [
        [
          {
            "node": "Append row in sheet6",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get row(s) in sheet": {
      "main": [
        [
          {
            "node": "Message a model",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Append row in sheet6": {
      "main": [
        [
          {
            "node": "Switch By Format",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Append row in sheet7": {
      "main": [
        [
          {
            "node": "Wait",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Google Sheets Trigger": {
      "main": [
        [
          {
            "node": "Get row(s) in sheet",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}