Back to Templates

Classify Gmail support emails with AI and store tickets in PostgreSQL

Created by

Created by: Jyothish S L || jyothishsl
Jyothish S L

Last update

Last update 15 hours ago

Share


This workflow automatically converts incoming Gmail messages into structured support tickets using AI classification. It assigns categories, generates a unique ticket ID, stores data in PostgreSQL, assigns a support agent based on workload, and sends an automated email reply to the customer.

⚙️ How it works
Fetch email from Gmail AI classifies ticket (Payment, Login, Fraud, etc.) Generates unique ticket ID Stores ticket in PostgreSQL Assigns available support agent Logs assignment Sends email confirmation to customer

📦 Requirements

  1. n8n (latest version)
  2. Gmail OAuth2 credentials
  3. PostgreSQL database
  4. AI model (Ollama or compatible LLM)
  5. Support tables:
  6. tickets
  7. support_persons
  8. ticket_assignment_logs