HomeCRM & SalesHow to Add LinkedIn Post Commenters…
CRM & Sales

How to Add LinkedIn Post Commenters to HubSpot CRM with n8n

How to Add LinkedIn Post Commenters to HubSpot CRM with n8n

You publish a LinkedIn post, it takes off, and suddenly forty people you’ve never met are commenting on it. Each one of them is a warm lead — someone who already cares about what you have to say. But by the time you’ve finished scrolling through the comments, copying names, and looking people up one by one, the momentum is gone. What if every single one of those commenters appeared in your CRM automatically, complete with their email, job title, and company — ready for your sales team to follow up?

That’s exactly what you’ll build in this guide. Using n8n, Apify, and HubSpot, you’ll create a workflow that scrapes commenters from any LinkedIn post, enriches their profiles with professional data, and pushes qualified contacts straight into your CRM. No manual data entry, no copy-pasting, no missed opportunities.

Prefer to skip the setup? Grab the ready-made template → and be up and running in under 10 minutes.

What You’ll Build

  1. You paste a LinkedIn post URL into a simple web form hosted by n8n.
  2. The workflow scrapes every comment on that post and extracts the commenter’s LinkedIn profile URL.
  3. Each commenter’s profile is enriched through Apify — pulling their email address, job title, company name, city, and country.
  4. If a valid email is found, the workflow creates or updates a contact in HubSpot CRM with all the enriched data.
  5. Commenters without a discoverable email are silently skipped, keeping your CRM clean.

How It Works — The Big Picture

The entire process runs through a single n8n workflow with seven core nodes. Here’s the high-level flow:

┌──────────────────────────────────────────────────────────────────────────────────────┐
│  LINKEDIN COMMENTERS → HUBSPOT CRM                                                  │
│                                                                                      │
│  [Form Trigger]                                                                      │
│       │                                                                              │
│       ▼                                                                              │
│  [Scrape Post Comments]  ──▶  [Loop Over Commenters]                                 │
│                                     │                                                │
│                                     ▼                                                │
│                              [Wait 3 sec]                                            │
│                                     │                                                │
│                                     ▼                                                │
│                              [Enrich Profile]                                        │
│                                     │                                                │
│                                     ▼                                                │
│                              [Extract Fields]                                        │
│                                     │                                                │
│                                     ▼                                                │
│                              [Has Valid Email?]                                      │
│                               ╱            ╲                                         │
│                           YES ╱              ╲ NO                                    │
│                             ╱                  ╲                                     │
│                [Create/Update           [Skip — No Email]                            │
│                 HubSpot Contact]              │                                      │
│                        │                      │                                      │
│                        └───── ◀── Loop ──◀────┘                                      │
└──────────────────────────────────────────────────────────────────────────────────────┘
  

What You’ll Need

  • n8n instance — self-hosted or n8n Cloud (all nodes are built-in, no community nodes required)
  • Apify account — the free tier gives you $5/month of compute, enough to process around 50–100 profiles per run. Sign up here.
  • HubSpot account — free CRM tier works perfectly. You’ll need a Private App Token with crm.objects.contacts.write scope.

Estimated build time: 30–40 minutes from scratch, or under 10 minutes with the template.

Building the Workflow Step by Step

1 Submit LinkedIn Post URL (Form Trigger)

The workflow starts with n8n’s built-in Form Trigger node. This creates a simple web form where you paste the LinkedIn post URL. When you submit the form, the workflow fires.

  1. Add a Form Trigger node to your canvas.
  2. Set the Form Title to LinkedIn Post Engagement Capture.
  3. Add one form field: label it LinkedIn Post URL, set it as required, and add a placeholder like https://www.linkedin.com/posts/username_topic-activity-123...
  4. Save the node. n8n will generate a unique form URL you can bookmark.

After submission, the data flowing out of this node looks like:

{
  "LinkedIn Post URL": "https://www.linkedin.com/posts/james-carter_ai-automation-activity-7291234567890-AbCd",
  "submittedAt": "2026-04-08T14:22:00.000Z"
}
💡

