Automate bulk direct messaging on X (formerly Twitter) — professional CLI with progress tracking and reports.
Quick Start • Features • Configuration • FAQ • Contributing
X/Twitter Bulk DM Sender is a free, open-source X/Twitter automation tool built with Python and Selenium. It automates sending direct messages to multiple X/Twitter profiles from a CSV list. The tool features a professional Rich CLI interface with progress bars, status tables, and detailed reporting.
Instead of manually messaging contacts one by one, this bot handles the entire outreach process with smart delays, retry logic, and automatic CSV report generation.
- Growth Hackers running DM outreach campaigns on X/Twitter
- Digital Marketers engaging with prospects at scale
- Community Managers sending announcements to members
- Startup Founders doing cold outreach to potential customers
- Sales Teams automating initial contact with leads
- Content Creators networking with peers and collaborators
- Branded CLI Interface - Professional terminal UI with progress bars and status tables
- Smart Browser Automation - Selenium WebDriver with anti-detection and configurable timeouts
- CSV Profile Management - Validated input with deduplication and preview
- Retry Logic - Configurable retry attempts per profile with intelligent failure handling
- Rate Limiting - Random delays between messages to avoid detection
- Detailed Reporting - Automatic CSV report generation (success/failed/skipped)
- Configurable - Environment variables for delays, timeouts, and retries
- Cross-Platform - Works on Windows, macOS, and Linux
- Free & Open Source - MIT license, no API key required
| Requirement | Details |
|---|---|
| Python | Version 3.8 or higher (Download) |
| Google Chrome | Latest version (Download) |
| X/Twitter Account | A valid X/Twitter account |
# 1. Clone the repository
git clone https://github.com/SoCloseSociety/TwitterBulkMpSender.git
cd TwitterBulkMpSender
# 2. (Recommended) Create a virtual environment
python -m venv venv
# Activate it:
# Windows:
venv\Scripts\activate
# macOS / Linux:
source venv/bin/activate
# 3. Install dependencies
pip install -r requirements.txt
# 4. Configure (optional)
cp .env.example .envCSV file with a tweeter_profile_link column:
,tweeter_profile_link,tweeter_profile_name
0,/username1,@username1
1,/username2,@username2Message file (message.txt):
Your message content here.
python main.pyFollow the CLI prompts:
- Enter your CSV file path (or press Enter for
Test.csv) - Review the profile summary and message preview
- Log into X/Twitter in the browser window
- Press Enter to start the DM session
- Monitor progress in real-time
- Review the summary report
| Variable | Default | Description |
|---|---|---|
DELAY_MIN |
3 |
Minimum delay between messages (seconds) |
DELAY_MAX |
7 |
Maximum delay between messages (seconds) |
TIMEOUT |
15 |
Selenium element wait timeout (seconds) |
MAX_RETRIES |
3 |
Max retry attempts per profile |
MESSAGE_FILE |
message.txt |
Path to the message file |
After each session, a detailed CSV report is saved to the reports/ directory:
reports/dm_report_20260219_143022.csv
Each report contains: profile, status (success/failed/skipped), reason, and timestamp.
CSV Profile List message.txt
│ │
▼ ▼
┌─────────────────────────────────────┐
│ SoClose DM Engine │
│ │
│ 1. Launch Chrome │
│ 2. Manual login to X/Twitter │
│ 3. For each profile: │
│ → Navigate to profile │
│ → Open DM conversation │
│ → Type & send message │
│ → Log result (success/failed) │
│ 4. Generate CSV report │
└─────────────────────────────────────┘
│
▼
reports/dm_report_YYYYMMDD.csv
TwitterBulkMpSender/
├── main.py # CLI entry point
├── config.py # Configuration & branding
├── browser.py # Chrome WebDriver management
├── messenger.py # DM sending logic
├── utils.py # Utilities (validation, reporting)
├── requirements.txt # Python dependencies
├── .env.example # Environment config template
├── message.txt # Message content
├── Test.csv # Sample profile data
├── assets/
│ └── banner.svg # Project banner
├── LICENSE # MIT License
├── README.md # This file
├── CONTRIBUTING.md # Contribution guidelines
├── .gitignore # Git ignore rules
└── reports/ # Generated session reports
pip install --upgrade webdriver-managerThe browser opens for manual login. If you encounter issues:
- Make sure Chrome is up to date
- Complete any security challenges manually
- Press Enter only after you're fully logged in
- X/Twitter may have updated its UI — open an issue
- Your account may be restricted — wait before retrying
- Try increasing delay values in
.env
Q: Is this free? A: Yes. 100% free and open source under the MIT license.
Q: Do I need an API key? A: No. Browser automation via Selenium, no API key needed.
Q: How many DMs can I send? A: No hard limit in the tool. X/Twitter has its own DM limits — use reasonable delays.
Q: Does it work on Mac / Linux? A: Yes. Fully cross-platform.
| Feature | X/Twitter Bulk DM | Manual DMs | Paid DM Tools |
|---|---|---|---|
| Price | Free | Free | $50-200/mo |
| Bulk sending | Yes | No | Yes |
| CSV reports | Yes | Manual | Varies |
| Retry logic | Yes | N/A | Yes |
| Open source | Yes | N/A | No |
| API key required | No | No | Yes |
| Cross-platform | Yes | Yes | Web only |
Contributions are welcome! Please read the Contributing Guide before submitting a pull request.
This project is licensed under the MIT License.
This tool is intended for legitimate outreach and business communication purposes only. Users are responsible for complying with X/Twitter's Terms of Service. Do not use this tool for spam or unsolicited messaging. The authors are not responsible for any misuse or account restrictions.
If this project helps you, please give it a star!
It helps others discover this tool.
Built with purpose by SoClose — Digital Innovation Through Automation & AI
Website •
LinkedIn •
Twitter •
Contact