Skip to main content

Sync LinkedIn profile visitors into HubSpot CRM leads with ConnectSafely.ai and Apify

Workflow preview

Workflow preview
100%
Sync LinkedIn profile visitors into HubSpot CRM leads with ConnectSafely.ai and Apify preview
Open on n8n.io

Important notice

This workflow is provided as-is. Please review and test before using in production.

1. Workflow Overview

Sync LinkedIn Profile Visitors to HubSpot CRM Who's it for This workflow is built for sales professionals, recruiters, founders, and marketers who want to automatically capture LinkedIn profile vis...

Best for

  • Lead Generation automation workflows
  • intermediate n8n builders looking for reusable templates

Tools used

@apify/n8n-nodes-apify.apify, n8n-nodes-base.if, n8n-nodes-base.hubspot, n8n-nodes-base.noop, n8n-nodes-base.splitout, n8n-nodes-base.httprequest, n8n-nodes-base.scheduletrigger, n8n-nodes-base.manualtrigger

Source and attribution

This workflow is cataloged by N8N Workflows and links back to its original n8n.io source page by ConnectSafely.

Original n8n.io source

1.1 Workflow description

Title
Sync LinkedIn profile visitors into HubSpot CRM leads with ConnectSafely.ai and Apify
Workflow name
Sync LinkedIn profile visitors into HubSpot CRM leads with ConnectSafely.ai and Apify

Sync LinkedIn Profile Visitors to HubSpot CRM

Who's it for

This workflow is built for sales professionals, recruiters, founders, and marketers who want to automatically capture LinkedIn profile visitors and convert them into actionable CRM leads. Perfect for anyone tired of manually checking who viewed their profile, copying data one by one, and losing warm leads because they never made it into your pipeline.

If you're running outbound sales, recruiting talent, building partnerships, or simply want to know who's checking you out on LinkedIn, this automation captures every visitor and enriches them with full professional data before syncing to your CRM.

How it works

The workflow automatically syncs your LinkedIn profile visitors to HubSpot CRM with enriched professional data.

The process flow:

  1. Scheduled trigger runs weekly (or manually) to fetch recent visitors
  2. ConnectSafely.ai API retrieves all profile visitors from the past 7 days
  3. Splits visitors into individual records for processing
  4. Apify actor enriches each visitor with complete LinkedIn profile data (email, company, title, location)
  5. Email validation filters contacts - only those with valid emails proceed
  6. HubSpot integration creates or updates contacts with full enriched information
  7. Loop continues until all visitors are processed

Setup steps

Step 1: Configure ConnectSafely.ai API Credentials

Obtain API Key
  1. Log into ConnectSafely.ai Dashboard
  2. Navigate to SettingsAPI Keys
  3. Generate a new API key
Add Bearer Auth Credential in n8n
  1. Go to Credentials in n8n
  2. Click Add CredentialHeader Auth or HTTP Bearer Auth
  3. Name it "ConnectSafely.ai API"
  4. Paste your ConnectSafely.ai API key
  5. Save the credential

This credential is used by the "Fetch Profile Visitors" HTTP Request node.

Step 2: Configure Apify Integration

Get Apify API Key
  1. Sign up at Apify.com
  2. Go to SettingsIntegrationsAPI
  3. Copy your API token
Find the LinkedIn Enrichment Actor
  1. Go to Apify Store
  2. Search for "LinkedIn Profile Scraper" or use actor ID: UMdANQyqx3b2JVuxg
  3. Copy the actor URL
Add Apify Credential in n8n
  1. Go to CredentialsAdd CredentialApify API
  2. Paste your Apify API token
  3. Save the credential
Configure the Apify Node
  1. Open the Enrich LinkedIn Profile node
  2. Select your Apify credential
  3. Update the Actor ID URL with your chosen LinkedIn scraper actor

Step 3: Configure HubSpot Integration

Create HubSpot App Token
  1. Go to HubSpot SettingsIntegrationsPrivate Apps
  2. Click Create a private app
  3. Name it "n8n LinkedIn Sync"
  4. Under Scopes, enable:
    • crm.objects.contacts.read
    • crm.objects.contacts.write
  5. Click Create app and copy the access token