Tip: You can find the URL of any LinkedIn post by clicking the three dots on the post and selecting “Copy link to post.” Make sure you’re copying the full URL, not a shortened one.

2 Scrape Post Comments (HTTP Request → Apify)

This node sends the LinkedIn post URL to Apify’s LinkedIn Post Comments Scraper actor, which returns an array of all commenters with their profile URLs and comment text.

  1. Add an HTTP Request node and connect it to the Form Trigger.
  2. Set the Method to POST.
  3. Set the URL to: https://api.apify.com/v2/acts/curious_coder~linkedin-post-comments-scraper/run-sync-get-dataset-items?token={{ $credentials.httpHeaderAuth.value }}
  4. Under Body, select JSON and enter:
    {
      "postUrl": "{{ $json['LinkedIn Post URL'] }}",
      "maxComments": 100
    }
  5. Set the Timeout to 120000 ms (2 minutes) — scraping takes time.
  6. Under Credentials, add your Apify API token as an HTTP Header Auth credential (header name: Authorization, value: Bearer YOUR_TOKEN). Alternatively, the token in the URL query parameter handles auth directly.

The response is an array of comment objects. Each item looks like:

{
  "profileUrl": "https://www.linkedin.com/in/emily-rodriguez-marketing",
  "commenterName": "Emily Rodriguez",
  "commentText": "This is such a great breakdown! We've been looking at something similar.",
  "timestamp": "2026-04-07T09:15:00.000Z"
}
💡

Tip: The maxComments parameter caps how many comments are scraped. For posts with hundreds of comments, start with 50 to test, then increase once you’ve confirmed the workflow runs smoothly.

3 Loop Over Commenters (Split In Batches)

The comment scraper returns all comments as an array. The Loop node processes them one at a time, which is important because the enrichment step hits an external API that has rate limits.

  1. Add a Split In Batches node and connect it to the HTTP Request node.
  2. Set Batch Size to 1 — we process one commenter per iteration.

The loop feeds each individual commenter object to the next node in sequence.

4 Wait Between Requests (Wait Node)

Adding a 3-second pause between enrichment requests prevents you from hitting Apify’s rate limits and keeps the workflow running reliably even with large comment batches.

  1. Add a Wait node after the loop’s “process” output.
  2. Set Amount to 3 and Unit to seconds.
📌

If you’re on Apify’s paid plan with higher rate limits, you can reduce this to 1 second or remove it entirely.

5 Enrich Profile (HTTP Request → Apify)

This is where the magic happens. For each commenter, we call Apify’s LinkedIn Profile Scraper to pull their full professional details — email, headline, company, location, and more.

  1. Add another HTTP Request node.
  2. Set the Method to POST.
  3. Set the URL to: https://api.apify.com/v2/acts/curious_coder~linkedin-profile-scraper/run-sync-get-dataset-items?token={{ $credentials.httpHeaderAuth.value }}
  4. Under Body, set JSON to:
    {
      "profileUrls": ["{{ $json.profileUrl }}"]
    }
  5. Set the Timeout to 120000 ms.
  6. Use the same Apify credential as Step 2.

The enriched profile data comes back looking something like this:

{
  "firstName": "Emily",
  "lastName": "Rodriguez",
  "email": "emily.rodriguez@techcorp.com",
  "headline": "VP of Marketing at TechCorp",
  "company": "TechCorp Inc.",
  "city": "Austin",
  "country": "US",
  "url": "https://www.linkedin.com/in/emily-rodriguez-marketing",
  "connections": 2847
}

6 Extract Profile Fields (Set Node)

The enrichment response contains dozens of fields. This Set node extracts only the ones you actually need for your CRM, creating a clean, standardized data object.

  1. Add a Set node and connect it to the Enrich Profile node.
  2. Switch to Manual mode.
  3. Map these fields:
    Output Field Expression
    email ={{ $json.email }}
    firstName ={{ $json.firstName }}
    lastName ={{ $json.lastName }}
    jobTitle ={{ $json.headline }}
    company ={{ $json.company }}
    city ={{ $json.city }}
    country ={{ $json.country }}
    linkedinUrl ={{ $json.url }}

