Skip to content

arvindjangir9772/LinkedIn-Automation-Bot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🤖 LinkedIn Automation Bot (Go + Playwright)

An advanced, "Human-in-the-Loop" LinkedIn automation tool built with Golang and Playwright. It automates networking while maintaining a stealthy, human-like behavior to avoid detection.

🎬 Demo

Check out the bot in action: Watch Demonstration Video

📖 Overview / Description

This project provides a robust, professional-grade solution for automating LinkedIn networking activities. Unlike traditional bots that trigger immediate bans, this tool focuses on stealth and realism. It uses Playwright to mimic a real desktop browser and implements a "wait-and-verify" strategy, allowing users to handle 2FA and manual login transitions while the bot manages the repetitive searching, engagement, and connection tasks.

✨ Key Features

  • 🧠 Auto-Targeting Logic: Scans your profile headlines and experience to automatically determine relevant target keywords (e.g., "Data Analyst" -> "Senior Data Scientist").
  • ⚡ Pre-Engagement (Liking): Automatically finds and likes the most recent post of a target lead to build rapport before connecting.
  • 🤝 Robust Connectivity: Advanced selector discovery for "Connect" buttons, even when hidden in "More" menus or Creator Mode layouts.
  • 💬 Follow-up Messaging: Detects existing connections and sends personalized direct messages instead of connection requests.
  • 🚀 Performance Optimized: Uses a natural desktop viewport (NoViewport) and 3x faster element-based triggers instead of slow global waits.
  • 🛡️ Safety & Stealth Mode:
    • Randomized Bezier-curve mouse movements and variable typing speeds.
    • Intelligent profile skipping to avoid repetitive patterns.
    • SQLite persistence to prevent double-messaging.

💻 Tech Stack

  • Language: Go (Golang) - For high-speed concurrency and performance.
  • Automation: Playwright-Go - For robust browser interactions.
  • Database: SQLite - Lightweight persistence for history and engagement tracking.
  • Containerization: Docker - For easy deployment and cloud portability.

🏗️ Architecture / Workflow

graph TD
    A[Start Bot] --> B{Check Session}
    B -- No --> C[Manual Login/Passive Mode]
    B -- Yes --> D[Target Acquisition]
    D --> E[Self-Profile Analysis]
    D --> F[Keyword Override]
    E --> G[Search Loop]
    F --> G
    G --> H[Profile Visit]
    H --> I[Like Recent Post]
    I --> J{Already Connected?}
    J -- No --> K[Send Connection Note]
    J -- Yes --> L[Send Follow-up Message]
    K --> M[Log to SQLite]
    L --> M
    M --> N[Random Sleep/Skip]
    N --> G
Loading

📂 Project Structure

  • cmd/linkedin-bot/: Main entry point and orchestration logic.
  • pkg/browser/: Playwright initialization and viewport/stealth configurations.
  • pkg/linkedin/: Core LinkedIn business logic (Search, Connect, Message, Like).
  • pkg/stealth/: Human-like interaction utilities (Mouse curves, typing jitter).
  • pkg/auth/: Passive login and session management.
  • pkg/store/: SQLite database handlers.
  • pkg/config/: YAML configuration management.

⚙️ Installation / Setup

Prerequisites

  • Go 1.21+
  • Chrome/Chromium

Steps

  1. Clone the Repo:
    git clone https://github.com/arvindjangir9772/LinkedIn-Automation-Bot.git
    cd LinkedIn-Automation-Bot
  2. Install Dependencies:
    go mod download
    go run github.com/playwright-community/playwright-go/cmd/playwright install
  3. Configure:
    cp config.example.yaml config.yaml
    # Edit config.yaml if needed

🛠️ Usage

Running Locally

go run ./cmd/linkedin-bot
# OR build and run
go build -o linkedin-bot.exe ./cmd/linkedin-bot
./linkedin-bot.exe

📩 Input & Output

  • Input: config.yaml for behavior settings; search terms derived from your profile or provided keywords.
  • Output: Real-time console logs, screenshots of failed actions, and engagement history in engagement.db.

📊 Results / Performance

  • Efficiency: 3x faster navigation compared to standard Playwright scripts.
  • Stealth: Successfully bypasses common bot-detection heuristics through dynamic viewport and randomized interaction patterns.
  • Reliability: Self-healing navigation that retries on ERR_ABORTED.

🧠 Challenges & Solutions

  • UI Volatility: LinkedIn changes selectors frequently. Solution: Implemented a multi-selector fallback system (ARIA labels + CSS + Text).
  • Navigation Conflicts: Overlapping Goto calls causing crashes. Solution: Added "Cool-down" delays and transition settlement logic.
  • Bot Detection: Fixed head/viewport patterns are easily flagged. Solution: Natural NoViewport: true scaling and randomized Bezier mouse paths.

🚀 Future Enhancements

  • Full Dockerization for cloud portability.
  • Multi-account rotation support.
  • Advanced AI integration for hyper-personalized messaging.
  • Web Dashboard for real-time monitoring and metrics.

⚠️ Limitations

  • Subject to LinkedIn's daily search and connection request limits.
  • Requires a GUI environment unless running in a specialized Docker container.

👨‍💻 Contributors / Author

📝 License

MIT License. See LICENSE for details.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors