HomeHubSpotHow to Add LinkedIn Post Commenters…
HubSpot

How to Add LinkedIn Post Commenters to HubSpot CRM with n8n (Auto-Enriched)

How to Add LinkedIn Post Commenters to HubSpot CRM with n8n (Auto-Enriched)

Every person who comments on your LinkedIn post is a warm lead — they’ve already seen your content and engaged with it. But manually copying names, finding emails, and entering contacts into your CRM? That’s an afternoon of soul-crushing data entry for every post you publish. This n8n workflow changes that: paste a LinkedIn post URL into a form, and within minutes every commenter is automatically enriched with professional data and waiting in your HubSpot CRM as a ready-to-contact lead.

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 and hit submit.
  2. n8n fetches every comment on that post via the ConnectSafely LinkedIn API — names, profile URLs, and comment text included.
  3. Each commenter’s LinkedIn profile is sent to an Apify actor that returns their full professional details: email address, job title, company name, location, and more.
  4. The workflow filters out any profile where no email was found, so your CRM stays clean.
  5. Verified contacts are automatically created (or updated, if they already exist) in HubSpot with all enriched fields pre-populated — first name, last name, email, title, company, city, and country.

How It Works — The Big Picture

The workflow runs in two logical phases: fetching the comment list, then looping through each commenter to enrich and sync. Here’s the full flow at a glance:

┌──────────────────────────────────────────────────────────────────────┐
│  LINKEDIN → HUBSPOT CRM PIPELINE                                     │
│                                                                      │
│  [Form Trigger]  →  [Fetch Post Comments]  →  [Split Array]          │
│   (Post URL)         (ConnectSafely)           (per commenter)       │
│                                                                      │
│                    ┌─── [Loop Over Items] ────────────────┐          │
│                    │         ↓                            │          │
│                    │  [Enrich with Apify]                 │          │
│                    │         ↓                            │          │
│                    │  [Check Email Exists]                │          │
│                    │    ↓ YES        ↓ NO                 │          │
│                    │  [Create/Update  [Continue Loop] ────┘          │
│                    │   HubSpot]           ↑                          │
│                    │          └────────────┘                         │
│                    └──────────────────────────────────────┘          │
└──────────────────────────────────────────────────────────────────────┘

What You’ll Need

  • n8n (self-hosted, version 1.0+) — the ConnectSafely node is a community node that requires self-hosted n8n
  • ConnectSafely LinkedIn API — a paid third-party service that safely retrieves LinkedIn data without violating platform ToS
  • Apify account — free tier works for small volumes; the specific actor used is the LinkedIn Profile Scraper (Actor ID: UMdANQyqx3b2JVuxg)
  • HubSpot account ��� any plan with API access; you’ll need a Private App token
  • A published LinkedIn post with existing comments to test against

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

📌

Self-hosted n8n required: The ConnectSafely community node is not available on n8n Cloud. You’ll need a self-hosted n8n instance to use this workflow. If you’re on Cloud, reach out to us at support@easyworkflows.net — we can discuss an alternative approach using HTTP Request nodes.

Building the Workflow — Step by Step

1 Form Trigger — Enter Post URL (n8n-nodes-base.formTrigger)

This node creates a simple hosted web form that any team member can use to kick off the pipeline. No coding, no API calls — just paste a URL and click submit.

To configure it: open the node and set the Form Title to something descriptive like “LinkedIn Post Engagement Automation.” Add one field with the label LinkedIn Post URL, mark it as required, and add a placeholder showing the expected URL format. n8n will generate a unique public URL for the form — copy it and share it with your sales or marketing team.

When the form is submitted, this data object flows to the next node:

{
  "LinkedIn Post URL": "https://www.linkedin.com/posts/james-carter_ai-sales-automation-activity-7190000000000000000-XXXX"
}
💡

Tip: You can add a second field asking for a “Campaign Tag” or “Lead Source” label. Pass that value to HubSpot as a custom property so you know which LinkedIn post generated each contact.

2 Fetch Post Comments (ConnectSafely LinkedIn)

This community node uses the ConnectSafely API to retrieve all comments on the LinkedIn post. ConnectSafely is a compliant third-party LinkedIn data provider — it handles authentication and rate limiting so your account stays safe.

Configuration: set Post URL to ={{ $json['LinkedIn Post URL'] }} and set the operation to Get Post Comments. Attach your ConnectSafely API credential. The node returns an array of comment objects, each containing the commenter’s name, profile URL, comment text, and timestamp.

