{
  "name": "Schedule and optimize Twitter and LinkedIn posts from Google Sheets with OpenAI GPT-4o-mini",
  "nodes": [
    {
      "id": "40b15783-6b4b-4ba9-ae47-cf1ad563e85a",
      "name": "Main Overview",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -880,
        880
      ],
      "parameters": {
        "width": 380,
        "height": 474,
        "content": "## How it works\nThis workflow automates your social media presence. It monitors a Google Sheet for scheduled posts, uses AI to optimize captions and hashtags for specific platforms (Twitter and Linked"
      }
    },
    {
      "id": "7481371a-76bf-4f28-9660-f64fcb85b9d2",
      "name": "Section Sticky 1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -288,
        1216
      ],
      "parameters": {
        "width": 712,
        "height": 528,
        "content": "## 1. Data Retrieval\nTriggers the workflow hourly or via webhook and pulls the latest content queue from Google Sheets."
      }
    },
    {
      "id": "a3ad0557-0cd1-4e98-95c2-10be485522c4",
      "name": "Section Sticky 2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        464,
        1200
      ],
      "parameters": {
        "width": 800,
        "height": 528,
        "content": "## 2. AI Optimization\nFilters posts ready for publishing. The AI Agent then rewrites content to fit platform constraints (e.g., character limits) and generates hashtags."
      }
    },
    {
      "id": "0bd3a028-f758-4654-9f6a-c6c4e13caf0c",
      "name": "Section Sticky 3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1440,
        1088
      ],
      "parameters": {
        "width": 260,
        "height": 592,
        "content": "## 3. Social Publishing\nDistributes the optimized content to Twitter and LinkedIn simultaneously."
      }
    },
    {
      "id": "5ba26121-7b57-4ecd-b073-ed05f98eda96",
      "name": "Section Sticky 4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        2080,
        1088
      ],
      "parameters": {
        "width": 268,
        "height": 544,
        "content": "## 4. Reporting & Response\nAggregates results, logs post URLs back to the spreadsheet, and sends a summary report to your Slack channel."
      }
    },
    {
      "id": "e6fa39a6-3eb5-4896-b0e8-f178efdae2ed",
      "name": "Hourly Content Check",
      "type": "n8n-nodes-base.scheduleTrigger",
      "position": [
        -192,
        1392
      ]
    },
    {
      "id": "f601cb08-1506-4e66-be27-0c9ac5db491c",
      "name": "Manual Post Trigger",
      "type": "n8n-nodes-base.webhook",
      "position": [
        -192,
        1600
      ]
    },
    {
      "id": "448d52f3-7481-4fef-a4cc-109fbbf18457",
      "name": "Merge Triggers",
      "type": "n8n-nodes-base.merge",
      "position": [
        32,
        1488
      ]
    },
    {
      "id": "42458dfc-9d2e-4fb6-b0ad-47b9f8a69c96",
      "name": "Fetch Content Queue",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        256,
        1488
      ]
    },
    {
      "id": "f8b72bff-8883-4e4f-834c-56763a6fa9aa",
      "name": "Filter Ready Posts",
      "type": "n8n-nodes-base.code",
      "position": [
        480,
        1488
      ]
    },
    {
      "id": "fced1dc4-1620-413b-ab3f-4b3d3debdf3c",
      "name": "Has Content to Post?",
      "type": "n8n-nodes-base.if",
      "position": [
        704,
        1488
      ]
    },
    {
      "id": "69efadfa-627c-41f3-ba12-3c57df88b1a2",
      "name": "OpenAI Chat Model",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "position": [
        1008,
        1584
      ]
    },
    {
      "id": "38e02a47-f9b7-4b73-ac91-e3491affe50a",
      "name": "AI Content Optimizer",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        928,
        1360
      ]
    },
    {
      "id": "eb6268f6-9603-43f5-9c03-e5ccd0ae98e4",
      "name": "Parse AI Content",
      "type": "n8n-nodes-base.code",
      "position": [
        1280,
        1360
      ]
    },
    {
      "id": "4d39d9f2-9aef-4bb1-8f2b-bb2c20895f34",
      "name": "Post to Twitter",
      "type": "n8n-nodes-base.twitter",
      "position": [
        1504,
        1264
      ]
    },
    {
      "id": "4c609576-3906-4822-9c82-ed064fe5b6c6",
      "name": "Post to LinkedIn",
      "type": "n8n-nodes-base.linkedIn",
      "position": [
        1504,
        1488
      ]
    },
    {
      "id": "f0a19a81-e1db-40ee-92e4-0ecfee3d8474",
      "name": "Aggregate Post Results",
      "type": "n8n-nodes-base.aggregate",
      "position": [
        1728,
        1360
      ]
    },
    {
      "id": "3533a23e-9b66-4b93-bb00-990c00f15dec",
      "name": "Format Results",
      "type": "n8n-nodes-base.code",
      "position": [
        1952,
        1360
      ]
    },
    {
      "id": "b86abd85-723d-49bb-b82e-4500aeeed486",
      "name": "Update Content Status",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        2176,
        1264
      ]
    },
    {
      "id": "11bce6ef-c71e-4762-b573-853e8ecf138f",
      "name": "Post Summary to Slack",
      "type": "n8n-nodes-base.slack",
      "position": [
        2176,
        1456
      ]
    },
    {
      "id": "a43c1f57-6383-426c-92a3-07a3c7b61bad",
      "name": "No Content Response",
      "type": "n8n-nodes-base.set",
      "position": [
        2176,
        1680
      ]
    },
    {
      "id": "896c50a0-3c34-466a-a5d3-5655a732033d",
      "name": "Merge Final Paths",
      "type": "n8n-nodes-base.merge",
      "position": [
        2400,
        1456
      ]
    },
    {
      "id": "975e2adf-b180-4333-a226-6f6d451999a5",
      "name": "Respond to Webhook",
      "type": "n8n-nodes-base.respondToWebhook",
      "position": [
        2624,
        1456
      ]
    }
  ],
  "connections": {
    "Format Results": {
      "main": [
        [
          {
            "node": "Update Content Status",
            "type": "main",
            "index": 0
          },
          {
            "node": "Post Summary to Slack",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Merge Triggers": {
      "main": [
        [
          {
            "node": "Fetch Content Queue",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Post to Twitter": {
      "main": [
        [
          {
            "node": "Aggregate Post Results",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Parse AI Content": {
      "main": [
        [
          {
            "node": "Post to Twitter",
            "type": "main",
            "index": 0
          },
          {
            "node": "Post to LinkedIn",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Post to LinkedIn": {
      "main": [
        [
          {
            "node": "Aggregate Post Results",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Merge Final Paths": {
      "main": [
        [
          {
            "node": "Respond to Webhook",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "OpenAI Chat Model": {
      "ai_languageModel": [
        [
          {
            "node": "AI Content Optimizer",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Filter Ready Posts": {
      "main": [
        [
          {
            "node": "Has Content to Post?",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Fetch Content Queue": {
      "main": [
        [
          {
            "node": "Filter Ready Posts",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Manual Post Trigger": {
      "main": [
        [
          {
            "node": "Merge Triggers",
            "type": "main",
            "index": 1
          }
        ]
      ]
    },
    "No Content Response": {
      "main": [
        [
          {
            "node": "Merge Final Paths",
            "type": "main",
            "index": 1
          }
        ]
      ]
    },
    "AI Content Optimizer": {
      "main": [
        [
          {
            "node": "Parse AI Content",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Has Content to Post?": {
      "main": [
        [
          {
            "node": "AI Content Optimizer",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "No Content Response",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Hourly Content Check": {
      "main": [
        [
          {
            "node": "Merge Triggers",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Post Summary to Slack": {
      "main": [
        [
          {
            "node": "Merge Final Paths",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Update Content Status": {
      "main": [
        [
          {
            "node": "Merge Final Paths",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Aggregate Post Results": {
      "main": [
        [
          {
            "node": "Format Results",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}