Phantombuster + Google Sheets, LinkedIn tracked
You do a “quick” LinkedIn networking session, and suddenly it’s 45 minutes later. You liked a few posts, left a couple comments, and now you can’t remember what you engaged with, or why you picked those posts in the first place.
Marketing managers feel it when consistency matters more than a burst of effort. Sales consultants feel it when pipeline depends on staying visible. And founders doing their own outreach? Same mess. This LinkedIn tracking automation takes the manual busywork out of daily engagement and gives you a clean activity log in Google Sheets.
Below, you’ll see how the workflow discovers posts, generates a professional comment, likes and comments automatically, then records everything to one sheet so you can review what’s working.
How This Automation Works
See how this solves the problem:
n8n Workflow Template: Phantombuster + Google Sheets, LinkedIn tracked
flowchart LR
subgraph sg0["Daily Trigger - 9 AM Flow"]
direction LR
n0@{ icon: "mdi:play-circle", form: "rounded", label: "Daily Trigger - 9 AM", pos: "b", h: 48 }
n1["<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/httprequest.dark.svg' width='40' height='40' /></div><br/>LinkedIn Posts Scraper"]
n2["<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/httprequest.dark.svg' width='40' height='40' /></div><br/>Fetch Scraper Results"]
n3@{ icon: "mdi:robot", form: "rounded", label: "Commenter Agent", pos: "b", h: 48 }
n4@{ icon: "mdi:brain", form: "rounded", label: "Comment Generation Model", pos: "b", h: 48 }
n5["<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/httprequest.dark.svg' width='40' height='40' /></div><br/>Like LinkedIn Post"]
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/httprequest.dark.svg' width='40' height='40' /></div><br/>Post LinkedIn Comment"]
n7@{ icon: "mdi:database", form: "rounded", label: "Log Activity to Sheet", pos: "b", h: 48 }
n3 --> n5
n3 --> n6
n5 --> n7
n0 --> n1
n2 --> n3
n6 --> n7
n1 --> n2
n4 -.-> n3
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 n0 trigger
class n3 ai
class n4 aiModel
class n7 database
class n1,n2,n5,n6 api
classDef customIcon fill:none,stroke:none
class n1,n2,n5,n6 customIcon
The Challenge: Staying Consistent on LinkedIn Without Losing Your Day
LinkedIn rewards you for showing up regularly, but “showing up” usually means a string of tiny, annoying tasks. Find a relevant post. Read it. Decide if it’s worth engaging with. Think of something intelligent to say. Post the comment. Then later, when you want to know what actually happened, you have nothing but a vague memory and a messy notifications tab. It’s not hard work, but it’s constant work, and that’s what makes it so draining.
It adds up fast. Here’s where it breaks down in real life.
- You spend about 30 minutes a day hunting for posts that are actually relevant to your audience or niche.
- Comments get skipped because writing something “not generic” takes mental energy you don’t always have.
- You can’t easily track which profiles and topics you’ve engaged with, so you repeat yourself or go silent for days.
- There’s no simple spreadsheet view of what you did, which means optimization turns into guesswork.
The Fix: Automated LinkedIn Engagement + Google Sheets Logging
This workflow turns LinkedIn networking into a repeatable daily system. It starts on a schedule (a morning run, for example), triggers a Phantombuster-powered scrape to discover relevant LinkedIn posts, and pulls the results back into n8n. From there, an AI agent reads the post context and generates a professional comment that sounds like a real person wrote it, not a template. The workflow then performs the engagement actions for you (like and comment) using HTTP requests, and finally writes a record of what happened into Google Sheets. You end the day with visibility and momentum, plus a simple log you can actually learn from.
The workflow kicks off with scheduled content discovery, then moves into AI comment generation with an OpenAI chat model. After that, it likes and comments on the chosen post, and records the interaction in a Google Sheet so you can audit it later.
What Changes: Before vs. After
| What This Eliminates | Impact You’ll See |
|---|---|
|
|
Real-World Impact
Say you want to engage with 10 relevant LinkedIn posts each workday. Manually, you might spend about 3 minutes finding each post and another 3 minutes writing a comment, plus a little time to track it, so you’re looking at roughly an hour a day. With this workflow, the scheduled run kicks things off automatically, the AI comment generation and posting happens in the background, and logging is instant. Your “work” becomes review and small edits, maybe 10 minutes.
Requirements
- n8n instance (try n8n Cloud free)
- Self-hosting option if you prefer (Hostinger works well)
- Phantombuster for LinkedIn post scraping runs.
- Google Sheets to store your like/comment history.
- OpenAI API key (get it from the OpenAI API dashboard).
Skill level: Intermediate. You’ll connect accounts, paste API keys, and tweak a prompt safely.
Need help implementing this? Talk to an automation expert (free 15-minute consultation).
The Workflow Flow
A scheduled morning run starts it. The workflow uses n8n’s Schedule Trigger to run daily, so engagement doesn’t depend on someone remembering to do it.
Phantombuster discovers fresh LinkedIn posts. n8n launches a scraping agent via HTTP Request, then retrieves the scrape output so you have post text, links, and metadata ready for the next step.
AI generates a contextual comment. A LangChain Agent paired with an OpenAI chat model turns the post content into a professional reply you’d actually be comfortable attaching to your name.
Engagement happens, then it’s logged. The workflow sends the “like” and publishes the comment with HTTP requests, then writes an activity row to Google Sheets so you can review, filter, and improve.
You can easily modify the targeting (which profiles to scrape) to match your niche, or adjust the comment style to match your brand voice. See the full implementation guide below for customization options.
Step-by-Step Implementation Guide
Step 1: Configure the Schedule Trigger
Set up the daily schedule that kicks off the LinkedIn engagement workflow.
- Add the Scheduled Morning Trigger node as your workflow trigger.
- Set the Rule to run daily at Trigger At Hour
9. - Connect Scheduled Morning Trigger to Launch Post Scraper.
Step 2: Connect Phantombuster for Post Scraping
Configure the two HTTP nodes that launch and fetch the LinkedIn post data from Phantombuster.
- In Launch Post Scraper, set URL to
https://api.phantombuster.com/api/v2/agent/launchand Method toPOST. - Set JSON Body to the exact value:
{
"id": "[YOUR_ID]",
"arguments": {
"profileUrls": [
"https://www.linkedin.com/in/USERNAME/"
],
"numberOfPosts": 1
},
"save": false
} - Enable Send Headers and add header X-Phantombuster-Key-1 with value
[CONFIGURE_YOUR_API_KEY]. - In Retrieve Scrape Output, set URL to
https://api.phantombuster.com/api/v2/agent/fetch-outputand enable Send Query and Send Headers. - Add query parameter id with value
[YOUR_ID], and set header X-Phantombuster-Key-1 to[CONFIGURE_YOUR_API_KEY]. - Connect Launch Post Scraper to Retrieve Scrape Output.
⚠️ Common Pitfall: Phantombuster requires a valid agent ID and API key. If these placeholders are not replaced, the workflow will fail to fetch post data.
Step 3: Set Up AI Comment Generation
Generate a concise, personalized LinkedIn comment using the agent and OpenAI model.
- In Generate Comment Agent, set Prompt Type to
define. - Set the Text field to the exact prompt value starting with
=You are a professional LinkedIn marketer...and including the expressions like{{ $json.authorName }}and{{ $json.text }}. - Connect AI Comment Model as the language model for Generate Comment Agent.
- Credential Required: Connect your openAiApi credentials in AI Comment Model. This model powers Generate Comment Agent, so add credentials to the model node, not the agent.
- Connect Retrieve Scrape Output to Generate Comment Agent.
Step 4: Configure Engagement Actions and Logging
Like the post, publish the AI comment, and log the activity in Google Sheets.
- In Send Post Like, set JSON Body to
={ "id": "[YOUR_ID]", "arguments": { "postUrls": [ {{ $('Retrieve Scrape Output').item.json.postUrl }} ] }, "save": false }and add header X-Phantombuster-Key-1 with[CONFIGURE_YOUR_API_KEY]. - In Publish Post Comment, set JSON Body to
={ "id": "[YOUR_ID]", "arguments": { "postUrls": [ {{ $('Retrieve Scrape Output').item.json.postUrl }} ], "comments": [ {{ $json.output }} ] }, "save": false }and add header X-Phantombuster-Key-1 with[CONFIGURE_YOUR_API_KEY]. - Generate Comment Agent outputs to both Send Post Like and Publish Post Comment in parallel.
- In Record Activity Sheet, set Operation to
append, Sheet Name togid=0, and Document ID to[YOUR_ID]. - Map columns exactly: Comment to
{{ $('Generate Comment Agent').item.json.output }}, PostUrl to{{ $('Retrieve Scrape Output').item.json.postUrl }}, Post text to{{ $('Retrieve Scrape Output').item.json.text }}, Timestamp to{{ $('Retrieve Scrape Output').item.json.timestamp }}, AuthorName to{{ $('Retrieve Scrape Output').item.json.authorName }}, and AuthorProfile to{{ $('Retrieve Scrape Output').item.json.authorProfile }}. - Credential Required: Connect your googleSheetsOAuth2Api credentials in Record Activity Sheet.
- Connect both Send Post Like and Publish Post Comment to Record Activity Sheet.
Tip: Keep the spreadsheet columns aligned with the mapped fields to avoid failed appends.
Step 5: Test and Activate Your Workflow
Verify the scrape, comment generation, and logging pipeline end to end before going live.
- Click Execute Workflow to run from Scheduled Morning Trigger or test nodes manually in sequence.
- Confirm Retrieve Scrape Output returns a post with
postUrl,authorName, andtext. - Verify Generate Comment Agent outputs a short comment in
output. - Check that both Send Post Like and Publish Post Comment succeed and that Record Activity Sheet appends a new row.
- Toggle the workflow to Active to enable daily execution at 9 AM.
Watch Out For
- Phantombuster credentials can expire or need specific permissions. If things break, check your Phantombuster API key and agent status in the Phantombuster dashboard first.
- If you’re using Wait nodes or external rendering, processing times vary. Bump up the wait duration if downstream 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 an hour if your accounts and keys are ready.
Yes, but someone needs to be comfortable with API keys and testing. You won’t write code, though.
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 costs (usually a few cents per day for light usage) and your Phantombuster plan.
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.
Start with the “Generate Comment Agent” and the OpenAI chat model prompt, because that’s where voice, boundaries, and targeting rules belong. You can also swap the post discovery method by changing the two HTTP Request steps that launch and retrieve the Phantombuster scrape output. Common customizations include restricting engagement to a set of profile URLs, adding a keyword filter before commenting, and writing extra columns to Google Sheets (campaign, persona, or offer).
Usually it’s an expired API key or a scraping agent that isn’t configured correctly. Check the Phantombuster dashboard for agent status, then re-copy the API key into n8n and run a single test execution. If it works once and fails later, you might be hitting rate limits or running the schedule too aggressively for your plan. Also confirm your LinkedIn session/cookies setup inside Phantombuster if your agent requires it.
On n8n Cloud Starter you can run a healthy number of daily executions for a small team, and you can upgrade when volume grows. If you self-host, there’s no execution limit (it depends on your server). In practice, this workflow is usually limited by Phantombuster scraping speed and LinkedIn-friendly pacing, not n8n itself. For many businesses, “a few dozen engagements per day” is already plenty.
Often, yes, because this workflow relies on scheduled scraping, HTTP requests, and AI-driven branching that can get expensive or awkward in simpler automation tools. n8n also gives you the option to self-host, which is a big deal if you’re running daily jobs and want predictable costs. That said, Zapier or Make can be totally fine if your version is “log likes to a sheet” and nothing else. The moment you want quality control, filters, retries, and a comment agent that uses context, n8n tends to feel less cramped. Talk to an automation expert if you’re not sure which fits.
You end up with consistent LinkedIn activity and a spreadsheet that tells the truth about what happened. Honestly, that visibility alone is worth setting up once.
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.