{
  "name": "Publish LinkedIn posts from tech trends with Ollama AI quality checks",
  "nodes": [
    {
      "id": "28905460-bb4c-4447-ba62-deb4d546861c",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1440,
        864
      ],
      "parameters": {
        "width": 700,
        "height": 1060,
        "content": "## Automatically publish LinkedIn posts using trends and AI quality checks\n\nAutomate your LinkedIn content pipeline: scan trending tech topics daily, generate drafts with AI, then let an AI selector a"
      }
    },
    {
      "id": "453d29b4-33aa-47f0-bf85-7593e80f2ca9",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -256,
        720
      ],
      "parameters": {
        "width": 344,
        "height": 616,
        "content": "## Fetch trending topics\nHacker News, Reddit, and Product Hunt fetched in parallel."
      }
    },
    {
      "id": "06951d31-821b-4bac-ad83-6b172cd7c3a5",
      "name": "Sticky Note8",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        112,
        720
      ],
      "parameters": {
        "width": 300,
        "height": 600,
        "content": "## Normalize fetched data\nStandardize output format from each source."
      }
    },
    {
      "id": "9d91bd5e-9b7c-4f87-b6f8-2969b7bfe292",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        608,
        496
      ],
      "parameters": {
        "width": 1200,
        "height": 420,
        "content": "## Merge, deduplicate, and generate drafts\nWait for all sources, run 7-layer dedup, rank, then AI writes 3 drafts."
      }
    },
    {
      "id": "e98844f7-48e2-456e-a60a-fd0cb043b742",
      "name": "Sticky Note9",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        2096,
        576
      ],
      "parameters": {
        "width": 380,
        "height": 324,
        "content": "## Save drafts to Google Sheets\nAppend generated posts to the queue with status \"draft\"."
      }
    },
    {
      "id": "9abded7f-8f92-40c8-b43a-f85801b49218",
      "name": "Sticky Note10",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -464,
        2240
      ],
      "parameters": {
        "width": 692,
        "height": 344,
        "content": "## Read drafts and select best post\nLoad all drafts, filter unpublished, AI Selector picks the best one for today."
      }
    },
    {
      "id": "6310c9eb-b360-48fb-ba2e-40787cb06b3e",
      "name": "Sticky Note11",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        480,
        2080
      ],
      "parameters": {
        "width": 1004,
        "height": 636,
        "content": "## AI Quality Gate and review\nScore the selected post across 5 criteria, then route to approve, revise, or reject."
      }
    },
    {
      "id": "b07ad6a2-3f61-44ef-be78-718ad08854c7",
      "name": "Sticky Note12",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1856,
        2144
      ],
      "parameters": {
        "width": 1452,
        "height": 636,
        "content": "## Publish to LinkedIn and notify\nPublish approved or revised post, add hashtag comment, update sheet, send Telegram notification."
      }
    },
    {
      "id": "56d71465-5a9a-4ee5-b98c-675cccb9b783",
      "name": "Sticky Note6",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        2320,
        1920
      ],
      "parameters": {
        "width": 484,
        "height": 152,
        "content": "## ⚠️ Replace YOUR_LINKEDIN_PERSON_ID\nUpdate the Publish and Comment nodes with your LinkedIn Person URN."
      }
    },
    {
      "id": "96b5a172-1663-4e41-9f96-e71b41b5f3cd",
      "name": "⏰ Daily 6 AM — Research",
      "type": "n8n-nodes-base.scheduleTrigger",
      "position": [
        -448,
        992
      ]
    },
    {
      "id": "c9e2a585-79cd-4b96-a924-bac5a004e99e",
      "name": "🟠 Fetch Hacker News",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        -176,
        832
      ]
    },
    {
      "id": "d9abf24d-14a5-4956-8a8b-193ae12c5c8f",
      "name": "🔴 Fetch Reddit",
      "type": "n8n-nodes-base.code",
      "position": [
        -176,
        1008
      ]
    },
    {
      "id": "1122d916-99b6-4b30-a24d-63517f1f6d99",
      "name": "🟣 Fetch Product Hunt",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        -176,
        1184
      ]
    },
    {
      "id": "466b92a7-9003-4945-9244-08354bd22f66",
      "name": "🔧 Normalize HN",
      "type": "n8n-nodes-base.code",
      "position": [
        176,
        816
      ]
    },
    {
      "id": "3da3f175-2a43-4cc9-8c7c-405aca3fcef4",
      "name": "🔧 Normalize Reddit",
      "type": "n8n-nodes-base.code",
      "position": [
        176,
        1008
      ]
    },
    {
      "id": "c20ba66a-0cf5-4af0-86c5-f41d86527c09",
      "name": "🔧 Normalize PH",
      "type": "n8n-nodes-base.code",
      "position": [
        176,
        1200
      ]
    },
    {
      "id": "f4cb691e-9351-4965-8412-9932bf9d275c",
      "name": "⏳ Wait for ALL Sources",
      "type": "n8n-nodes-base.merge",
      "position": [
        432,
        960
      ]
    },
    {
      "id": "913e3121-6adb-43b3-8e62-3a6e7160d7d4",
      "name": "📦 Collect All Items",
      "type": "n8n-nodes-base.code",
      "position": [
        688,
        688
      ]
    },
    {
      "id": "a0e55c6e-91e8-4e6a-b874-e56fd0a4761e",
      "name": "🧹 Deduplicate + Rank",
      "type": "n8n-nodes-base.code",
      "position": [
        880,
        672
      ]
    },
    {
      "id": "f52fe204-cd16-4e46-a943-35c6e483ff57",
      "name": "📊 Has Items?",
      "type": "n8n-nodes-base.if",
      "position": [
        1104,
        672
      ]
    },
    {
      "id": "c638109c-0e58-427f-aefc-06d92c2b1ebb",
      "name": "🤖 AI LinkedIn Writer",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        1440,
        528
      ]
    },
    {
      "id": "80f18a69-b090-437e-9343-7d7486fe9a85",
      "name": "📝 Extract Posts",
      "type": "n8n-nodes-base.code",
      "position": [
        1936,
        720
      ]
    },
    {
      "id": "4137872b-da6d-43c9-a027-e2fec38881a5",
      "name": "📋 Save to Queue",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        2208,
        720
      ]
    },
    {
      "id": "9b689f0a-f4d5-4ccd-9c69-88735a88501b",
      "name": "💤 No Items",
      "type": "n8n-nodes-base.code",
      "position": [
        1472,
        832
      ]
    },
    {
      "id": "2168cdbf-bf4c-4fc9-abe7-c3f1486b042f",
      "name": "⏰ Tue-Thu 9:30 AM — Publish",
      "type": "n8n-nodes-base.scheduleTrigger",
      "position": [
        -608,
        2368
      ]
    },
    {
      "id": "86b157cb-dcc5-447f-bc4a-301d673d47e6",
      "name": "📋 Read ALL Drafts",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        -384,
        2368
      ]
    },
    {
      "id": "1fcae955-f777-407e-bc67-dcc4175b059b",
      "name": "📦 Collect All Drafts",
      "type": "n8n-nodes-base.code",
      "position": [
        -160,
        2368
      ]
    },
    {
      "id": "33472742-2b39-4a52-b0fd-835a09682c84",
      "name": "📄 Has Drafts?",
      "type": "n8n-nodes-base.if",
      "position": [
        64,
        2368
      ]
    },
    {
      "id": "4869d6b6-cdc5-4915-9c53-6c9cba6898f0",
      "name": "🧠 AI Post Selector",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        544,
        2176
      ]
    },
    {
      "id": "e9e97a87-8755-4bfb-819f-22fb0302c9b2",
      "name": "🎯 Extract Selection",
      "type": "n8n-nodes-base.code",
      "position": [
        896,
        2272
      ]
    },
    {
      "id": "c43512d3-fcc5-4cca-9ba7-38a8609b5dd7",
      "name": "🛡️ AI Quality Gate",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        1120,
        2272
      ]
    },
    {
      "id": "3f282eb2-d920-4c0b-888c-3a30625450aa",
      "name": "🎯 Extract Review",
      "type": "n8n-nodes-base.code",
      "position": [
        1920,
        2272
      ]
    },
    {
      "id": "847a584d-db26-49f3-96c2-843182055170",
      "name": "🔀 Review Decision",
      "type": "n8n-nodes-base.switch",
      "position": [
        2080,
        2272
      ]
    },
    {
      "id": "7904330d-bbeb-46a8-9b47-df4daaacd0b7",
      "name": "📤 Publish to LinkedIn",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        2528,
        2256
      ]
    },
    {
      "id": "2b8ea7f7-8be2-4147-924b-ab200d877d5c",
      "name": "💬 Hashtags Comment",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        2752,
        2256
      ]
    },
    {
      "id": "e58d4a3e-13a9-4711-bbcf-6c59deba9aa6",
      "name": "✅ Mark Published",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        2976,
        2368
      ]
    },
    {
      "id": "84d1f3f2-5b8c-4508-81d4-9d8b4c1966ad",
      "name": "📲 Published ✅",
      "type": "n8n-nodes-base.telegram",
      "position": [
        2976,
        2176
      ]
    },
    {
      "id": "b82b0d8e-4f37-4287-9179-2dc988442031",
      "name": "💾 Save Revised",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        2304,
        2352
      ]
    },
    {
      "id": "51003564-ba71-482d-8d7a-b8001acf4e13",
      "name": "❌ Mark Rejected",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        2304,
        2544
      ]
    },
    {
      "id": "1cb07995-533d-4bcc-a0aa-03937a8e0317",
      "name": "📲 Rejected ❌",
      "type": "n8n-nodes-base.telegram",
      "position": [
        2528,
        2544
      ]
    },
    {
      "id": "4a5a2e9f-88b8-4866-abe5-df05c0aa7e2b",
      "name": "💤 No Drafts",
      "type": "n8n-nodes-base.code",
      "position": [
        608,
        2576
      ]
    },
    {
      "id": "b490df19-a139-49d3-babf-af1ea76ce356",
      "name": "Ollama Writer",
      "type": "@n8n/n8n-nodes-langchain.lmChatOllama",
      "position": [
        1376,
        672
      ]
    },
    {
      "id": "daee9f27-0977-4fc2-a54e-bf620e9a5baf",
      "name": "Ollama Selector",
      "type": "@n8n/n8n-nodes-langchain.lmChatOllama",
      "position": [
        544,
        2400
      ]
    },
    {
      "id": "855f88fb-9cd0-434f-b9b9-dd9dd66e21db",
      "name": "Ollama Reviewer",
      "type": "@n8n/n8n-nodes-langchain.lmChatOllama",
      "position": [
        1200,
        2496
      ]
    },
    {
      "id": "52662271-9a72-4ca1-a89d-e0c2fd39f027",
      "name": "Sticky Note7",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        448,
        1792
      ],
      "parameters": {
        "width": 404,
        "height": 216,
        "content": "##  **⚠️ Edit all 3 AI system prompts**\n**Update Writer, Selector, and Quality Gate with your name, expertise, and tone.**"
      }
    },
    {
      "id": "0fd1bd37-522d-46d0-b0fc-da7198b6f22c",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -288,
        512
      ],
      "parameters": {
        "width": 400,
        "height": 80,
        "content": "## **Flow 1 — Daily Research (6 AM):**"
      }
    },
    {
      "id": "843d3376-3979-4c95-b4a8-1dc0d737a235",
      "name": "Sticky Note4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -416,
        2096
      ],
      "parameters": {
        "width": 400,
        "height": 80,
        "content": "## **Flow 2 — Smart Publish (Tue–Thu 9:30 AM):**"
      }
    },
    {
      "id": "dcf66211-40c8-4075-bd32-4039780723b3",
      "name": "Sticky Note13",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1248,
        1792
      ],
      "parameters": {
        "width": 404,
        "height": 216,
        "content": "##  **⚠️ Edit all 3 AI system prompts**\n**Update Writer, Selector, and Quality Gate with your name, expertise, and tone.**"
      }
    },
    {
      "id": "94ed6818-7093-4d7d-9ded-ddb127cf3476",
      "name": "Sticky Note14",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1408,
        1040
      ],
      "parameters": {
        "width": 404,
        "height": 216,
        "content": "##  **⚠️ Edit all 3 AI system prompts**\n**Update Writer, Selector, and Quality Gate with your name, expertise, and tone.**"
      }
    }
  ],
  "connections": {
    "Ollama Writer": {
      "ai_languageModel": [
        [
          {
            "node": "🤖 AI LinkedIn Writer",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Ollama Reviewer": {
      "ai_languageModel": [
        [
          {
            "node": "🛡️ AI Quality Gate",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Ollama Selector": {
      "ai_languageModel": [
        [
          {
            "node": "🧠 AI Post Selector",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "📊 Has Items?": {
      "main": [
        [
          {
            "node": "🤖 AI LinkedIn Writer",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "💤 No Items",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "📄 Has Drafts?": {
      "main": [
        [
          {
            "node": "🧠 AI Post Selector",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "💤 No Drafts",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "❌ Mark Rejected": {
      "main": [
        [
          {
            "node": "📲 Rejected ❌",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "💾 Save Revised": {
      "main": [
        [
          {
            "node": "📤 Publish to LinkedIn",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "🔧 Normalize HN": {
      "main": [
        [
          {
            "node": "⏳ Wait for ALL Sources",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "🔧 Normalize PH": {
      "main": [
        [
          {
            "node": "⏳ Wait for ALL Sources",
            "type": "main",
            "index": 2
          }
        ]
      ]
    },
    "🔴 Fetch Reddit": {
      "main": [
        [
          {
            "node": "🔧 Normalize Reddit",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "📝 Extract Posts": {
      "main": [
        [
          {
            "node": "📋 Save to Queue",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "🎯 Extract Review": {
      "main": [
        [
          {
            "node": "🔀 Review Decision",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "📋 Read ALL Drafts": {
      "main": [
        [
          {
            "node": "📦 Collect All Drafts",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "🔀 Review Decision": {
      "main": [
        [
          {
            "node": "📤 Publish to LinkedIn",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "💾 Save Revised",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "❌ Mark Rejected",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "💬 Hashtags Comment": {
      "main": [
        [
          {
            "node": "✅ Mark Published",
            "type": "main",
            "index": 0
          },
          {
            "node": "📲 Published ✅",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "🔧 Normalize Reddit": {
      "main": [
        [
          {
            "node": "⏳ Wait for ALL Sources",
            "type": "main",
            "index": 1
          }
        ]
      ]
    },
    "🧠 AI Post Selector": {
      "main": [
        [
          {
            "node": "🎯 Extract Selection",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "🎯 Extract Selection": {
      "main": [
        [
          {
            "node": "🛡️ AI Quality Gate",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "📦 Collect All Items": {
      "main": [
        [
          {
            "node": "🧹 Deduplicate + Rank",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "🟠 Fetch Hacker News": {
      "main": [
        [
          {
            "node": "🔧 Normalize HN",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "📦 Collect All Drafts": {
      "main": [
        [
          {
            "node": "📄 Has Drafts?",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "🛡️ AI Quality Gate": {
      "main": [
        [
          {
            "node": "🎯 Extract Review",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "🟣 Fetch Product Hunt": {
      "main": [
        [
          {
            "node": "🔧 Normalize PH",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "🤖 AI LinkedIn Writer": {
      "main": [
        [
          {
            "node": "📝 Extract Posts",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "🧹 Deduplicate + Rank": {
      "main": [
        [
          {
            "node": "📊 Has Items?",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "⏳ Wait for ALL Sources": {
      "main": [
        [
          {
            "node": "📦 Collect All Items",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "📤 Publish to LinkedIn": {
      "main": [
        [
          {
            "node": "💬 Hashtags Comment",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "⏰ Daily 6 AM — Research": {
      "main": [
        [
          {
            "node": "🟠 Fetch Hacker News",
            "type": "main",
            "index": 0
          },
          {
            "node": "🔴 Fetch Reddit",
            "type": "main",
            "index": 0
          },
          {
            "node": "🟣 Fetch Product Hunt",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "⏰ Tue-Thu 9:30 AM — Publish": {
      "main": [
        [
          {
            "node": "📋 Read ALL Drafts",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}