{
  "comments": [
    {
      "name": "Emily Rodriguez",
      "profileUrl": "https://www.linkedin.com/in/emily-rodriguez-sales",
      "commentText": "This is exactly what our team needs! Great post.",
      "timestamp": "2026-04-10T14:32:00Z"
    },
    {
      "name": "Michael Chen",
      "profileUrl": "https://www.linkedin.com/in/michael-chen-b2b",
      "commentText": "Saved this — we're evaluating tools like this right now.",
      "timestamp": "2026-04-10T15:10:00Z"
    }
  ]
}

3 Split Comments Array (splitOut)

The Split Out node takes the comments array from the previous step and breaks it into individual items — one n8n item per commenter. This is necessary so the loop in the next step can process each person separately.

Set Field To Split Out to comments. After this node, each item looks like a single commenter object.

4 Loop Over Items (splitInBatches)

The Split In Batches node processes commenters one at a time (or in small batches), which prevents you from hammering the Apify API with too many simultaneous requests. Leave the Batch Size at the default (1) for reliability, or increase it to 5 if you have a high Apify plan and want faster processing.

This node has two outputs: output 0 fires when the loop is complete (all items processed), and output 1 fires for batches — connect output 1 to the Apify enrichment node.

5 Enrich Profile with Apify (Apify)

This is where the magic happens. For each commenter’s LinkedIn profile URL, this node runs an Apify actor that scrapes their public profile and returns rich contact data — including, when available, their work email address.

Configuration: set the Actor ID to https://console.apify.com/actors/UMdANQyqx3b2JVuxg, set the operation to Run actor and get dataset, and in Custom Body enter:

={{ JSON.stringify({ "linkedin": $json.profileUrl }) }}

Attach your Apify API key credential. The actor typically takes 10–30 seconds per profile. The output contains detailed professional information mapped to numbered field keys:

{
  "02_First_name": "Emily",
  "03_Last_name": "Rodriguez",
  "04_Email": "emily.rodriguez@techcorp.com",
  "07_Title": "VP of Sales",
  "13C_Current_address": "1428 Elm St, Austin, TX 78701",
  "14_City": "Austin",
  "15_Country": "United States",
  "16_Company_name": "TechCorp Solutions"
}
💡

Tip: Email availability depends on LinkedIn profile privacy settings. Expect 30–60% of profiles to return an email. Use the Apify Console to inspect the full schema and add more fields.

6 Check Email Exists (IF)

Not every enriched profile will include an email address — some LinkedIn users keep theirs private. This IF node filters them out before they reach HubSpot, keeping your CRM free of incomplete records.

Configuration: add one condition — Value 1 = ={{ $json['04_Email'] }}, operator = Is not empty. Profiles with a valid email go to TRUE; those without go to FALSE (Continue Loop).

7 Create or Update HubSpot Contact (HubSpot)

The final action node upserts the contact in HubSpot using the email address as the unique identifier. If the contact already exists, their record is updated with the latest data. New contacts are created fresh.

Set Authentication to App Token and attach your HubSpot Private App credential. Map the fields:

HubSpot Field n8n Expression Example Value
Email ={{ $json['04_Email'] }} emily.rodriguez@techcorp.com
First Name ={{ $json['02_First_name'] }} Emily
Last Name ={{ $json['03_Last_name'] }} Rodriguez
Job Title ={{ $json['07_Title'] }} VP of Sales
Company ={{ $json['16_Company_name'] }} TechCorp Solutions
City ={{ $json['14_City'] }} AustinRodriguez
Job Title ={{ $json['07_Title'] }} VP of Sales
Company ={{ $json['16_Company_name'] }} TechCorp Solutions
City ={{ $json['14_City'] }} Austin
Country ={{ $json['15_Country'] }} United States
Street Address ={{ $json['13_Current_address'] }} 1428 Elm St, Austin, TX 78701
💡

Tip: In HubSpot, create a custom contact property called “LinkedIn Source Post” and map it to the original post URL using ={{ $('Form Trigger - Enter Post URL').item.json['LinkedIn Post URL'] }}. This lets you track which post each lead came from directly in your CRM.

8 Continue Loop (No Operation)

This placeholder node serves as the merge point for both branches of the IF node — whether a contact was created in HubSpot (TRUE branch) or skipped due to missing email (FALSE branch), both paths converge here and loop back to Loop Over Items to process the next commenter. No configuration needed.

Full System Flow