After this node, each item has a clean, flat structure:

{
  "email": "emily.rodriguez@techcorp.com",
  "firstName": "Emily",
  "lastName": "Rodriguez",
  "jobTitle": "VP of Marketing at TechCorp",
  "company": "TechCorp Inc.",
  "city": "Austin",
  "country": "US",
  "linkedinUrl": "https://www.linkedin.com/in/emily-rodriguez-marketing"
}

7 Has Valid Email? (IF Node)

Not every LinkedIn profile has a publicly discoverable email address. This IF node checks whether the enrichment found a valid email before attempting to create a CRM contact.

  1. Add an IF node.
  2. Add two conditions (AND):
    • {{ $json.email }} exists
    • {{ $json.email }} is not empty

The true branch goes to HubSpot. The false branch goes to a No-Op node that loops back, silently skipping the commenter.

💡

Tip: Apify typically finds emails for 40–60% of LinkedIn profiles. If you need higher hit rates, consider adding a secondary enrichment service like Hunter.io or Apollo as a fallback before the IF node.

8 Create or Update HubSpot Contact (HubSpot Node)

The final action node. It takes the enriched profile data and creates a new contact in HubSpot — or updates an existing one if a contact with the same email already exists.

  1. Add a HubSpot node.
  2. Set Authentication to App Token.
  3. Set the Email field to ={{ $json.email }}.
  4. Under Additional Fields, map:
    HubSpot Field Expression
    First Name ={{ $json.firstName }}
    Last Name ={{ $json.lastName }}
    Job Title ={{ $json.jobTitle }}
    Company Name ={{ $json.company }}
    City ={{ $json.city }}
    Country ={{ $json.country }}
    Website ={{ $json.linkedinUrl }}

Connect both the HubSpot node’s output and the “Skip — No Email” node back to the Loop node to continue processing the next commenter.

📌

The HubSpot node uses upsert behavior by default — if a contact with the same email already exists, it updates their fields instead of creating a duplicate. This keeps your CRM clean even if you run the workflow on multiple posts where the same people comment.

The Data Flow

Here’s what a contact record looks like as it moves through the system, from raw LinkedIn comment to polished CRM entry:

Stage Data Available Example
After Comment Scrape Profile URL, Name, Comment Text emily-rodriguez-marketing
After Enrichment + Email, Headline, Company, City, Country emily.rodriguez@techcorp.com, VP of Marketing
After Field Extraction Clean 8-field object ready for CRM Flat JSON with all mapped fields
In HubSpot Full contact record with source tracking Contact card with LinkedIn URL as website

Full System Flow

┌──────────────────────────────────────────────────────────────────────────────┐
│                                                                              │
│   USER                     n8n WORKFLOW                      HUBSPOT CRM     │
│                                                                              │
│   Pastes URL ──▶ [Form Trigger]                                              │
│                       │                                                      │
│                       ▼                                                      │
│                  [HTTP Request] ──▶ Apify Comments API                       │
│                       │                                                      │
│                       ▼                                                      │
│                  [Loop: 1 at a time]                                          │
│                       │                                                      │
│                       ▼                                                      │
│                  [Wait 3 sec]                                                │
│                       │                                                      │
│                       ▼                                                      │
│                  [HTTP Request] ──▶ Apify Profile API                        │
│                       │                                                      │
│                       ▼                                                      │
│                  [Set: Extract Fields]                                        │
│                       │                                                      │
│                       ▼                                                      │
│                  [IF: Email exists?]                                          │
│                    ╱        ╲                                                 │
│                YES            NO                                             │
│                 ╱                ╲                                            │
│   [HubSpot: Upsert]     [Skip: No-Op]                                       │
│         │                      │           ──▶  Contact created/updated      │
│         └──── Loop back ◀──────┘                                             │
│                                                                              │
└──────────────────────────────────────────────────────────────────────────────┘
  

