AutomationFlowsAI & RAG › Automatic Linkedin Engagement with AI Comments Using Gpt-4o and Phantombuster

Automatic Linkedin Engagement with AI Comments Using Gpt-4o and Phantombuster

Byplemeo @plemeo on n8n.io

B2B marketers, recruiters, and personal-brand builders who want to spark conversations on LinkedIn by automatically posting short, relevant comments on fresh industry content—while staying under daily limits. Schedule Trigger fires every hour. Select Cookie picks a rotating…

Cron / scheduled trigger★★★★★ complexityAI-powered39 nodesOpenAI ChatPhantomBusterAgentMicrosoft SharePoint
AI & RAG Trigger: Cron / scheduled Nodes: 39 Complexity: ★★★★★ AI nodes: yes Added:

This workflow corresponds to n8n.io template #6764 — we link there as the canonical source.

This workflow follows the Agent → OpenAI Chat recipe pattern — see all workflows that pair these two integrations.

The workflow JSON

Copy or download the full n8n JSON below. Paste it into a new n8n workflow, add your credentials, activate. Full import guide →

Download .json
{
  "id": "rkxGxBa9TAlFHrSd",
  "meta": {
    "templateCredsSetupCompleted": true
  },
  "name": "LinkedIn Auto Commenting - Creators Hub",
  "tags": [],
  "nodes": [
    {
      "id": "ca0ddcb6-eac0-4dd6-ba06-7b2dafdebe0c",
      "name": "Wait",
      "type": "n8n-nodes-base.wait",
      "position": [
        -1152,
        -1200
      ],
      "parameters": {},
      "typeVersion": 1.1
    },
    {
      "id": "15a3b305-304c-443f-aee8-53bad10415e9",
      "name": "OpenAI Chat Model",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "position": [
        -1424,
        -656
      ],
      "parameters": {},
      "typeVersion": 1.2
    },
    {
      "id": "a17410db-8f35-4a32-9411-f94dd68267c3",
      "name": "Wait1",
      "type": "n8n-nodes-base.wait",
      "position": [
        -320,
        -800
      ],
      "parameters": {},
      "typeVersion": 1.1
    },
    {
      "id": "bfb60257-2e4b-42d5-80cd-2626cb3d114c",
      "name": "Launch Agent",
      "type": "n8n-nodes-base.phantombuster",
      "position": [
        -1360,
        -1200
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "a2789353-cb54-40d9-b02c-28ec853e2859",
      "name": "Get Random Post",
      "type": "n8n-nodes-base.code",
      "position": [
        -2688,
        -800
      ],
      "parameters": {},
      "typeVersion": 2
    },
    {
      "id": "85ccb579-aa24-4819-aa8b-68885e82306b",
      "name": "Create Comment",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        -1424,
        -800
      ],
      "parameters": {},
      "typeVersion": 2
    },
    {
      "id": "452b162d-1a7d-49e7-a76b-dc484dd9f94e",
      "name": "Create CSV Binary",
      "type": "n8n-nodes-base.code",
      "position": [
        -1104,
        -800
      ],
      "parameters": {},
      "typeVersion": 2
    },
    {
      "id": "002902d4-7228-4a45-8a7d-0ac89b7cd002",
      "name": "Upload CSV",
      "type": "n8n-nodes-base.microsoftSharePoint",
      "position": [
        -960,
        -800
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "cb09abc7-128f-46b9-9757-bf4634adc9aa",
      "name": "Get Autocomment Agent",
      "type": "n8n-nodes-base.phantombuster",
      "position": [
        -720,
        -800
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "e8b8b531-e2b9-4ae7-86f2-e7425899ec0c",
      "name": "Get Posts",
      "type": "n8n-nodes-base.phantombuster",
      "position": [
        -976,
        -1200
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "6a40123b-2583-420f-a5c7-be371d238c82",
      "name": "Launch AC Agent",
      "type": "n8n-nodes-base.phantombuster",
      "position": [
        -512,
        -800
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "02649ff0-8f07-4ac0-bfe2-dc0c5f97f78c",
      "name": "Get Response",
      "type": "n8n-nodes-base.phantombuster",
      "position": [
        -128,
        -800
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "3a931925-82d0-4d6e-a518-68a47737a0c0",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -2128,
        -1344
      ],
      "parameters": {
        "content": ""
      },
      "typeVersion": 1
    },
    {
      "id": "9bc3959d-9de7-48ad-ba9e-d767f4480284",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -2896,
        -928
      ],
      "parameters": {
        "content": ""
      },
      "typeVersion": 1
    },
    {
      "id": "f1e33aa2-258e-484b-bf51-3a6640ea45a9",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -816,
        -928
      ],
      "parameters": {
        "content": ""
      },
      "typeVersion": 1
    },
    {
      "id": "98ef2702-956a-4885-9ce1-9bc999328f04",
      "name": "Get Search Agent",
      "type": "n8n-nodes-base.phantombuster",
      "position": [
        -1552,
        -1200
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "67dafef7-8e3f-4534-b794-c67256491d40",
      "name": "Set ENV Variables",
      "type": "n8n-nodes-base.set",
      "position": [
        -1760,
        -1200
      ],
      "parameters": {},
      "typeVersion": 3.4
    },
    {
      "id": "e6c2b43e-1e74-42c2-82ac-e299d3398f08",
      "name": "Generate Random Search Term",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        -2112,
        -1200
      ],
      "parameters": {},
      "typeVersion": 2
    },
    {
      "id": "89eb5d65-6a89-4031-90ee-866330f479b9",
      "name": "Schedule Trigger",
      "type": "n8n-nodes-base.scheduleTrigger",
      "position": [
        -1984,
        -1600
      ],
      "parameters": {},
      "typeVersion": 1.2
    },
    {
      "id": "fc10ed9b-2f5b-4b0d-9795-e47e609c6f8a",
      "name": "OpenAI Chat Model1",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "position": [
        -2096,
        -1056
      ],
      "parameters": {},
      "typeVersion": 1.2
    },
    {
      "id": "216af711-09a5-4e01-aa3f-a43e31337a67",
      "name": "Update file",
      "type": "n8n-nodes-base.microsoftSharePoint",
      "position": [
        -1568,
        -800
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "6801929d-4ad1-4603-92de-6f773fe2c6cf",
      "name": "Download file",
      "type": "n8n-nodes-base.microsoftSharePoint",
      "position": [
        -2528,
        -800
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "27a4bc94-8859-48c5-94c5-c98a1bd817ce",
      "name": "Check if in List",
      "type": "n8n-nodes-base.code",
      "position": [
        -2208,
        -800
      ],
      "parameters": {},
      "typeVersion": 2
    },
    {
      "id": "34a9d026-17b9-4f8b-bdf1-22c10b0bd71c",
      "name": "If",
      "type": "n8n-nodes-base.if",
      "position": [
        -2064,
        -800
      ],
      "parameters": {},
      "typeVersion": 2.2
    },
    {
      "id": "111cacd8-845a-4886-be50-b59d0fd3cc5d",
      "name": "Wait2",
      "type": "n8n-nodes-base.wait",
      "position": [
        -2848,
        -800
      ],
      "parameters": {},
      "typeVersion": 1.1
    },
    {
      "id": "9988cda7-1734-4c89-a2a0-664a8cbd8119",
      "name": "Prepare Updated Data",
      "type": "n8n-nodes-base.code",
      "position": [
        -1888,
        -800
      ],
      "parameters": {},
      "typeVersion": 2
    },
    {
      "id": "65e3d941-304a-4aec-ba3d-416254a6159d",
      "name": "Extract from File",
      "type": "n8n-nodes-base.extractFromFile",
      "position": [
        -2368,
        -800
      ],
      "parameters": {},
      "typeVersion": 1,
      "alwaysOutputData": true
    },
    {
      "id": "eca4b1a3-d938-4e77-a7ac-237b831140e3",
      "name": "Convert to File",
      "type": "n8n-nodes-base.convertToFile",
      "position": [
        -1728,
        -800
      ],
      "parameters": {},
      "typeVersion": 1.1
    },
    {
      "id": "d1eddbdf-1fde-4f2d-b6b1-b77aa9fc07a9",
      "name": "Get Available Session Cookies",
      "type": "n8n-nodes-base.microsoftSharePoint",
      "position": [
        -1808,
        -1600
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "6e7b0891-dfb0-427a-b1cf-898ee211b00d",
      "name": "Extract Cookies",
      "type": "n8n-nodes-base.extractFromFile",
      "position": [
        -1600,
        -1600
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "64342664-102c-4861-990d-b08b4ad990ac",
      "name": "Select Cookie",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        -1376,
        -1600
      ],
      "parameters": {},
      "typeVersion": 2
    },
    {
      "id": "eda83bef-559d-4b03-8ab6-45b42e053242",
      "name": "OpenAI Chat Model2",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "position": [
        -1376,
        -1456
      ],
      "parameters": {},
      "typeVersion": 1.2
    },
    {
      "id": "f49fb8ab-8e40-4cfb-86b5-0228308c9d3f",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -2128,
        -1728
      ],
      "parameters": {
        "content": ""
      },
      "typeVersion": 1
    },
    {
      "id": "5fddace1-4fc4-449a-bc5b-b581ccc9fd6f",
      "name": "Sticky Note4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -816,
        -1728
      ],
      "parameters": {
        "content": ""
      },
      "typeVersion": 1
    },
    {
      "id": "f684ca9c-3656-4496-bdab-f2c240ceb5c1",
      "name": "Sticky Note5",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -2544,
        -1344
      ],
      "parameters": {
        "content": ""
      },
      "typeVersion": 1
    },
    {
      "id": "8bbe5f78-b384-453b-b9a6-b2c92c013908",
      "name": "Sticky Note6",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -2896,
        -544
      ],
      "parameters": {
        "content": ""
      },
      "typeVersion": 1
    },
    {
      "id": "2170e6f3-7006-40f3-8e8d-bbb29efa8f02",
      "name": "Sticky Note7",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -2064,
        -544
      ],
      "parameters": {
        "content": ""
      },
      "typeVersion": 1
    },
    {
      "id": "de072d11-7806-4b91-886a-0d12e3aa8cde",
      "name": "Sticky Note8",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1328,
        -544
      ],
      "parameters": {
        "content": ""
      },
      "typeVersion": 1
    },
    {
      "id": "cf384719-df40-43a8-8e26-ec74fc80bdb0",
      "name": "Sticky Note9",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        160,
        -928
      ],
      "parameters": {
        "content": ""
      },
      "typeVersion": 1
    }
  ],
  "active": false,
  "settings": {
    "executionOrder": "v1"
  },
  "versionId": "df5d712c-3422-4b8a-bb75-95d1b61e7461",
  "connections": {
    "If": {
      "main": [
        [
          {
            "node": "Wait2",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Prepare Updated Data",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Wait": {
      "main": [
        [
          {
            "node": "Get Posts",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Wait1": {
      "main": [
        [
          {
            "node": "Get Response",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Wait2": {
      "main": [
        [
          {
            "node": "Get Random Post",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get Posts": {
      "main": [
        [
          {
            "node": "Wait2",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Upload CSV": {
      "main": [
        [
          {
            "node": "Get Autocomment Agent",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Update file": {
      "main": [
        [
          {
            "node": "Create Comment",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Launch Agent": {
      "main": [
        [
          {
            "node": "Wait",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Download file": {
      "main": [
        [
          {
            "node": "Extract from File",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Select Cookie": {
      "main": [
        [
          {
            "node": "Generate Random Search Term",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Create Comment": {
      "main": [
        [
          {
            "node": "Create CSV Binary",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Convert to File": {
      "main": [
        [
          {
            "node": "Update file",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Extract Cookies": {
      "main": [
        [
          {
            "node": "Select Cookie",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get Random Post": {
      "main": [
        [
          {
            "node": "Download file",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Launch AC Agent": {
      "main": [
        [
          {
            "node": "Wait1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Check if in List": {
      "main": [
        [
          {
            "node": "If",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get Search Agent": {
      "main": [
        [
          {
            "node": "Launch Agent",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Schedule Trigger": {
      "main": [
        [
          {
            "node": "Get Available Session Cookies",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Create CSV Binary": {
      "main": [
        [
          {
            "node": "Upload CSV",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Extract from File": {
      "main": [
        [
          {
            "node": "Check if in List",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "OpenAI Chat Model": {
      "ai_languageModel": [
        [
          {
            "node": "Create Comment",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Set ENV Variables": {
      "main": [
        [
          {
            "node": "Get Search Agent",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "OpenAI Chat Model1": {
      "ai_languageModel": [
        [
          {
            "node": "Generate Random Search Term",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "OpenAI Chat Model2": {
      "ai_languageModel": [
        [
          {
            "node": "Select Cookie",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Prepare Updated Data": {
      "main": [
        [
          {
            "node": "Convert to File",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get Autocomment Agent": {
      "main": [
        [
          {
            "node": "Launch AC Agent",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Generate Random Search Term": {
      "main": [
        [
          {
            "node": "Set ENV Variables",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get Available Session Cookies": {
      "main": [
        [
          {
            "node": "Extract Cookies",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}
Pro

For the full experience including quality scoring and batch install features for each workflow upgrade to Pro

About this workflow

B2B marketers, recruiters, and personal-brand builders who want to spark conversations on LinkedIn by automatically posting short, relevant comments on fresh industry content—while staying under daily limits. Schedule Trigger fires every hour. Select Cookie picks a rotating…

Source: https://n8n.io/workflows/6764/ — original creator credit. Request a take-down →

More AI & RAG workflows → · Browse all categories →

Related workflows

Workflows that share integrations, category, or trigger type with this one. All free to copy and import.

AI & RAG

Influencers and social-media teams who want to comment automatically on posts from selected Instagram profiles—scaling engagement while staying within platform limits. Schedule Trigger runs every 2 h.

OpenAI Chat, Agent, Microsoft SharePoint +2
AI & RAG

Social-media teams and influencers who want to grow engagement by automatically posting short, relevant comments on new Instagram posts under rotating hashtags—while staying under platform limits. Sch

OpenAI Chat, PhantomBuster, Agent +1
AI & RAG

Social-media managers, growth hackers, and brands who want to keep their Instagram accounts active by auto-liking posts from specific profiles they track—without scrolling feeds manually. Schedule Tri

Microsoft SharePoint, PhantomBuster, OpenAI Chat +2
AI & RAG

Growth hackers, community builders, and marketers who want to keep their Twitter (X) accounts active by liking posts from selected profiles automatically. Schedule Trigger fires hourly. Profile Post E

Microsoft SharePoint, PhantomBuster, Agent +2
AI & RAG

Social-media managers and brands that want to keep their Instagram accounts active by automatically liking fresh posts under selected hashtags—hands-free and rate-limited. Schedule Trigger runs every

PhantomBuster, Microsoft SharePoint, Agent +1