E-Mail KI

E-Mail-Triage Agent

Automatische E-Mail-Klassifikation, Routing und Antwort. n8n-Workflow pollt Gmail via IMAP, klassifiziert mit Claude Sonnet (7 Kategorien, 4 Prioritäten, Sentiment), routet nach Aktionstyp (Auto-Reply, Draft, Eskalation, Ignorieren). Google Sheets Logging, Slack-Alerts für Eskalationen. ~7 Sekunden pro E-Mail, ~$0.01 pro Klassifikation.

11/11 Tests bestanden
7 Kategorien
~7s Pro E-Mail
14 Workflow-Nodes

Architektur

Pipeline

E-Mail empfangen

IMAP-Trigger pollt Gmail alle 60s oder Webhook empfängt Test-Payload.

KI-Klassifikation

Claude Sonnet klassifiziert Kategorie, Priorität, Sentiment und empfohlene Aktion.

4-Wege-Routing

Auto-Reply, Draft erstellen, Slack-Eskalation oder Ignorieren je nach Klassifikation.

Logging & Alerts

Jede E-Mail wird in Google Sheets protokolliert, urgente Cases an Slack eskaliert.

Tech Stack

Technologien

Workflow
n8n 2.xn8nac (Code-First)Claude Sonnet 4
Trigger
IMAP (Gmail)Webhook (Testing)
Outputs
Google SheetsGmail OAuth2Slack Bot

Engineering Decisions

Architektur-Entscheidungen

Entscheidung

7-Kategorien-System statt binärer Filter

Support, Sales, Billing, Partnership, Spam, Personal, Newsletter — granulare Klassifikation ermöglicht spezifisches Routing pro Kategorie statt nur Spam/Nicht-Spam.

Entscheidung

Structured Output mit AutoFix

Schema-Validierung erzwingt korrektes JSON-Output. AutoFix-Model (Sub-Node) repariert automatisch malformierte LLM-Antworten ohne manuellen Eingriff.

Entscheidung

Dual-Trigger (IMAP + Webhook)

IMAP für Production-Betrieb, Webhook für deterministisches Testen mit Mock-Daten. Gleiche Pipeline, unterschiedliche Eingabequellen.