Here’s the complete end-to-end picture — from a LinkedIn post URL to a fully enriched HubSpot contact record:

  User submits LinkedIn post URL via Form
             ↓
  [Form Trigger] receives URL
             ↓
  [ConnectSafely] fetches all commenters
  → Returns: [{name, profileUrl, comment}, ...]
             ↓
  [Split Out] → individual commenter items
             ↓
  ┌──────────────── [Loop Over Items] ─────────────────┐
  │  For each commenter:                               │
  │         ↓                                         │
  │  [Apify Actor] enriches LinkedIn profile           │
  │  → Returns: email, name, title, company, city      │
  │         ↓                                         │
  │  [IF: Email Exists?]                               │
  │    ↓ YES                    ↓ NO                  │
  │  [HubSpot: Create/Update]  [Skip]                 │
  │  Contact with enriched data   ↓                   │
  │         ↓                    ↓                    │
  │       [Continue Loop] ←──────┘                    │
  │             ↑                                     │
  └─────────────┘ (next commenter)                    │
             ↓ (all done)                             │
        Workflow complete                             │
        All reachable commenters → HubSpot CRM        │
└─────────────────────────────────────────────────────┘

Testing Your Workflow

  1. Activate the workflow and open the form URL provided by the Form Trigger node.
  2. Paste in a LinkedIn post URL that you own (one with at least 3–5 comments for a meaningful test).
  3. Submit the form and watch the execution in the n8n editor — you should see items flowing through each node.
  4. After the run completes, open HubSpot CRM → Contacts and confirm new contacts appear with all fields populated.
  5. For a commenter whose profile you know (yourself or a colleague), verify that the email and company fields are correct.
Problem Likely Cause Fix
ConnectSafely node shows authentication error API credential not configured Re-enter your ConnectSafely API key in the credential modal
Apify returns empty dataset Actor still running; n8n timed out waiting Increase the HTTP timeout in Apify node settings to 120 seconds
HubSpot returns 409 Conflict Contact already exists with same email Normal behavior — HubSpot updates the existing contact; no action needed
0% of profiles return email Testing with private LinkedIn accounts Try with public LinkedIn profiles; email availability varies by privacy settings
Loop never finishes Continue Loop not connected back to Loop Over Items Ensure both IF branches connect to Continue Loop, and Continue Loop connects back to Loop Over Items input 0

Frequently Asked Questions

Does this workflow violate LinkedIn’s Terms of Service?

ConnectSafely is specifically designed to access LinkedIn data within LinkedIn’s permitted boundaries — it doesn’t use scraping bots or credential stuffing. That said, always review the current ToS for your specific use case. The Apify enrichment step retrieves publicly available profile data only. We recommend consulting your legal team for enterprise use.

What percentage of commenters will have an email address?

Typically 30–60%, depending on your audience. B2B professionals in sales, marketing, and tech tend to have higher email availability on LinkedIn. The IF node ensures only enriched contacts reach your CRM, so partial data never clutters your records.

Can I run this on n8n Cloud instead of self-hosted?

Not with the ConnectSafely community node, which only installs on self-hosted n8n. If you’re on Cloud, it’s possible to replicate the comment-fetching step using an HTTP Request node pointed at a LinkedIn-compliant API — reach out to support@easyworkflows.net for guidance on the alternative setup.

How long does the workflow take to run for a post with 100 comments?

About 15–30 minutes, depending on Apify’s queue. Each enrichment call takes 10–30 seconds per profile, and the loop processes them sequentially. For large volumes, consider running on a schedule or splitting the job into smaller batches using a Filter node to process only the newest commenters since the last run.

Can I add commenters to a HubSpot list or pipeline stage automatically?

Yes — after the “Create or Update HubSpot Contact” node, add a HubSpot node set to “Add contact to list” or “Create deal” and reference the contact’s ID from the previous node’s output. This lets you instantly enroll new LinkedIn-sourced leads into a nurture sequence or sales pipeline.

What if I want to save commenters to Google Sheets instead of HubSpot?

Simply swap the HubSpot node for a Google Sheets “Append Row” node and map the same Apify fields to your sheet columns. The rest of the workflow stays identical. This makes it easy to adapt to any CRM or spreadsheet — just change the final destination node.


🚀 Get the LinkedIn → HubSpot CRM Template

Download the ready-to-import n8n workflow JSON, plus a step-by-step Setup Guide and a Credentials Guide covering ConnectSafely, Apify, and HubSpot — everything you need to go live today.

Get the Template →

Instant download · Works on self-hosted n8n · Includes PDF guides

What’s Next?

  • Auto-enroll in email sequence: After creating the HubSpot contact, trigger a HubSpot workflow to enroll them in a LinkedIn-specific nurture email sequence automatically.
  • Slack notification: Add a Slack node after HubSpot to alert your sales team in real time whenever a high-value contact (e.g., VP or Director title) is added.
  • Run on a schedule: Swap the Form Trigger for a Schedule trigger combined with a stored list of your recent post URLs to process new commenters every morning automatically.
  • Score leads by comment sentiment: Add an OpenAI node before the Apify step to analyze the comment text and assign a lead score — prioritize contacts who left buying-intent comments.
n8n
LinkedIn
HubSpot
Apify
CRM automation
lead generation
sales automation