Testing Your Workflow

  1. Find a test post. Use one of your own LinkedIn posts that has at least 5–10 comments. Avoid posts with hundreds of comments for your first test — keep it small.
  2. Open the form. Click “Test workflow” in n8n, then open the form URL in your browser. Paste the LinkedIn post URL and submit.
  3. Watch the execution. In n8n, you’ll see the workflow run node by node. The comment scraping takes 30–60 seconds. Each profile enrichment takes another 10–30 seconds.
  4. Check HubSpot. Open your HubSpot contacts list and look for the newly created records. Verify that the name, email, job title, and company are populated correctly.
  5. Review skipped contacts. Check the workflow execution log — any commenters without emails will show as passing through the “Skip — No Email” branch.
Problem Likely Cause Fix
No comments returned Post URL is incorrect or post has no comments Copy the URL directly from the post’s share menu; make sure the post is public
Enrichment returns empty data Apify token is invalid or has run out of credits Check your Apify dashboard for remaining credits and regenerate the token
HubSpot returns 401 error App Token doesn’t have the right scopes In HubSpot, edit your Private App and ensure crm.objects.contacts.write is enabled
Workflow times out Too many comments + enrichment is slow Reduce maxComments to 50, or increase the HTTP Request timeout to 180000 ms
Duplicate contacts in CRM Email field is mapped incorrectly Make sure the HubSpot node’s Email field uses the exact expression ={{ $json.email }}

Frequently Asked Questions

Does this work with n8n Cloud or only self-hosted?

It works with both. Every node in this workflow is a standard n8n built-in node — no community nodes required. The Apify calls are made through regular HTTP Request nodes, so there’s nothing extra to install.

How many comments can it handle per run?

The template is set to scrape up to 100 comments per post. You can increase this by changing the maxComments parameter, but keep in mind that each profile enrichment uses Apify compute credits. A batch of 100 profiles typically costs around $1–2 on the free tier.

What if a commenter is already in my HubSpot CRM?

The HubSpot node uses upsert logic — it matches on email address. If a contact with that email already exists, their record gets updated with the latest data instead of creating a duplicate. Your CRM stays clean no matter how many times you run it.

Can I use a different CRM instead of HubSpot?

Yes. Swap the HubSpot node for any CRM node that n8n supports — Salesforce, Pipedrive, Zoho CRM, or even a Google Sheets node if you want a lightweight approach. The enrichment pipeline stays the same; you just change the final destination.

Is scraping LinkedIn comments against their terms of service?

Apify handles the data collection through their compliant infrastructure. The data accessed is publicly visible comment information. That said, always review LinkedIn’s current terms and your local data protection regulations before using any automation at scale.

What percentage of profiles actually have an email?

Apify’s LinkedIn Profile Scraper typically discovers email addresses for 40–60% of profiles, depending on the industry and how complete people’s profiles are. B2B professionals in tech and marketing tend to have higher hit rates.

Get the LinkedIn Commenters to HubSpot CRM Template

Skip the 40-minute build. Get the pre-built workflow JSON, step-by-step setup guide, and credentials walkthrough — import it into n8n and start capturing leads in under 10 minutes.

Get the Template →

Instant download · Works on n8n Cloud and self-hosted

What’s Next?

  • Add a Slack notification — get a message in your team channel every time a new contact is added to HubSpot, with their name, company, and the post they commented on.
  • Tag contacts by post topic — use a Set node to add a custom HubSpot property that records which post the contact engaged with, so your sales team knows what they’re interested in.
  • Chain with an email sequence — connect HubSpot to your email tool (Mailchimp, SendGrid, or HubSpot’s own sequences) to automatically send a welcome email to new contacts.
  • Schedule it to run on multiple posts — replace the Form Trigger with a Schedule Trigger and a list of post URLs in a Google Sheet to process several posts on autopilot.
n8n
LinkedIn
HubSpot
Apify
CRM
Lead Generation
Contact Enrichment
automation