Automatic LinkedIn engagement with AI comments using GPT-4o and Phantombuster
Ready for 3.0Ready for 3.0. This template uses no nodes that n8n 3.0 removes. No removed nodes, versions or helpers found. Static check, last run 2026-10-19.
Nodes used (11)
- Wait
n8n-nodes-base.wait - OpenAI Chat Model
@n8n/n8n-nodes-langchain.lmChatOpenAi - Phantombuster
n8n-nodes-base.phantombuster - Code
n8n-nodes-base.code - AI Agent
@n8n/n8n-nodes-langchain.agent - Microsoft SharePoint
n8n-nodes-base.microsoftSharePoint - Edit Fields (Set)
n8n-nodes-base.set - Schedule Trigger
n8n-nodes-base.scheduleTrigger - If
n8n-nodes-base.if - Extract from File
n8n-nodes-base.extractFromFile - Convert to File
n8n-nodes-base.convertToFile
What it does
Who’s it for 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. How it works / What it does 1. Schedule Trigger fires every hour. 2. Select Cookie picks a rotating LinkedIn session-cookie (time-slice logic). 3. Generate Random Search Term (GPT-4o) outputs a realistic AI/BPA keyword. 4. LinkedIn Search Agent (Phantombuster) scrapes recent posts. 5. Get Random Post chooses one post and passes its text to Create Comment (GPT-4o) which returns a ≤150-character reply in the chosen language. 6. Builds linkedinpoststocomment.csv, uploads to SharePoint, and launches the Auto-comment Agent to post the reply. 7. Post URL is logged to linkedinpostsalreadycommented.csv to avoid duplicates. 8. Wait nodes throttle launches to ~120 comments/day. How to set up 1. Add credentials: Phantombuster API, SharePoint OAuth2, OpenAI API key. 2. In SharePoint › “Phantombuster” folder create: • linkedinsessioncookies.txt – one cookie per line. • linkedinpostsalreadycommented.csv with header postUrl. 3. Edit Set ENV Variables to set default language, comment prompt, company ID, etc. 4. Adjust schedule or comments-per-launch as needed. 5. Activate the workflow; it will run hourly and comment on one new post each launch. Requirements - n8n 1.33 + - Phantombuster Growth plan (API access) - OpenAI account - Microsoft 365 SharePoint tenant How to customize - Change tone/length: edit the prompt in Create Comment. - Comment more often: raise numberOfLinesPerLaunch and schedule frequency. - Use Google Drive/Dropbox instead of SharePoint by swapping storage nodes.