Open-source lead generation tool with AI-powered content creation and web dashboard
Generate business leads from Google Maps, create personalized marketing content using OpenAI, and manage everything through a modern web interface.
This tool helps you:
- Scrape business information from Google Maps (name, address, phone, rating)
- Generate AI marketing content personalized for each business
- Manage campaigns through a modern web dashboard
- Track lead quality with AI-powered scoring
- Export results in CSV and JSON formats
- Create email and WhatsApp templates automatically
- Monitor performance with real-time analytics
Perfect for: Digital agencies, freelance marketers, SME consultants, and business developers looking for an affordable lead generation solution with professional management tools.
- Node.js 16+
- OpenAI API key (get one here)
git clone https://github.com/asiifdev/business-leads-ai-automation.git
cd business-leads-ai-automation
npm install# Run the interactive setup wizard (recommended)
npm run setup
# The wizard will guide you through:
# 1. OpenAI API key configuration
# 2. Business profile (name, phone, email, services, value propositions)
# 3. Owner/contact person info
# 4. Language & preferences (Indonesian/English)
# 5. Industry focus & campaign style
#
# All settings are saved to .env and business-profile.jsonOr manually:
cp .env.example .env
# Edit .env with your API key
# Edit business-profile.json with your business data# Start the web dashboard
npm run web
# Open your browser to http://localhost:3000
# Create campaigns, manage leads, and view analytics through the web interface# Basic CLI usage
node index.js -q "Restaurant Jakarta" -l 20
# With marketing content generation
node index.js -q "Restaurant Jakarta" -l 20 -m "Increase your restaurant sales with digital marketing"
# With language override
node index.js -q "Coffee Shop Sydney" -l 10 -L english
# Results will be saved in the output/ foldernode index.js -q "Coffee Shop Jakarta" -l 5 -m "Boost your coffee shop with online ordering system"📄 leads_[timestamp].csv
ID,Name,Address,Phone,Website,Rating
1,"Kopi Tuku","Jl. Kemang Raya No.1","+6281234567890","kopituku.com","4.5"
2,"Filosofi Kopi","Jl. Senopati No.5","+6281234567891","filosofikopi.com","4.3"📧 email_template.txt
Subject: Tingkatkan Penjualan Coffee Shop dengan Sistem Online
Halo Tim Kopi Tuku,
Saya melihat coffee shop Anda di Kemang dengan rating 4.5 stars - impressive!
Apakah Anda tertarik meningkatkan penjualan dengan sistem online ordering yang terbukti efektif untuk coffee shop?
[Your personalized message continues...]
📱 whatsapp_template.txt
Halo Kopi Tuku! ☕
Lihat coffee shop Anda di Kemang rating 4.5⭐ - keren!
Mau boost penjualan pakai sistem online ordering? 📱
[Continues with personalized content...]
- Google Maps scraping with auto-scroll
- Business data extraction (name, address, phone, rating, website)
- AI content generation using OpenAI GPT
- Lead quality scoring with AI intelligence
- Dual template creation (email + WhatsApp)
- CSV and JSON export
- Bilingual support (Indonesian & English)
- Configurable business profile — no hardcoded business data
- Rate limiting to avoid blocking
- Modern web interface for non-technical users
- Campaign management with real-time progress tracking
- Lead management with filtering and sorting
- Analytics dashboard with performance insights
- Responsive design for mobile and desktop
- Real-time notifications via Server-Sent Events
- Data export functionality (CSV/JSON)
- Campaign templates for different industries
- Email finding returns empty array (work in progress)
- Phone number validation could be improved
- Error handling needs enhancement for edge cases
- Fix email discovery functionality
- Better phone number validation for international numbers
- Multiple search engine support
-
Advanced AI prompt customization✅ (via business profile) - Batch processing for multiple queries
- API integrations (CRM, email marketing)
For the best experience, use the web dashboard:
npm run webThen open http://localhost:3000 in your browser. The web interface provides:
- Campaign Creation: Easy form-based campaign setup
- Real-time Monitoring: Live progress tracking
- Lead Management: Filter, sort, and export leads
- Analytics: Performance insights and reporting
📚 Full Web Dashboard Guide: docs/WEB_DASHBOARD_GUIDE.md
node index.js [options]
Options:
-q, --query <query> Google Maps search query
-l, --length <number> Number of results to scrape (max: 100)
-m, --marketing <text> Your marketing message for AI templates
-c, --cta <text> Call to action text
-L, --language <lang> Output language: indonesian / english
-h, --help Show help information
Examples:
node index.js -q "Restaurant Bandung" -l 50 -m "Digital marketing for restaurants"
node index.js -q "Salon Jakarta" -l 30 -m "Online booking system"
node index.js -q "Coffee Shop Sydney" -l 10 -L englishnpm run setup # Interactive setup wizard (first-time configuration)
npm run web # Start web dashboard (recommended)
npm run web:dev # Start web dashboard in development mode
npm run campaign # Run interactive campaign builder
npm run cli # Run CLI version
npm test # Run tests (50 tests)Configuration is split into two files:
This file is the single source of truth for all your business information:
{
"business": {
"name": "Your Business Name",
"type": "technology",
"phone": "+628xxx",
"email": "contact@yourbiz.com",
"website": "https://yourbiz.com",
"description": "Your service/product description",
"valuePropositions": ["Fast delivery", "24/7 support"],
"targetIndustries": ["restaurant", "retail"]
},
"owner": {
"name": "Your Name",
"phone": "+628xxx",
"email": "you@email.com"
},
"preferences": {
"language": "indonesian",
"campaignStyle": "balanced",
"defaultSearchQuery": "",
"defaultLocation": "Jakarta",
"outputFormat": "csv"
}
}# Required
OPENAI_API_KEY=your-openai-key-here
# Optional: Custom OpenAI endpoint (Azure, OpenRouter, local LLMs, etc.)
OPENAI_BASE_URL=https://your-custom-endpoint.com/v1
OPENAI_MODEL=gpt-4o-mini
# Output language (indonesian / english)
OUTPUT_LANGUAGE=indonesian
# Scraping Configuration
DELAY_BETWEEN_SCRAPES=2000
MAX_RETRIES=3
OUTPUT_FORMAT=csv- Free to use vs $99-299/month for SaaS alternatives
- Open source - modify as needed
- No monthly subscriptions
- Bilingual AI prompts — Indonesian & English
- WhatsApp marketing integration
- Configurable for any market — set your business profile once
- Language-aware content — all outputs match your chosen language
- Full source code access
- Easy to customize and extend
- Well-documented codebase
- Active community support
We welcome contributions! Here's how you can help:
- Report bugs via GitHub Issues
- Suggest features you'd like to see
- Submit pull requests for improvements
- Share your use cases and success stories
# Fork the repo, then clone your fork
git clone https://github.com/YOUR_USERNAME/business-leads-ai-automation.git
cd business-leads-ai-automation
npm install
# Create a feature branch
git checkout -b feature/your-feature-name
# Make your changes and test
npm test
# Submit a pull request- Public data only - scrapes publicly available information
- Respectful scraping - includes rate limiting
- No spam - use for legitimate business outreach only
- MIT License - free for commercial use
Please read our DISCLAIMER.md for full legal information.
- Web Dashboard Guide: Complete user guide for the web interface
- Deployment Guide: Production deployment instructions
- API Documentation: REST API reference (coming soon)
- GitHub Issues: For bug reports and feature requests
- Discussions: For questions and community chat
- Email: [your-email] for urgent matters
Ready for production? Check our comprehensive deployment guide:
- VPS/Server deployment
- Docker containerization
- Cloud platform deployment (Heroku, AWS, etc.)
- SSL/HTTPS setup
- Monitoring and maintenance
📚 Full Deployment Guide: docs/DEPLOYMENT_GUIDE.md
- Built with Puppeteer for web scraping
- Powered by OpenAI for AI content generation
- Inspired by the need for affordable lead generation tools in Indonesia
MIT License - see LICENSE file for details.
⭐ Star this repo if you find it useful!
Made with ❤️ for businesses worldwide