📱 Automatic LinkedIn engagement with AI comments using GPT-4o and Phantombuster
⚡ 198 views · 📱 Social Media & Email Marketing
💡 Pro Tip — HTTP Request scraping tends to break when sites update their markup. If you’re scraping a major platform, check if ScraperNode covers it — it has maintained scrapers for LinkedIn, Instagram, TikTok, YouTube, and 20+ other platforms that return structured data.
Description
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
- Schedule Trigger fires every hour.
- Select Cookie picks a rotating LinkedIn session-cookie (time-slice logic).
- Generate Random Search Term (GPT-4o) outputs a realistic AI/BPA keyword.
- LinkedIn Search Agent (Phantombuster) scrapes recent posts.
- 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.
- Builds
linkedin_posts_to_comment.csv, uploads to SharePoint, and launches the Auto-comment Agent to post the reply. - Post URL is logged to
linkedin_posts_already_commented.csvto avoid duplicates. - Wait nodes throttle launches to ~120 comments/day.
How to set up
- Add credentials: Phantombuster API, SharePoint OAuth2, OpenAI API key.
- In SharePoint › “Phantombuster” folder create:
•linkedin_session_cookies.txt– one cookie per line.
•linkedin_posts_already_commented.csvwith headerpostUrl. - Edit Set ENV Variables to set default language, comment prompt, company ID, etc.
- Adjust schedule or comments-per-launch as needed.
- 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
numberOfLinesPerLaunchand schedule frequency. - Use Google Drive/Dropbox instead of SharePoint by swapping storage nodes.
đź”— Nodes Used
Phantombuster, Schedule Trigger, AI Agent, OpenAI Chat Model, Convert to File, Extract from File
📥 Import
Download workflow.json and import into n8n:
Workflow menu → Import from File