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.
Check out the bot in action: Watch Demonstration Video
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.
- 🧠 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.
- 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.
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
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.
- Go 1.21+
- Chrome/Chromium
- Clone the Repo:
git clone https://github.com/arvindjangir9772/LinkedIn-Automation-Bot.git cd LinkedIn-Automation-Bot - Install Dependencies:
go mod download go run github.com/playwright-community/playwright-go/cmd/playwright install
- Configure:
cp config.example.yaml config.yaml # Edit config.yaml if needed
go run ./cmd/linkedin-bot
# OR build and run
go build -o linkedin-bot.exe ./cmd/linkedin-bot
./linkedin-bot.exe- Input:
config.yamlfor 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.
- 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.
- UI Volatility: LinkedIn changes selectors frequently. Solution: Implemented a multi-selector fallback system (ARIA labels + CSS + Text).
- Navigation Conflicts: Overlapping
Gotocalls causing crashes. Solution: Added "Cool-down" delays and transition settlement logic. - Bot Detection: Fixed head/viewport patterns are easily flagged. Solution: Natural
NoViewport: truescaling and randomized Bezier mouse paths.
- Full Dockerization for cloud portability.
- Multi-account rotation support.
- Advanced AI integration for hyper-personalized messaging.
- Web Dashboard for real-time monitoring and metrics.
- Subject to LinkedIn's daily search and connection request limits.
- Requires a GUI environment unless running in a specialized Docker container.
- Arvind Jangir - Lead Developer - GitHub Profile
MIT License. See LICENSE for details.