Transform LinkedIn post engagement into qualified leads automatically. Extract, enrich, and export commenters' profiles with full data in minutes.
Turn every LinkedIn post into a lead generation machine. This intelligent automation identifies engaged prospects from post comments and delivers enriched profiles ready for outreach.
- Overview
- Key Features
- How It Works
- Tech Stack
- System Architecture
- Prerequisites
- Installation & Setup
- Usage Guide
- Demo Video
- Output Data Fields
- API Configuration
- Troubleshooting
- Use Cases
- Contributing
- License
LinkedIn Comments to Leads Extractor is a fully automated lead generation system that converts LinkedIn post engagement into actionable sales prospects. Simply provide LinkedIn post URLs, and the system extracts all commenters, enriches their profiles with complete data, and exports everything to Google Sheets.
- π― Sales Teams - Find warm leads already engaging with your content
- π Marketing Agencies - Build targeted prospect lists from competitor posts
- πΌ B2B Businesses - Identify decision-makers engaging with industry content
- π Growth Hackers - Scale outreach with qualified, engaged prospects
- π₯ Recruiters - Find candidates commenting on relevant posts
Traditional LinkedIn lead generation requires:
- Manually copying commenter profiles one by one
- Visiting each profile to collect contact information
- Organizing data in spreadsheets manually
- Hours of repetitive work per post
This system automates everything in minutes, extracting and enriching hundreds of profiles automatically.
- Zero manual copying or data entry
- Intelligent pagination for posts with 100+ comments
- Automatic profile deduplication
- Batch processing for optimal performance
- Full name, headline, and location
- Current company and position
- Profile picture and background image
- Complete work experience history
- Education and certifications
- Follower and connection counts
- Creator/influencer/premium status
- Handles multiple post formats (URLs, IDs, activity links)
- Configurable comment limit per post
- Extracts unique profiles automatically
- Filters out duplicate commenters across posts
- Direct LinkedIn post URLs
- Post activity IDs
- Numeric post identifiers
- Batch processing of multiple posts
- Automatically creates dated spreadsheet
- Organized lead data in clean format
- Ready for CRM import or outreach campaigns
- Instant access to results
- Powered by Apify's LinkedIn scrapers
- No cookies or login required
- Handles rate limiting automatically
- Scalable to thousands of profiles
| Category | Technology | Purpose |
|---|---|---|
| Automation | n8n | Workflow orchestration and logic |
| Scraping | Apify | LinkedIn data extraction |
| - Comments Scraper | Extract post comments and authors | |
| - Profile Scraper | Enrich profile data | |
| Export | Google Sheets | Lead list storage and sharing |
| Triggers | n8n Form | User-friendly web interface |
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β USER INPUT (FORM) β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ€
β β
β β’ LinkedIn Post URLs/IDs β
β β’ Number of comments to scrape (default: 100) β
β β
βββββββββββββββββββββββββ¬ββββββββββββββββββββββββββββββββββββββββββ
β
β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β N8N WORKFLOW PROCESSING β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ€
β β
β Step 1: Parse Input β
β βββ Clean URLs/IDs, set scrape limits β
β β
β Step 2: Scrape Comments (Apify) β
β βββ Extract all comments from post(s) β
β βββ Handle pagination (100 per page) β
β βββ Gather all commenter profile URLs β
β β
β Step 3: Deduplicate Profiles β
β βββ Create unique list of commenters β
β βββ Remove duplicate profiles β
β β
β Step 4: Batch Processing β
β βββ Split profiles into batches of 500 β
β βββ Optimize for Apify API limits β
β β
β Step 5: Profile Enrichment (Apify) β
β βββ Fetch full LinkedIn profile data β
β βββ Extract all available fields β
β βββ Aggregate results β
β β
β Step 6: Data Preparation β
β βββ Flatten nested objects β
β βββ Format for Google Sheets β
β β
β Step 7: Export to Google Sheets β
β βββ Create new spreadsheet β
β βββ Name: "LinkedIn-Posts-Comments-Leads-[DATE]" β
β βββ Populate with all lead data β
β β
βββββββββββββββββββββββββ¬ββββββββββββββββββββββββββββββββββββββββββ
β
β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β GOOGLE SHEETS OUTPUT β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ€
β β
β Enriched Lead List with 28+ Data Fields β
β β’ Personal Info β’ Company Data β’ Experience β
β β’ Education β’ Location β’ Social Stats β
β β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
Before installation, ensure you have:
- β n8n Instance - Self-hosted or n8n Cloud
- β Apify Account - With API token (free tier available)
- β Google Account - For Google Sheets export
- β Google Sheets API - OAuth credentials configured in n8n
This workflow uses two Apify actors:
- LinkedIn Post Comments Scraper (
apimaestro~linkedin-post-comments-replies-engagements-scraper-no-cookies) - LinkedIn Profile Batch Scraper (
apimaestro~linkedin-profile-batch-scraper-no-cookies-required)
Both are available on Apify Marketplace.
Download the LinkedIn Comments to Leads Extractor.json file from this repository.
- Open your n8n instance
- Click "Workflows" β "Import from File"
- Select the downloaded JSON file
- Click "Import"
- Get your Apify API token from https://console.apify.com/account/integrations
- In the workflow, find the "Set APIFY Token" node
- Replace the empty
APIFY_TOKENvalue with your token:"APIFY_TOKEN": "your_apify_api_token_here"
- In n8n, go to Settings β Credentials
- Create new "Google Sheets OAuth2 API" credential
- Follow the OAuth flow to authorize n8n
- The workflow nodes are already configured to use Google Sheets
- Click "Active" toggle in top-right corner
- Your workflow is now live and ready to use!
- Open your workflow in n8n
- Find the "On form submission" node
- Click on it to see the Production URL
- Copy and share this URL (it's your lead generation form)
Navigate to the form URL and enter:
Post IDs/URLs (textarea):
7334385757769416704
https://www.linkedin.com/posts/username_title-activity-7334385757769416704-dMnz
https://www.linkedin.com/feed/update/urn:li:activity:7318557377971023872/
How many comments to scrape (number):
100
Default is 100 if left empty
- Click "Submit"
- The workflow begins processing immediately
- You'll be automatically redirected to Google Sheets when complete
- Find your results in: "LinkedIn-Posts-Comments-Leads-[TODAY'S DATE]"
The system accepts multiple LinkedIn URL formats:
7334385757769416704
https://www.linkedin.com/feed/update/urn:li:activity:7334385757769416704/
https://www.linkedin.com/posts/username_title-activity-7334385757769416704-dMnz
All formats work! The system automatically extracts the post ID.
For testing purposes, you can use the manual trigger:
- Enable the "Trigger manually" node (currently disabled)
- Update the "Set manual fields" node with test URLs
- Click "Execute Workflow"
- View results in Google Sheets
- 0:00 - Introduction & Use Case
- 0:45 - Submitting the form with LinkedIn posts
- 1:30 - Workflow processing in n8n
- 2:15 - Profile enrichment in action
- 3:00 - Google Sheets export
- 4:30 - Using the data for outreach
Your Google Sheets export includes 28+ enriched data fields:
profileUrl- Direct link to LinkedIn profilebasic_info_fullname- Full namebasic_info_first_name- First namebasic_info_last_name- Last namebasic_info_headline- Professional headlinebasic_info_public_identifier- LinkedIn usernamebasic_info_about- Profile summary/bio
basic_info_profile_picture_url- Profile photo URLbasic_info_background_picture_url- Banner image URL
basic_info_location_country- Countrybasic_info_location_city- Citybasic_info_location_full- Full location stringbasic_info_location_country_code- ISO country code
basic_info_current_company- Current employer namebasic_info_current_company_url- Company LinkedIn URLbasic_info_current_company_urn- Company identifier
basic_info_follower_count- Number of followersbasic_info_connection_count- Connection countbasic_info_show_follower_count- Public follower display setting
basic_info_is_creator- LinkedIn creator statusbasic_info_is_influencer- Influencer badgebasic_info_is_premium- Premium subscription statusbasic_info_creator_hashtags- Featured hashtags
experience- Full work experience (JSON array)education- Educational background (JSON array)certifications- Professional certifications (JSON array)
basic_info_created_timestamp- Profile creation datebasic_info_urn- LinkedIn URN identifier
The workflow uses Apify's REST API with token-based authentication:
// In "Set APIFY Token" node
{
"APIFY_TOKEN": "your_apify_api_token_here"
}API Endpoints Used:
- Comments Scraper
POST https://api.apify.com/v2/acts/apimaestro~linkedin-post-comments-replies-engagements-scraper-no-cookies/run-sync-get-dataset-items?token=YOUR_TOKEN
- Profile Scraper
POST https://api.apify.com/v2/acts/apimaestro~linkedin-profile-batch-scraper-no-cookies-required/run-sync-get-dataset-items?token=YOUR_TOKEN
Uses OAuth2 flow configured in n8n credentials manager:
- Go to n8n Settings β Credentials
- Add "Google Sheets OAuth2 API"
- Follow authorization flow
- Credential is referenced in workflow automatically
Problem: Form doesn't trigger workflow
Solution:
- Verify workflow is Active (toggle in top-right)
- Check webhook URL is accessible
- Test with manual trigger first
- Review n8n execution logs
Problem: Apify returns empty results
Solution:
- Verify LinkedIn post URLs are public
- Check Apify API token is valid
- Ensure post has comments (try with known post)
- Verify post ID format is correct
Problem: Google Sheets has incomplete profile data
Solution:
- Check Apify account has sufficient credits
- Verify profile URLs are valid
- Review batch processing (should be 500 per batch)
- Check for rate limiting in Apify dashboard
Problem: "Could not create spreadsheet" error
Solution:
- Re-authenticate Google Sheets credentials in n8n
- Verify Google Drive has storage space
- Check OAuth scopes include Sheets creation
- Test with manual Google Sheets node creation
Problem: Only getting first 100 comments when post has more
Solution:
- Check "More runs needed?" conditional logic
- Verify
limitparameter is > 100 - Review loop counter in "Set pagination" node
- Check Apify actor supports pagination
Extract engaged leads from your company's LinkedIn posts. These are warm prospects already familiar with your brand.
Scrape comments from competitor posts to identify their engaged audience and build targeted outreach lists.
Find engaged followers of industry influencers by extracting commenters from their viral posts.
Collect attendee lists from LinkedIn event posts and announcements for follow-up campaigns.
Identify active community members from industry thought leaders' posts to invite to your own community.
Find candidates engaging with job postings or industry content to build talent pipelines.
Identify creators and influencers engaging with specific topics for potential partnerships.
Analyze who's commenting on industry trends to understand your target audience better.
- Target engaging posts - Posts with 100+ comments yield better leads
- Use recent posts - Fresh engagement = warmer leads
- Batch multiple posts - Process 5-10 posts at once for efficiency
- Export regularly - Create dated sheets for campaign tracking
- Verify data quality - Spot-check first few results before scaling
- Respect privacy - Use data ethically for legitimate business purposes
- LinkedIn ToS - Automated scraping may violate LinkedIn's terms of service
- Rate limits - Apify has usage quotas; monitor your consumption
- Data freshness - Profile data reflects scrape time; may become outdated
- GDPR compliance - If targeting EU profiles, ensure GDPR compliance
We welcome contributions to improve this workflow!
- Report Bugs - Open an issue with detailed reproduction steps
- Suggest Features - Share ideas for enhancements
- Submit Improvements - Fork, modify, and submit pull requests
- Share Use Cases - Document how you're using the workflow
- Test changes with manual trigger before submitting
- Document any new nodes or logic clearly
- Maintain compatibility with existing Apify actors
- Update README with any new features
This project is licensed under the MIT License - see the LICENSE file for details.
β
Commercial use allowed
β
Modification allowed
β
Distribution allowed
β
Private use allowed
- π§ Email: support@yourdomain.com
- π¬ Discord: Join our community
- π GitHub Issues: Report bugs
- π Documentation: Full docs
Built with powerful tools:
- n8n - Workflow automation platform
- Apify - Web scraping and automation
- Google Sheets - Data export and sharing
Special thanks to:
- Apify's apimaestro for LinkedIn scraping actors
- n8n community for workflow inspiration
- Email finding integration (Hunter.io, Apollo.io)
- CRM direct export (HubSpot, Salesforce, Pipedrive)
- AI-powered lead scoring
- Automated outreach sequences
- Slack/Discord notifications
- Multi-language support
- Custom field mapping
- Duplicate detection across campaigns
- Lead tracking dashboard
- Export to CSV/Excel formats
Average Processing Time:
- 100 comments: ~2-3 minutes
- 500 comments: ~8-10 minutes
- 1000 comments: ~15-18 minutes
Batch Efficiency:
- Profiles per batch: 500
- Concurrent processing: Yes
- Deduplication: Automatic
Export Speed:
- Google Sheets: <30 seconds
- Ready for immediate use
Made with β€οΈ for Sales and Marketing Teams
β Star this repo if it helps your lead generation!
π’ Share with teams who need automated prospecting!
π Fork and customize for your workflow!
Need custom modifications or enterprise support?
Contact us at: letsautomatewithawais@gmail.com
