Skip to content

eeshm/reachbox-eesh

Repository files navigation

ReachInbox - Email Monitoring & Automation

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.


Tech Stack

  • 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

Setup Instructions

1. Clone the Repo

git clone https://github.com/eeshm/reachinbox.git
cd reachinbox

.env file

Email credentials

IMAP_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

SLACK_WEBHOOK_URL=https://hooks.slack.com/services/xxx/yyy/zzz OUTGOING_WEBHOOK_URL=https://webhook.site/your-unique-url

Elasticsearch

ELASTICSEARCH_NODE=http://elasticsearch:9200 \


  1. Build & Start with Docker
docker-compose up --build
💡 To start containers without rebuilding:

docker-compose up -d

To stop:
docker-compose down

Features

IMAP Email Integration

  • Connects to multiple email accounts using imapflow.
  • Supports scanning standard Gmail folders like Inbox, All Mail, etc.
  • Automatically fetches and parses emails using mailparser.

AI Email Categorization

  • Uses a lightweight AI logic in categorizeEmail() to label messages.

  • Categories include:

    • Interested
    • Not Interested
    • Spam
    • Ignore

Full-Text Search with Elasticsearch

  • 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
    

Slack Integration

  • Sends Slack notifications for emails categorized as Interested.
  • Notification includes subject, sender, and preview text.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages