Building an AI-Powered Email Routing Agent with N8N, OpenRouter, and PostgreSQL Every company has that one inbox — the shared one everyone ignores until something explodes. Emails pile up, get misrouted, or simply sit there while the wrong person tries to figure out who should handle it. I built an AI agent on N8N that solves this completely. It watches an inbox, reads every incoming email, classifies it using an LLM, routes it to the right team, and logs everything to PostgreSQL — fully automated, no human in the loop. Here's how it works. The Problem When customers or internal staff send emails to a shared address, someone has to: Read the email Decide which team handles it (IT, HR, Finance, Legal...) Forward it manually Hope it doesn't get lost This is repetitive, error-prone, and doesn't scale. It's also exactly the kind of work AI is good at.…