DEV Community

deva
deva Subscriber

Posted on • Edited on

🚀 SPOE – Smart Postmark Email Router with AI 🧠📬

"Single point of Emails. One inbox to rule them all"


🎯 What’s the Problem?

Managing multiple departmental emails in an organization is often chaotic:

  • Customers don’t know which email to use.
  • Emails go unanswered or misrouted.
  • Teams waste time forwarding messages to the right people.

That’s where SPOE steps in.


💡 The Idea

SPOE (Single Point of Email) provides a smart, centralized email address for organizations. Incoming emails to this address are:

  1. Parsed using Postmark’s Inbound Email Parsing.
  2. Matched via AI to the most relevant internal team or department.
  3. Forwarded automatically to the best-fit email address — with the original sender CC'ed!

It’s like a smart receptionist for your inbox 📬🤖


🛠️ How It Works

🔐 Frontend Features

  • Organisation Signup/Login
  • Add/Edit/Delete department/team emails
  • Add short descriptions for each email (to guide routing)
  • Set a fallback email (for unmatched messages)
  • Simple, clean UI (no clutter)

🧪 Live Demo

🔧 Backend Workflow

  1. Each registered organization gets a custom email like: orgname@spoe.maker-space.me
  2. This domain is already verified on Postmark for inbound email parsing.
  3. When a customer sends an email:
    • Postmark parses the email content (subject, body, sender, etc.)
    • The system computes vector embeddings of the email text.
    • It compares those against the org's configured team descriptions.
  4. The closest match is picked.
  5. The system uses Google’s AI Studio LLM to generate a smart forwarding message.
  6. The email is sent to the matched address with the original sender CC’ed.

No more confusion. Just clarity and automation.


🤖 Why Postmark?

  • Postmark’s Inbound Email Parsing API made this all possible.
  • It's fast, clean, and reliable.

📦 Tech Stack

  • Frontend: VanillaJS, HTML and CSS
  • Backend: Python
  • AI: Google AI Studio (Embedding + Completion APIs)
  • Email Parsing: Postmark Inbound API
  • Vector Search: Pinecone (or in-memory for small orgs)

🧪 How to Test It

  1. Visit: https://spoe.maker-space.me
  2. Create an organization account.
  3. Add 2–3 team email IDs with short descriptions (e.g., support@org.com – handles technical issues).
  4. Email your org address (e.g., acmecorp@spoe.maker-space.me) from any email client with a test query.
  5. Check your configured emails – you'll see it routed automatically with sender CC’ed.

🔚 Final Thoughts

This challenge made me explore how email – something we all use daily – can be made smarter using AI and Postmark. SPOE is just the beginning. Imagine plugging this into:

  • Internal ticketing systems
  • CRM tools
  • Helpdesks
  • Even art installations!
  • Bug reporting in Tech Companies

Top comments (0)

Some comments may only be visible to logged-in visitors. Sign in to view all comments.