ReachInbox is a Node.js application that connects to multiple IMAP email accounts, categorizes incoming emails using AI, indexes them into Elasticsearch, and sends Slack notifications and webhook events for interested leads.
- Node.js + TypeScript
- IMAPFlow for email access
- Elasticsearch for indexing and search
- Docker + Docker Compose for containerization
- Slack Webhook for internal notifications
- Webhook.site for outbound automation
git clone https://github.com/eeshm/reachinbox.git
cd reachinboxIMAP_HOST_1=imap.gmail.com IMAP_USER_1=your-email@gmail.com IMAP_PASS_1=your-password
IMAP_HOST_2=imap.example.com IMAP_USER_2=second@example.com IMAP_PASS_2=second-password
SLACK_WEBHOOK_URL=https://hooks.slack.com/services/xxx/yyy/zzz OUTGOING_WEBHOOK_URL=https://webhook.site/your-unique-url
ELASTICSEARCH_NODE=http://elasticsearch:9200 \
- Build & Start with Docker
docker-compose up --build
💡 To start containers without rebuilding:
docker-compose up -d
To stop:
docker-compose down- Connects to multiple email accounts using
imapflow. - Supports scanning standard Gmail folders like Inbox, All Mail, etc.
- Automatically fetches and parses emails using
mailparser.
-
Uses a lightweight AI logic in
categorizeEmail()to label messages. -
Categories include:
InterestedNot InterestedSpamIgnore
-
Emails are indexed into an Elasticsearch cluster.
-
Each document contains:
- Subject
- From
- Cleaned plain-text body
- Date
- Source account and folder
- Assigned category
-
API endpoint for querying:
GET /api/emails/search?query=your-keyword
- Sends Slack notifications for emails categorized as Interested.
- Notification includes subject, sender, and preview text.