LinkedIn + Phantombuster: comments that stay on brand
Keeping up with LinkedIn comments sounds simple until you do it every day. You open the feed, “just to comment,” and suddenly an hour is gone, your replies feel rushed, and you’re not even sure you’ve already commented on that same post last week.
This hits B2B marketers and growth-minded founders first, honestly. But recruiters building a warm network and consultants trying to stay visible feel the drag too. With LinkedIn comment automation, you show up daily with short, relevant replies that still sound like you.
This workflow runs hourly, finds fresh posts in your niche, generates a 150-character comment in your preferred language, posts it through Phantombuster, and logs the post URL in SharePoint so duplicates are avoided. You’ll see what it does, what it changes, and what you need to run it safely.
How This Automation Works
See how this solves the problem:
n8n Workflow Template: LinkedIn + Phantombuster: comments that stay on brand
flowchart LR
subgraph sg0["Schedule Flow"]
direction LR
n0@{ icon: "mdi:cog", form: "rounded", label: "Wait", pos: "b", h: 48 }
n1@{ icon: "mdi:brain", form: "rounded", label: "OpenAI Chat Model", pos: "b", h: 48 }
n2@{ icon: "mdi:cog", form: "rounded", label: "Wait1", pos: "b", h: 48 }
n3["<div style='background:#f5f5f5;padding:10px;border-radius:8px;display:inline-block;border:1px solid #e0e0e0'><img src='https://flowpast.com/wp-content/uploads/n8n-workflow-icons/phantombuster.png' width='40' height='40' /></div><br/>Launch Agent"]
n4["<div style='background:#f5f5f5;padding:10px;border-radius:8px;display:inline-block;border:1px solid #e0e0e0'><img src='https://flowpast.com/wp-content/uploads/n8n-workflow-icons/code.svg' width='40' height='40' /></div><br/>Get Random Post"]
n5@{ icon: "mdi:robot", form: "rounded", label: "Create Comment", pos: "b", h: 48 }
n6["<div style='background:#f5f5f5;padding:10px;border-radius:8px;display:inline-block;border:1px solid #e0e0e0'><img src='https://flowpast.com/wp-content/uploads/n8n-workflow-icons/code.svg' width='40' height='40' /></div><br/>Create CSV Binary"]
n7@{ icon: "mdi:cog", form: "rounded", label: "Upload CSV", pos: "b", h: 48 }
n8["<div style='background:#f5f5f5;padding:10px;border-radius:8px;display:inline-block;border:1px solid #e0e0e0'><img src='https://flowpast.com/wp-content/uploads/n8n-workflow-icons/phantombuster.png' width='40' height='40' /></div><br/>Get Autocomment Agent"]
n9["<div style='background:#f5f5f5;padding:10px;border-radius:8px;display:inline-block;border:1px solid #e0e0e0'><img src='https://flowpast.com/wp-content/uploads/n8n-workflow-icons/phantombuster.png' width='40' height='40' /></div><br/>Get Posts"]
n10["<div style='background:#f5f5f5;padding:10px;border-radius:8px;display:inline-block;border:1px solid #e0e0e0'><img src='https://flowpast.com/wp-content/uploads/n8n-workflow-icons/phantombuster.png' width='40' height='40' /></div><br/>Launch AC Agent"]
n11["<div style='background:#f5f5f5;padding:10px;border-radius:8px;display:inline-block;border:1px solid #e0e0e0'><img src='https://flowpast.com/wp-content/uploads/n8n-workflow-icons/phantombuster.png' width='40' height='40' /></div><br/>Get Response"]
n12["<div style='background:#f5f5f5;padding:10px;border-radius:8px;display:inline-block;border:1px solid #e0e0e0'><img src='https://flowpast.com/wp-content/uploads/n8n-workflow-icons/phantombuster.png' width='40' height='40' /></div><br/>Get Search Agent"]
n13@{ icon: "mdi:swap-vertical", form: "rounded", label: "Set ENV Variables", pos: "b", h: 48 }
n14@{ icon: "mdi:robot", form: "rounded", label: "Generate Random Search Term", pos: "b", h: 48 }
n15@{ icon: "mdi:play-circle", form: "rounded", label: "Schedule Trigger", pos: "b", h: 48 }
n16@{ icon: "mdi:brain", form: "rounded", label: "OpenAI Chat Model1", pos: "b", h: 48 }
n17@{ icon: "mdi:cog", form: "rounded", label: "Update file", pos: "b", h: 48 }
n18@{ icon: "mdi:cog", form: "rounded", label: "Download file", pos: "b", h: 48 }
n19["<div style='background:#f5f5f5;padding:10px;border-radius:8px;display:inline-block;border:1px solid #e0e0e0'><img src='https://flowpast.com/wp-content/uploads/n8n-workflow-icons/code.svg' width='40' height='40' /></div><br/>Check if in List"]
n20@{ icon: "mdi:swap-horizontal", form: "rounded", label: "If", pos: "b", h: 48 }
n21@{ icon: "mdi:cog", form: "rounded", label: "Wait2", pos: "b", h: 48 }
n22["<div style='background:#f5f5f5;padding:10px;border-radius:8px;display:inline-block;border:1px solid #e0e0e0'><img src='https://flowpast.com/wp-content/uploads/n8n-workflow-icons/code.svg' width='40' height='40' /></div><br/>Prepare Updated Data"]
n23@{ icon: "mdi:cog", form: "rounded", label: "Extract from File", pos: "b", h: 48 }
n24@{ icon: "mdi:cog", form: "rounded", label: "Convert to File", pos: "b", h: 48 }
n25@{ icon: "mdi:cog", form: "rounded", label: "Get Available Session Cookies", pos: "b", h: 48 }
n26@{ icon: "mdi:cog", form: "rounded", label: "Extract Cookies", pos: "b", h: 48 }
n27@{ icon: "mdi:robot", form: "rounded", label: "Select Cookie", pos: "b", h: 48 }
n28@{ icon: "mdi:brain", form: "rounded", label: "OpenAI Chat Model2", pos: "b", h: 48 }
n20 --> n21
n20 --> n22
n0 --> n9
n2 --> n11
n21 --> n4
n9 --> n21
n7 --> n8
n17 --> n5
n3 --> n0
n18 --> n23
n27 --> n14
n5 --> n6
n24 --> n17
n26 --> n27
n4 --> n18
n10 --> n2
n19 --> n20
n12 --> n3
n15 --> n25
n6 --> n7
n23 --> n19
n1 -.-> n5
n13 --> n12
n16 -.-> n14
n28 -.-> n27
n22 --> n24
n8 --> n10
n14 --> n13
n25 --> n26
end
%% Styling
classDef trigger fill:#e8f5e9,stroke:#388e3c,stroke-width:2px
classDef ai fill:#e3f2fd,stroke:#1976d2,stroke-width:2px
classDef aiModel fill:#e8eaf6,stroke:#3f51b5,stroke-width:2px
classDef decision fill:#fff8e1,stroke:#f9a825,stroke-width:2px
classDef database fill:#fce4ec,stroke:#c2185b,stroke-width:2px
classDef api fill:#fff3e0,stroke:#e65100,stroke-width:2px
classDef code fill:#f3e5f5,stroke:#7b1fa2,stroke-width:2px
classDef disabled stroke-dasharray: 5 5,opacity: 0.5
class n15 trigger
class n5,n14,n27 ai
class n1,n16,n28 aiModel
class n20 decision
class n4,n6,n19,n22 code
classDef customIcon fill:none,stroke:none
class n3,n4,n6,n8,n9,n10,n11,n12,n19,n22 customIcon
The Challenge: Staying Visible Without Sounding Like a Bot
LinkedIn rewards consistent, real interaction, but the work is sneaky. You have to find the right posts, read enough context to comment intelligently, write something short that doesn’t feel generic, and then do it again tomorrow. Miss a few days and your “presence” fades. Push too hard and you risk repetitive comments, accidental duplicates, or simply posting at a pace that makes your account look unnatural. It’s not hard work. It’s draining work.
And the friction compounds fast. Here’s where it usually breaks down.
- Finding fresh, relevant posts can take 20 minutes before you type a single comment.
- Teams end up reusing the same “Great insights!” style replies, which hurts credibility and response rates.
- Duplicate commenting happens more than people admit, especially when multiple team members engage from the same brand voice.
- Manual pacing is inconsistent, so you either forget to comment or overdo it in one sitting.
The Fix: Automated LinkedIn Comments With Guardrails
This n8n workflow is built to keep your LinkedIn engagement consistent without turning your comments into copy-paste spam. Every hour, it rotates through a saved set of LinkedIn session cookies, then uses GPT-4o to generate a realistic search term that fits your niche. Phantombuster searches LinkedIn, scrapes recent posts, and the workflow picks one at random. Before posting anything, it checks a SharePoint CSV log of URLs you already commented on. If it’s new, GPT-4o writes a short reply (kept to 150 characters), the workflow creates a CSV for Phantombuster’s auto-comment agent, and Phantombuster publishes the comment.
It starts with a scheduled trigger and ends with a comment posted and tracked. In the middle, SharePoint acts as the “memory” so you don’t double-comment, and Wait nodes throttle activity to roughly 120 comments per day so you can stay under daily limits.
What Changes: Before vs. After
| What This Eliminates | Impact You’ll See |
|---|---|
|
|
Real-World Impact
Say you want to leave 10 thoughtful comments a day. Manually, you might spend about 5 minutes finding each post and 3 minutes writing a decent reply, so roughly 80 minutes daily. With this workflow, you spend about 20 minutes upfront setting your prompt and cookies, then each hourly run does the rest (including duplicate checks) while you’re doing other work. You still review results when you want, but you’re no longer living in the feed.
Requirements
- n8n instance (try n8n Cloud free)
- Self-hosting option if you prefer (Hostinger works well)
- Phantombuster to search posts and publish comments.
- Microsoft SharePoint to store cookies and dedupe logs.
- OpenAI API key (get it from the OpenAI API dashboard).
Skill level: Intermediate. You’ll connect accounts, edit a few variables, and confirm SharePoint files are in the right folder.
Need help implementing this? Talk to an automation expert (free 15-minute consultation).
The Workflow Flow
Hourly schedule triggers the run. The workflow fires every hour so engagement is spread out and doesn’t look like a human trying to “catch up” late at night.
LinkedIn access rotates safely. A SharePoint text file stores multiple session cookies (one per line), and the workflow selects one using time-slice logic so you’re not hammering a single session repeatedly.
Discovery and filtering happen first. GPT-4o generates a realistic search term, Phantombuster scrapes recent posts, and a random post is selected. Then SharePoint’s “already commented” CSV is downloaded and checked so the workflow can skip anything you’ve logged before.
Comment creation and posting are controlled. GPT-4o writes a reply capped at 150 characters in your chosen language, the workflow builds a CSV for the auto-comment agent, uploads it to SharePoint, and launches Phantombuster to publish. Wait nodes throttle the pace to around 120 comments/day.
You can easily modify the comment prompt and the comments-per-launch setting to match your risk tolerance and brand voice. See the full implementation guide below for customization options.
Step-by-Step Implementation Guide
Step 1: Configure the Scheduled Trigger
Set the workflow to run on a schedule and start the automation chain.
- Add and open Scheduled Automation Trigger.
- Configure the schedule that matches how often you want the social commenting cycle to run.
- Confirm Scheduled Automation Trigger connects to Retrieve Session Cookies as the first downstream node.
Step 2: Connect Microsoft SharePoint
These nodes manage cookie files, post lists, and CSV updates in SharePoint.
- Open Retrieve Session Cookies and connect your SharePoint site and file source.
- Open Download SharePoint File to point at the file containing previously processed posts.
- Open Update SharePoint File to target the updated list file output.
- Open Upload CSV File to configure the destination path for the comment CSV.
Credential Required: Connect your Microsoft SharePoint credentials in Retrieve Session Cookies, Download SharePoint File, Update SharePoint File, and Upload CSV File.
Step 3: Set Up Cookie Selection and Search Term AI
These nodes parse cookies and generate search terms using language models.
- Ensure Extract Cookie Data is receiving the file output from Retrieve Session Cookies.
- Open Choose Cookie and confirm it accepts input from Extract Cookie Data.
- Open Generate Search Term to confirm it accepts input from Choose Cookie.
- Verify Chat Model Tertiary is connected as the language model for Choose Cookie.
- Verify Chat Model Secondary is connected as the language model for Generate Search Term.
Credential Required: Connect your OpenAI credentials in Chat Model Tertiary and Chat Model Secondary. These credentials power the AI inside Choose Cookie and Generate Search Term.
Step 4: Configure the Search and Post Retrieval Cycle
These nodes run the PhantomBuster agents to search, wait for results, and retrieve posts.
- Open Assign Env Values and map any environment variables required by the PhantomBuster agents.
- Configure Fetch Search Agent and Start Search Agent with your PhantomBuster agent IDs and input parameters.
- Set timing in Delay Cycle to allow the search agent to complete before pulling results.
- Configure Retrieve Posts to collect the search results after Delay Cycle.
- Set timing in Delay Step B to throttle the workflow between post collection and selection.
- Review Pick Random Post to ensure it chooses a single post from the retrieved dataset.
Credential Required: Connect your PhantomBuster credentials in all PhantomBuster nodes (Fetch Search Agent, Start Search Agent, Retrieve Posts, Fetch Autocomment Agent, Start Comment Agent, Collect Response).
⚠️ Common Pitfall: If Delay Cycle is too short, Retrieve Posts may run before PhantomBuster finishes, resulting in empty results.
Step 5: Validate Post Uniqueness and Update the Source File
This branch checks if the post is already processed and updates the SharePoint list.
- Confirm Download SharePoint File pulls the current list of processed posts.
- Ensure Extract File Data parses the SharePoint file and outputs rows to Verify In List.
- Review Verify In List to validate the selected post against existing entries.
- Configure Branch Logic Check to route duplicates to Delay Step B and new posts to Prepare Revised Data.
- Confirm Prepare Revised Data builds the updated dataset and passes it to Convert Data File.
- Verify Convert Data File generates a file for Update SharePoint File.
⚠️ Common Pitfall: If Extract File Data is not set to parse the correct file format, Verify In List may always return false positives or nulls.
Step 6: Compose and Upload Comments
These nodes generate the comment, build a CSV file, upload it, and run the comment agent.
- Open Compose Comment to define the prompt and expected output format for comment generation.
- Verify Chat Model Primary is connected as the language model for Compose Comment.
- Check Build CSV Binary to ensure it converts the comment data into a CSV binary output.
- Confirm Upload CSV File receives the CSV binary and uploads to the configured SharePoint path.
- Set up Fetch Autocomment Agent and Start Comment Agent to run the PhantomBuster autocomment workflow.
- Set Pause Step A to wait for comment execution, then collect results with Collect Response.
Credential Required: Connect your OpenAI credentials in Chat Model Primary. This powers the AI inside Compose Comment.
Step 7: Test and Activate Your Workflow
Run a manual test to validate data flow and confirm successful comment creation.
- Click Execute Workflow to run a manual test from Scheduled Automation Trigger.
- Verify that Retrieve Session Cookies and Extract Cookie Data output cookie data.
- Confirm that Retrieve Posts outputs posts and Pick Random Post selects one.
- Check that Update SharePoint File writes the updated list and Upload CSV File uploads the comment CSV.
- Validate that Collect Response returns results from the comment agent.
- Once verified, switch the workflow to Active to run on schedule.
Watch Out For
- Microsoft SharePoint credentials can expire or need specific permissions. If things break, check your Microsoft 365 OAuth connection in n8n’s Credentials list first.
- If you’re using Wait nodes or external scraping/posting, processing times vary. Bump up the wait duration if downstream Phantombuster nodes fail on empty responses.
- Default prompts in AI nodes are generic. Add your brand voice early or you’ll be editing outputs forever.
Common Questions
About 45 minutes if your Phantombuster, SharePoint, and OpenAI accounts are ready.
Yes, but someone needs to be comfortable connecting credentials and creating the required SharePoint files. After that, day-to-day use is basically hands-off.
Yes. n8n has a free self-hosted option and a free trial on n8n Cloud. Cloud plans start at $20/month for higher volume. You’ll also need to factor in OpenAI API usage (usually a few dollars a month at this volume) and a Phantombuster plan with API access.
Two options: n8n Cloud (managed, easiest setup) or self-hosting on a VPS. For self-hosting, Hostinger VPS is affordable and handles n8n well. Self-hosting gives you unlimited executions but requires basic server management.
You can change the brand voice by editing the prompt in the “Compose Comment” step, including examples of comments you’d actually write. If you’d rather store logs outside SharePoint, swap the SharePoint download/upload steps for Google Drive or Dropbox storage and keep the same “already commented” CSV idea. You can also raise or lower the posting pace by adjusting the schedule trigger and the “numberOfLinesPerLaunch” value used by the Phantombuster comment agent.
Usually it’s an expired Phantombuster API key or a plan level that doesn’t include API access. Double-check the Phantombuster credential in n8n, then confirm the agent IDs you’re calling still exist in your Phantombuster account. If it fails only sometimes, you may be hitting rate limits or the workflow is moving faster than the agent can return results, so increase the Wait delays before “Retrieve Posts” or “Collect Response.”
Practically, it’s designed for about 120 comments per day because the workflow throttles launches with Wait nodes. If you run it hourly, that’s one comment per hour by default, which is a conservative pace. n8n Cloud capacity depends on your plan’s execution limits; self-hosting depends on your server. Phantombuster and LinkedIn limits will matter more than n8n compute in most cases.
Often, yes, because this workflow relies on branching logic, file handling, and throttling that gets awkward fast in simpler tools. The SharePoint “memory” piece (download, check, update) is also much easier to reason about when you can see the full flow in one canvas. n8n gives you a self-hosting option too, which matters if you want lots of executions without your bill climbing every month. Zapier or Make can still be fine for lightweight routing, like sending a draft comment to Slack for approval. If you’re unsure, Talk to an automation expert and we’ll map the safest setup for your posting goals.
Once this is running, you get consistent LinkedIn presence without the daily scramble. The workflow handles the repetitive parts so your attention goes to real conversations that actually matter.
Need Help Setting This Up?
Our automation experts can build and customize this workflow for your specific needs. Free 15-minute consultation—no commitment required.