Skip to content

maxlife11/zdor

 
 

Repository files navigation

ZDOR - LinkedIn Connection Analyzer

A powerful Node.js application that automatically scrapes LinkedIn profiles of new connections, analyzes them using AI (OpenAI), and integrates the data into GoHighLevel CRM with intelligent duplicate prevention.

🚀 Features

🔍 LinkedIn Profile Scraping

  • Automated LinkedIn profile data extraction
  • Handles authentication with existing Chrome browser
  • Extracts comprehensive profile information
  • Local storage to avoid re-scraping

🧠 AI-Powered Analysis

  • OpenAI integration for persona analysis
  • Pain point identification
  • Outreach angle generation
  • Email subject line suggestions
  • Intelligent tagging system

🔗 GoHighLevel CRM Integration

  • Automatic contact creation
  • Intelligent duplicate prevention
  • Search before create functionality
  • Custom fields and notes
  • Tag management

💾 Local Storage

  • SQLite database for persistence
  • Profile and analysis caching
  • Avoid re-scraping and re-analyzing
  • Offline capability

📋 Prerequisites

  • Node.js 18+
  • Chrome browser (for LinkedIn authentication)
  • OpenAI API key
  • GoHighLevel API credentials

🛠️ Installation

  1. Clone the repository:
git clone https://github.com/yourusername/zdor.git
cd zdor
  1. Install dependencies:
npm install
  1. Set up environment variables:
cp .env.example .env
# Edit .env with your API keys
  1. Initialize the database:
npm run setup

⚙️ Configuration

Create a .env file with the following variables:

# OpenAI Configuration
OPENAI_API_KEY=your_openai_api_key

# GoHighLevel Configuration
GHL_API_KEY=your_ghl_api_key
GHL_LOCATION_ID=your_location_id
GHL_PRIVATE_INTEGRATION_TOKEN=your_private_integration_token

# LinkedIn Configuration
LINKEDIN_PROFILE_COOKIE_STATE_PATH=./storage/linkedin-state.json

# App Configuration
RUN_INTERVAL_MINUTES=10
MAX_PROFILES_PER_HOUR=5
DATABASE_PATH=./storage/app.db

# Logging
LOG_LEVEL=info
LOG_FILE=./logs/app.log

🚀 Usage

Basic Usage:

# Start the application
npm start

# Development mode with auto-reload
npm run dev

Testing Scripts:

# Test LinkedIn login
npm run login

# Test profile scraping
npm run test-profile

# Test AI analysis
npm run save-profile

# Test GoHighLevel integration
npm run test-ghl

# Test contact search
npm run search-ghl

# Test search before create
npm run test-search-create

LinkedIn Authentication:

# Login to LinkedIn (uses your Chrome browser)
npm run login

# The system will save authentication state for future use

📊 Features in Detail

🔍 Intelligent Contact Management

  • Search Before Create: Always searches for existing contacts
  • Email-based Matching: Most reliable duplicate prevention
  • Name-based Fallback: Secondary matching strategy
  • Company-based Fallback: Additional matching options
  • Tag Management: Automatic tagging and organization

🧠 AI Analysis Capabilities

  • Persona Analysis: Detailed personality and role analysis
  • Pain Point Identification: Business challenges and opportunities
  • Outreach Angles: Personalized communication strategies
  • Email Subjects: Compelling subject line suggestions
  • Smart Tagging: Automatic categorization

💾 Local Storage Benefits

  • No Re-scraping: Saves profiles locally
  • No Re-analysis: Caches AI analysis results
  • Faster Processing: Instant retrieval of saved data
  • Offline Capability: Works without internet for saved profiles

🏗️ Architecture

src/
├── ai/                 # AI analysis modules
├── crm/                # GoHighLevel integration
├── db/                 # Database management
├── scrapers/           # LinkedIn scraping
├── utils/              # Utility functions
└── index.js            # Main application

scripts/
├── linkedin-login.js   # Authentication
├── test-profile.js    # Profile testing
├── save-profile.js    # Local storage testing
└── search-ghl.js      # Contact search testing

🔧 API Integration

OpenAI Integration

  • Uses GPT-4 for profile analysis
  • Generates comprehensive personas
  • Identifies pain points and opportunities
  • Creates personalized outreach content

GoHighLevel Integration

  • REST API for contact management
  • Custom fields for LinkedIn data
  • Notes with AI analysis
  • Tag-based organization
  • Duplicate prevention

📈 Performance

  • Local Storage: Avoids re-processing
  • Batch Processing: Handles multiple profiles
  • Rate Limiting: Respects API limits
  • Error Handling: Robust error management
  • Logging: Comprehensive logging system

🛡️ Security

  • Environment Variables: Secure API key storage
  • Local Storage: Data stays on your machine
  • Authentication: Secure LinkedIn login
  • API Security: Proper authentication headers

🤝 Contributing

  1. Fork the repository
  2. Create a feature branch
  3. Make your changes
  4. Add tests if applicable
  5. Submit a pull request

📄 License

MIT License - see LICENSE file for details

🆘 Support

For issues and questions:

  • Create an issue on GitHub
  • Check the documentation
  • Review the logs for debugging

🎯 Roadmap

  • LinkedIn API integration (when available)
  • Additional CRM integrations
  • Advanced AI analysis features
  • Web dashboard interface
  • Mobile app support

Built with ❤️ for efficient LinkedIn connection management

About

LinkedIn Connection Analyzer with AI and GoHighLevel integration - Automatically scrapes LinkedIn profiles, analyzes them with AI, and integrates into GoHighLevel CRM with intelligent duplicate prevention

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • JavaScript 100.0%