Add HubSpot Credential in n8n
  1. Go to CredentialsAdd CredentialHubSpot App Token
  2. Paste your access token
  3. Save the credential
Connect to HubSpot Node
  1. Open the Create HubSpot Contact node
  2. Select your HubSpot App Token credential

Step 4: Configure the Schedule

  1. Open the Run Weekly node
  2. Adjust the schedule based on your needs:
    • Default: Every week
    • High traffic profiles: Every day
    • Low traffic: Every 2 weeks

Step 5: Test the Workflow

  1. Click the Test Manually node
  2. Click Test Workflow
  3. Verify:
    • Profile visitors are fetched correctly
    • Enrichment returns full profile data
    • Contacts with emails are created in HubSpot
    • Contacts without emails are skipped gracefully

Customization

Time Range Adjustment

Edit the JSON body in the Fetch Profile Visitors node to change the lookback period:

{"timeRange":"past_7_days","start":0,"fetchAll":true}

Options:

  • past_7_days - Last week's visitors (default)
  • past_30_days - Last month's visitors
  • past_90_days - Last quarter's visitors

Additional HubSpot Fields

The Create HubSpot Contact node maps these fields by default:

  • First Name
  • Last Name
  • Email
  • Job Title
  • Company Name
  • City
  • Country
  • Street Address
  • LinkedIn URL
  • Lead Status (set to "NEW")

To add more fields:

  1. Open the Create HubSpot Contact node
  2. Click Add Field under Additional Fields
  3. Map Apify output fields to HubSpot properties

Different CRM Integration

To use a different CRM instead of HubSpot:

  1. Delete the Create HubSpot Contact node
  2. Add your CRM node (Salesforce, Pipedrive, Zoho, etc.)
  3. Map the enriched fields to your CRM's contact properties
  4. Connect it to the "Has Valid Email" true output

Add Slack Notifications

Want to get notified when high-value visitors are captured?

  1. Add a Slack node after Create HubSpot Contact
  2. Filter for specific job titles or companies
  3. Send a message to your sales channel

Use Cases

  • Sales Prospecting: Automatically capture decision-makers who are researching you before outreach
  • Recruiting: Build a passive candidate pipeline from people checking out your profile
  • Founder Networking: Know when investors, partners, or potential hires are interested
  • Account-Based Marketing: Track when target account contacts view your profile
  • Event Follow-up: Capture visitors who checked you out after conferences or webinars

Troubleshooting

Common Issues & Solutions

Issue: No visitors returned from API

  • Solution: Ensure your LinkedIn account is connected in ConnectSafely.ai dashboard and has had recent profile views

