{
  "name": "Automate LinkedIn engagement with GPT-4o sentiment analysis & smart comments",
  "nodes": [
    {
      "id": "2d0c37d7-9ff9-40d8-8832-7e9f2a25c22d",
      "name": "Search LinkedIn Posts",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        -1760,
        768
      ]
    },
    {
      "id": "96b093e1-5fa4-47b1-895f-010c658c48cb",
      "name": "Extract Posts from Results",
      "type": "n8n-nodes-base.code",
      "position": [
        -1536,
        768
      ]
    },
    {
      "id": "95326395-fc44-47ea-9151-b97492b45fd0",
      "name": "Filter Recent Posts",
      "type": "n8n-nodes-base.code",
      "position": [
        -1312,
        768
      ]
    },
    {
      "id": "39709765-f45c-423a-88e7-ecb3529d69de",
      "name": "Count Post Characters",
      "type": "@n8n/n8n-nodes-langchain.chainLlm",
      "position": [
        -1088,
        768
      ]
    },
    {
      "id": "711399e1-52da-49bc-831c-12c15b1474f3",
      "name": "Filter Long Non-Reposts",
      "type": "n8n-nodes-base.if",
      "position": [
        -736,
        768
      ]
    },
    {
      "id": "afc48d7d-7f45-468c-b6ef-faa157606a29",
      "name": "Character Count LLM Model",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenRouter",
      "position": [
        -1088,
        992
      ]
    },
    {
      "id": "882170d3-3e8d-47c1-b43a-bad23e6b16b7",
      "name": "Parse Character Count",
      "type": "@n8n/n8n-nodes-langchain.outputParserStructured",
      "position": [
        -960,
        992
      ]
    },
    {
      "id": "0b736782-69c0-4c51-a91e-51f49783ad0e",
      "name": "Generate AI Comment",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        288,
        128
      ]
    },
    {
      "id": "d49f3040-d935-4458-80b8-6abc26514563",
      "name": "Analyze Post Sentiment",
      "type": "@n8n/n8n-nodes-langchain.sentimentAnalysis",
      "position": [
        -64,
        384
      ]
    },
    {
      "id": "3c7c8092-0e3f-4263-9860-f015aaeb8cb3",
      "name": "Add Reaction to Post",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        1088,
        144
      ]
    },
    {
      "id": "23b512ed-af04-476a-b7e0-23cd50e71aa4",
      "name": "Process Posts in Batches",
      "type": "n8n-nodes-base.splitInBatches",
      "position": [
        -288,
        768
      ]
    },
    {
      "id": "40e67382-64cf-499d-b455-7109d3a22be6",
      "name": "Log Post to Sheet",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        -512,
        768
      ]
    },
    {
      "id": "e381835c-93b4-49e0-860a-49aaba957b92",
      "name": "Update Sentiment Results",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        352,
        528
      ]
    },
    {
      "id": "2fb561cb-4ef8-4266-90a6-e0bef3d6c48e",
      "name": "Update Comment Results",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        1536,
        544
      ]
    },
    {
      "id": "84e8d4fa-c515-4a41-b649-4653977ce6ea",
      "name": "Post AI Comment",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        864,
        240
      ]
    },
    {
      "id": "189456c9-bcc3-4d9e-bae3-931ec6b58c41",
      "name": "Log Error Results",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        1312,
        384
      ]
    },
    {
      "id": "047f30a4-cbdf-4d4a-9b81-c45571364484",
      "name": "Wait Before Next Action",
      "type": "n8n-nodes-base.wait",
      "position": [
        1312,
        144
      ]
    },
    {
      "id": "c3abad94-6389-4187-abae-7178d4755905",
      "name": "Wait Before Error Logging",
      "type": "n8n-nodes-base.wait",
      "position": [
        1088,
        384
      ]
    },
    {
      "id": "ea2746ee-4450-454c-9e5e-dfb12712f7ff",
      "name": "Sentiment Analysis LLM Model",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenRouter",
      "position": [
        16,
        768
      ]
    },
    {
      "id": "ba645178-08fb-4216-8dac-984127585c9e",
      "name": "Comment Generation LLM Model",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenRouter",
      "position": [
        368,
        352
      ]
    },
    {
      "id": "9c5389d1-25f1-49db-a137-9a1536091674",
      "name": "Send Completion Notification",
      "type": "n8n-nodes-base.telegram",
      "position": [
        0,
        0
      ]
    },
    {
      "id": "79e71bce-1d35-478d-afad-61c8fdbcd576",
      "name": "Get Post Details",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        640,
        240
      ]
    },
    {
      "id": "c6f59c47-cf16-4846-add7-ac62944f7afa",
      "name": "Manual Workflow Trigger",
      "type": "n8n-nodes-base.manualTrigger",
      "position": [
        -1984,
        768
      ]
    },
    {
      "id": "4b896861-622f-4261-8ebe-67ea3b2c90ed",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1888,
        288
      ],
      "parameters": {
        "width": null,
        "height": null,
        "content": ""
      }
    },
    {
      "id": "ee726a9c-dbda-4e8d-9ed1-d6bb93a9cc58",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1216,
        288
      ],
      "parameters": {
        "width": null,
        "height": null,
        "content": ""
      }
    },
    {
      "id": "3c50e4b7-d5ac-4abb-b542-29f3e268493a",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -544,
        176
      ],
      "parameters": {
        "width": null,
        "height": null,
        "content": ""
      }
    },
    {
      "id": "3fb952e2-efd5-481f-8d59-36d56459a890",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        240,
        -176
      ],
      "parameters": {
        "width": null,
        "height": null,
        "content": ""
      }
    },
    {
      "id": "e70d679a-1032-4c2c-bc0a-ddfa7d19a023",
      "name": "Sticky Note4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1200,
        -144
      ],
      "parameters": {
        "width": null,
        "height": null,
        "content": ""
      }
    },
    {
      "id": "9068e6c2-b37f-4443-98d9-4ad7110b89aa",
      "name": "Sticky Note5",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1744,
        -160
      ],
      "parameters": {
        "width": null,
        "height": null,
        "content": ""
      }
    }
  ],
  "connections": {
    "Post AI Comment": {
      "main": [
        [
          {
            "node": "Add Reaction to Post",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Wait Before Error Logging",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get Post Details": {
      "main": [
        [
          {
            "node": "Post AI Comment",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Log Error Results": {
      "main": [
        [
          {
            "node": "Process Posts in Batches",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Log Post to Sheet": {
      "main": [
        [
          {
            "node": "Process Posts in Batches",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Filter Recent Posts": {
      "main": [
        [
          {
            "node": "Count Post Characters",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Generate AI Comment": {
      "main": [
        [
          {
            "node": "Get Post Details",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Add Reaction to Post": {
      "main": [
        [
          {
            "node": "Wait Before Next Action",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Count Post Characters": {
      "main": [
        [
          {
            "node": "Filter Long Non-Reposts",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Parse Character Count": {
      "ai_outputParser": [
        [
          {
            "node": "Count Post Characters",
            "type": "ai_outputParser",
            "index": 0
          }
        ]
      ]
    },
    "Search LinkedIn Posts": {
      "main": [
        [
          {
            "node": "Extract Posts from Results",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Analyze Post Sentiment": {
      "main": [
        [
          {
            "node": "Generate AI Comment",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Update Sentiment Results",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Update Sentiment Results",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Update Sentiment Results",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Update Sentiment Results",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Update Sentiment Results",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Update Sentiment Results",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Update Comment Results": {
      "main": [
        [
          {
            "node": "Process Posts in Batches",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Filter Long Non-Reposts": {
      "main": [
        [
          {
            "node": "Log Post to Sheet",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Manual Workflow Trigger": {
      "main": [
        [
          {
            "node": "Search LinkedIn Posts",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Wait Before Next Action": {
      "main": [
        [
          {
            "node": "Update Comment Results",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Process Posts in Batches": {
      "main": [
        [
          {
            "node": "Send Completion Notification",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Analyze Post Sentiment",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Update Sentiment Results": {
      "main": [
        [
          {
            "node": "Process Posts in Batches",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Character Count LLM Model": {
      "ai_languageModel": [
        [
          {
            "node": "Count Post Characters",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Wait Before Error Logging": {
      "main": [
        [
          {
            "node": "Log Error Results",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Extract Posts from Results": {
      "main": [
        [
          {
            "node": "Filter Recent Posts",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Comment Generation LLM Model": {
      "ai_languageModel": [
        [
          {
            "node": "Generate AI Comment",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Sentiment Analysis LLM Model": {
      "ai_languageModel": [
        [
          {
            "node": "Analyze Post Sentiment",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    }
  }
}