Purpose: IntelliMailPilot / EmailBot is an email-operations platform for lead lists, sender identities, drafts, multi-step campaigns, scheduled delivery, replies, warm-up workflows, and reporting.
Core contents: The maintained application is under dashboard-next/ and uses Next.js, MongoDB/Mongoose, JWT authentication, Microsoft Graph and SMTP delivery, campaign APIs, and persistent worker/deployment assets. campaign_engine/ and legacy/ contain earlier implementations; project-management/ contains supporting planning material.
Current status: Substantial application and campaign-orchestration code is present. Production use still depends on correctly configured provider credentials, token lifecycle management, a persistent campaign worker, and regression testing against the current code.
Recommended next milestone: Verify authentication, provider credentials, campaign throttling, reply threading, worker recovery, and a complete dry-run-to-live-send release gate before using real outreach data.
This workspace contains a Python backend for sending batch email campaigns and a Node/Express dashboard frontend.
-
Campaign logic (Python
daily_campaign.py):- Sends Cover Story, Reminder, and Follow-up emails in one run.
- Controlled concurrency (10 at a time, 3s between batches).
- Rate-limit handling and retry logic.
- Cost priority logic for email content.
- Updates lead spreadsheet with sent stages and logs summary to
auto_reply_log.txt. - Dry-run by default; real sending requires
--sendflag. --dumpoption to output leads as JSON (used by dashboard).
-
Dashboard (
dashboard/server.js,public/index.html):- View contacts/leads imported from Excel.
- Upload new leads spreadsheet.
- Trigger daily campaign via UI or API.
- Simple analytics and campaign management UI.
- Contacts page extracts data from sheet in real time.
-
Install dependencies:
pip install -r requirements.txt -
Ensure your email credentials are available via
crendentials.envor environment variables:EMAIL_ADDRESS=your@domain.com EMAIL_PASSWORD=yourpassword -
Place your leads Excel file in
data/(e.g.clients_new.xlsx). Field names expected:Email,Name, optionallyFinalCost/UpdatedCost/InitialCost. -
To see leads JSON (dry-run):
python daily_campaign.py --dump -
To run a dry-run campaign:
python daily_campaign.py
-
To perform actual send:
python daily_campaign.py --sendor via dashboard with POST
/api/run-daily-campaignand body{ "send": true }.
- Navigate into dashboard folder:
cd dashboard npm install
- Start server (hot reload):
npx nodemon server.js
- Open browser to
http://localhost:5000. - Go to Contacts to upload your leads spreadsheet and view entries.
- Click Run Email Bot on dashboard to trigger campaign (dry-run by default). Use upload or API to send for real.
GET /api/leads- Returns leads from the active sheet.POST /api/upload-leads- Form-data file upload (filefield) to replace sheet.POST /api/run-daily-campaign- Triggers campaign; body may include"send":true.
- Dashboard authentication is relaxed for demo; in production integrate real auth.
- The Python script reads
data/clients_new.xlsxfirst, thenclients.xlsx, thenclients_blank.xlsx. - Uploaded files overwrite
clients_new.xlsx.
Now the dashboard will fetch real data from the sheet and allow sending emails accordingly.