Issue: Apify enrichment returning empty results

  • Solution: Verify the LinkedIn URL format is correct (should be full URL like https://www.linkedin.com/in/username). Check your Apify actor is running properly.

Issue: "Profile not found" errors

  • Solution: Some LinkedIn profiles may be private or have restricted visibility. These will be skipped automatically.

Issue: HubSpot contact not created

  • Solution: Check that your HubSpot App Token has crm.objects.contacts.write scope enabled

Issue: Duplicate contacts in HubSpot

  • Solution: HubSpot uses email as the unique identifier. The node is configured to "Create or Update" so duplicates should be updated, not created. Verify the email field is mapping correctly.

Issue: Rate limit errors from Apify

  • Solution: Add a Wait node after the loop with 2-5 second delays between enrichment calls

Issue: Missing email addresses for most visitors

  • Solution: This is normal - enrichment typically finds emails for 60-70% of profiles. Consider adding LinkedIn URL as a fallback identifier in your CRM.

Costs & Considerations

Service Cost
ConnectSafely.ai Free trial available, then subscription
Apify Enrichment ~$1 per 1,000 records
HubSpot Free tier works, or existing subscription
n8n Free (self-hosted) or cloud pricing

Estimated monthly cost for 200 visitors/month: ~$0.20 for Apify enrichment


Documentation & Resources

Official Documentation

Support Channels


Connect With Us

Stay updated with the latest automation tips and LinkedIn strategies:


Need Custom Workflows?

Looking to build sophisticated LinkedIn automation workflows tailored to your business needs?

Contact our team for custom automation development, strategy consulting, and enterprise solutions.

We specialize in:

  • Multi-channel engagement workflows
  • AI-powered personalization at scale
  • Lead scoring and qualification automation
  • CRM integration and data synchronization
  • Custom reporting and analytics pipelines

1.2 Logical Blocks

This catalog entry is organized from the workflow JSON. The node-level section below shows the executable blocks available for review before importing the template.

2. Block-by-Block Analysis

Block 1 - Run an Actor and get dataset

Type / Role
@apify/n8n-nodes-apify.apify - apify
Config choices
Version 1

Block 2 - Check if Contact is eligible to add into CRM

Type / Role
n8n-nodes-base.if - if
Config choices
Version 2.2

Block 3 - Create or update a contact

Type / Role
n8n-nodes-base.hubspot - hubspot
Config choices
Version 2.1

Block 4 - Replace Me

Type / Role
n8n-nodes-base.noOp - noOp
Config choices
Version 1

Block 5 - 📤 Split Comments Array

Type / Role
n8n-nodes-base.splitOut - splitOut
Config choices
Version 1

Block 6 - HTTP Request

Type / Role
n8n-nodes-base.httpRequest - httpRequest
Config choices
Version 4.2

Block 7 - Schedule Trigger

Type / Role
n8n-nodes-base.scheduleTrigger - scheduleTrigger
Config choices
Version 1.2

Block 8 - When clicking ‘Execute workflow’

Type / Role
n8n-nodes-base.manualTrigger - manualTrigger
Config choices
Version 1

Block 9 - Loop Over Items

Type / Role
n8n-nodes-base.splitInBatches - splitInBatches
Config choices
Version 3

Block 10 - Workflow Overview

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 11 - Section 1 - Trigger

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 12 - Section 2 - Fetch Visitors

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 13 - Section 3 - Enrich and Validate

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 14 - Section 4 - CRM Sync

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

3. Summary Table

Workflow Sync LinkedIn profile visitors into HubSpot CRM leads with ConnectSafely.ai and Apify
Complexity intermediate
Nodes 14
Categories Lead Generation
Author ConnectSafely
Published 30 Dec 2025

4. Reproducing the Workflow from Scratch

  1. 1. Download the workflow JSON

    Use the JSON export at /data/workflows/12309/12309.json as the source template for this automation.

  2. 2. Import the template into n8n

    Open n8n, import the downloaded JSON, and review each node before activating the workflow.

  3. 3. Configure credentials and variables

    Replace placeholder credentials, API keys, webhook URLs, account IDs, and environment-specific values with your own settings.

  4. 4. Test with sample data

    Run the workflow manually or in a staging workspace, inspect node output, and confirm downstream systems receive the expected data.

  5. 5. Activate and monitor

    Enable the workflow only after testing, then monitor executions, errors, and rate limits during the first production runs.

5. General Notes & Resources

Review imported nodes carefully before activation. This catalog entry is intended to help you inspect the workflow structure, understand required services, and find related templates faster.

Node names, credentials, schedules, webhook paths, and external service limits may need adjustment for your workspace.

Frequently asked questions

What does Sync LinkedIn profile visitors into HubSpot CRM leads with ConnectSafely.ai and Apify do?

Sync LinkedIn Profile Visitors to HubSpot CRM Who's it for This workflow is built for sales professionals, recruiters, founders, and marketers who want to automatically capture LinkedIn profile vis...

What do I need before importing this workflow?

Review the workflow JSON, configure any required credentials in n8n, and test the automation in a safe workspace before using it in production.

Can I customize this workflow?

Yes. Use the block-by-block analysis and the downloadable JSON to inspect each node, then adjust credentials, prompts, schedules, filters, or destinations for your Lead Generation use case.