LinkedIn to HubSpot, capture warm leads automatically
You get profile views on LinkedIn. Then nothing happens. No follow-up, no record in your CRM, and by the time you remember to check… the moment is gone.
This LinkedIn HubSpot leads automation hits sales reps hardest, but founders and recruiters feel it too. You stop losing warm intent and start building a clean, usable HubSpot list without copy-paste work.
Below, you’ll see exactly what the workflow does, the results you can expect, and how to set it up (plus the common snags people run into).
How This Automation Works
Here’s the complete workflow you’ll be setting up:
n8n Workflow Template: LinkedIn to HubSpot, capture warm leads automatically
flowchart LR
subgraph sg0["Schedule Flow"]
direction LR
n0@{ icon: "mdi:swap-horizontal", form: "rounded", label: "Run an Actor and get dataset", pos: "b", h: 48 }
n1@{ icon: "mdi:swap-horizontal", form: "rounded", label: "Check if Contact is eligible..", pos: "b", h: 48 }
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/hubspot.svg' width='40' height='40' /></div><br/>Create or update a contact"]
n3@{ icon: "mdi:cog", form: "rounded", label: "Replace Me", pos: "b", h: 48 }
n4@{ icon: "mdi:swap-vertical", form: "rounded", label: "📤 Split Comments Array", 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/>HTTP Request"]
n6@{ icon: "mdi:play-circle", form: "rounded", label: "Schedule Trigger", pos: "b", h: 48 }
n7@{ icon: "mdi:play-circle", form: "rounded", label: "When clicking ‘Execute workf..", pos: "b", h: 48 }
n8@{ icon: "mdi:swap-vertical", form: "rounded", label: "Loop Over Items", pos: "b", h: 48 }
n3 --> n8
n5 --> n4
n8 --> n0
n6 --> n5
n4 --> n8
n2 --> n3
n0 --> n1
n7 --> n5
n1 --> n2
n1 --> 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 n6,n7 trigger
class n0,n1 decision
class n5 api
classDef customIcon fill:none,stroke:none
class n2,n5 customIcon
Why This Matters: LinkedIn Interest That Never Makes It to Your CRM
Profile visitors are a weird kind of lead. They’re not a form fill, but they’re also not random traffic. Someone took the time to look you up, and that usually means curiosity, intent, or active research. The problem is LinkedIn doesn’t turn that into action for you. So you end up checking visitors “when you remember,” scanning names, opening tabs, and telling yourself you’ll add the good ones to HubSpot later. Later rarely happens. And even when it does, the records are thin, inconsistent, and hard to follow up on.
The friction compounds. Here’s where it breaks down.
- You lose warm leads simply because “who viewed my profile” isn’t part of your daily workflow.
- Manual CRM entry creates messy records, which means your sequences and lists become unreliable.
- Enrichment gets skipped because it’s slow, and nobody wants to research 30 people one by one.
- Following up late feels awkward, so you don’t do it (or you do it inconsistently).
What You’ll Build: Profile Visitor Enrichment into HubSpot Contacts
This workflow turns your LinkedIn profile visitors into real CRM contacts you can actually use. It starts on a schedule (weekly by default, but you can run it manually too) and pulls the last 7 days of visitors from ConnectSafely.ai. Those visitors are then processed one at a time so you can enrich each person properly instead of getting one big, unmanageable blob of data. For every visitor, Apify runs a LinkedIn enrichment actor to pull structured profile info like name, role, company, location, and, when available, a work email. Next, the workflow checks email validity and only sends the “good” records to HubSpot. Finally, HubSpot creates or updates the contact so you get one clean record per person, not duplicates scattered across your database.
The workflow starts with a scheduled pull from ConnectSafely.ai. Apify enriches each visitor into a usable contact record, then HubSpot upserts the contact if the email passes validation. Visitors without emails are skipped gracefully, so your CRM stays tidy.
What You’re Building
| What Gets Automated | What You’ll Achieve |
|---|---|
|
|
Expected Results
Say you average about 50 profile visitors a week. Manually, even a quick process looks like 2 minutes to open each profile plus 3 minutes to copy details into HubSpot, so you’re staring at roughly 4 hours weekly (and that’s before “just one more tab” happens). With this workflow, you’ll spend maybe 10 minutes to scan the new HubSpot contacts and decide who gets a sequence. The enrichment and syncing runs in the background, so the time you get back is real.
Before You Start
- n8n instance (try n8n Cloud free)
- Self-hosting option if you prefer (Hostinger works well)
- ConnectSafely.ai to retrieve LinkedIn profile visitors.
- Apify for LinkedIn enrichment actor runs.
- HubSpot to create or update CRM contacts.
- ConnectSafely.ai API key (get it from Settings → API Keys).
- Apify API token (get it from Apify Settings → Integrations → API).
- HubSpot private app token (get it from Settings → Integrations → Private Apps).
Skill level: Beginner. You’ll connect accounts, paste API tokens, and map a few contact fields.
Want someone to build this for you? Talk to an automation expert (free 15-minute consultation).
Step by Step
A schedule (or manual run) kicks things off. The workflow can run weekly by default, and you can switch it to daily if your profile gets a lot of traffic.
LinkedIn visitors get pulled in via ConnectSafely.ai. n8n makes an HTTP request to fetch recent profile visitors (past 7 days is the standard setup), then splits the response into individual visitor records so each person is handled consistently.
Apify enriches each visitor. The workflow loops through visitors in batches and runs an Apify actor (a LinkedIn profile scraper/enricher) to return structured contact details you can use for targeting and follow-up.
Only validated contacts go into HubSpot. An email validation check filters out incomplete records, then HubSpot creates or updates the contact with fields like name, title, company, location, LinkedIn URL, and a default lead status (NEW).
You can easily modify the lookback period from past 7 days to 30 or 90 days based on your needs. See the full implementation guide below for customization options.
Step-by-Step Implementation Guide
Step 1: Configure the Scheduled Trigger
Set up the schedule and manual trigger to start the workflow that fetches LinkedIn visitor data.
- Add and open Scheduled Automation Trigger.
- Set the Rule interval field to
weeksso it runs weekly. - Keep Manual Execution Start connected for on-demand testing and manual runs.
- Ensure both Scheduled Automation Trigger and Manual Execution Start connect to External API Call.
Step 2: Connect the External Data Source
Configure the API call that retrieves visitor profiles from the external service.
- Open External API Call and set URL to
https://api.connectsafely.ai/linkedin/profile/visitors. - Set Method to
POSTand enable Send Body and Send Headers. - Set Specify Body to
jsonand JSON Body to{"timeRange":"past_7_days","start":0,"fetchAll":true}. - Credential Required: Connect your httpBearerAuth credentials.
Step 3: Split and Iterate Through Visitors
Split the returned array of visitors and iterate through each record in batches.
- Open 📤 Split Visitor Records and set Field to Split Out to
visitors. - Confirm 📤 Split Visitor Records connects to Iterate Through Records.
- In Iterate Through Records, keep the default batch settings to process each visitor item sequentially.
- Ensure the second output of Iterate Through Records connects to Execute Actor Fetch Dataset for enrichment.
Step 4: Enrich and Validate CRM Data
Enrich each visitor profile via Apify and validate that an email exists before pushing to CRM.
- Open Execute Actor Fetch Dataset and set Operation to
Run actor and get dataset. - Set Custom Body to
={ "linkedin": "{{ $json.navigationUrl }}" }. - Credential Required: Connect your apifyApi credentials.
- Open Validate Contact for CRM and ensure the condition checks
={{ $json['04_Email'] }}with the exists operator.
Step 5: Configure the CRM Upsert and Loop Control
Push validated contacts to HubSpot and continue the batching loop.
- Open Upsert CRM Contact and set Email to
={{ $json['04_Email'] }}. - Set Authentication to
appTokenand map fields such as First Name={{ $json['02_First_name'] }}and Last Name={{ $json['03_Last_name'] }}. - Keep Lead Status as
NEWin Additional Fields. - Credential Required: Connect your hubspotAppToken credentials.
- Ensure Upsert CRM Contact routes to Placeholder Step, then back to Iterate Through Records to continue processing.
Step 6: Test and Activate Your Workflow
Run a manual test and then activate the schedule for production use.
- Click Execute Workflow and use Manual Execution Start to test a run.
- Verify External API Call returns visitor data, Execute Actor Fetch Dataset enriches each record, and Upsert CRM Contact creates or updates HubSpot contacts.
- Check that records without emails follow the false path in Validate Contact for CRM to Placeholder Step without CRM updates.
- Once verified, switch the workflow to Active to enable Scheduled Automation Trigger for weekly runs.
Troubleshooting Tips
- ConnectSafely.ai credentials can expire or lose access. If no visitors come back, check the ConnectSafely.ai dashboard first to confirm your LinkedIn account is connected and has recent views.
- If you’re using Wait nodes or external rendering, processing times vary. Bump up the wait duration if downstream nodes fail on empty responses.
- Apify can return empty results when the LinkedIn URL format is off or the profile is private. Confirm you’re passing a full URL (like https://www.linkedin.com/in/username) and that your actor is the one you expect.
- HubSpot upserts rely on email as the unique identifier. If you see duplicates, it’s usually a mapping issue where email is missing or being written to the wrong property.
Quick Answers
About 30 minutes if you already have the API keys ready.
No. You’ll mainly paste tokens, connect HubSpot, and confirm field mappings.
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 Apify costs (about $1 per 1,000 records) and any ConnectSafely.ai plan you’re on.
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.
Yes, and it’s pretty straightforward. You can change the schedule in the “Run Weekly” node, adjust the lookback period in the “External API Call” request body (past_7_days to past_30_days, for example), and remap HubSpot properties inside “Upsert CRM Contact.” Common tweaks include setting a different lead status, writing the LinkedIn URL into a custom property, or adding a Slack notification after the contact is created.
Usually it’s the private app token scopes. Make sure your token includes crm.objects.contacts.read and crm.objects.contacts.write, then reselect the credential in the “Upsert CRM Contact” node. If it still fails, check whether HubSpot is rejecting the payload because email is missing or malformed. Rate limiting is rarer here than on enrichment, but it can happen if you push a lot of contacts at once.
Most small teams run hundreds of visitors a month without issues; if you self-host, the main limits are your server and Apify throughput.
Often, yes, because this workflow needs looping, filtering, and “create or update” behavior that gets expensive or awkward in simpler tools. n8n handles batches and branching cleanly, so you can enrich one visitor at a time and only upsert to HubSpot when the email is valid. You can also self-host, which is a big deal when you don’t want executions capped. Zapier or Make can still be fine if you’re doing a basic two-step sync with low volume and no enrichment. If you want help choosing, Talk to an automation expert and we’ll sanity-check the best option for your setup.
Once this is running, profile views stop being “nice to know” and start becoming a follow-up list you can actually work. Set it up once, then let HubSpot stay up to date on its own.
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.