Templates / Label and triage support emails in Gmail with DeepSeek or OpenAI

Label and triage support emails in Gmail with DeepSeek or OpenAI

Ready for 3.0

by eason ✓ · 19 views · created 2026-07-24 · Ticket Management, AI Summarization

Ready for 3.0. This template uses no nodes that n8n 3.0 removes. No removed nodes, versions or helpers found. Static check, last run 2026-10-19.

Worth a look

Nodes used (5)

Gmail

What it does

Quick overview This workflow monitors a Gmail inbox, filters out auto-replies and mailing-list noise, classifies each incoming email with DeepSeek (or OpenAI-compatible chat completions), and applies a corresponding Gmail label (order status, product question, refund/complaint, or other) without sending any replies. How it works 1. Triggers every 5 minutes when new messages arrive in Gmail. 2. Checks message headers, sender, and subject to skip auto-replies, mailing lists, and noreply/system senders. 3. Sends the email subject and body to the DeepSeek chat completions API to classify the intent into one of four categories. 4. Parses the model’s JSON response and maps the intent to a Gmail label ID. 5. Adds the mapped label to the original Gmail message to triage the inbox. Setup 1. Connect a Gmail OAuth2 credential and ensure the trigger has access to the mailbox you want to monitor. 2. Create an HTTP Header Auth credential for your AI provider (for example, Authorization: Bearer <APIKEY) and attach it to the classification request. 3. Create four Gmail labels (for example, AI/Order, AI/Product, AI/Refund, AI/Other) and update the workflow’s intent-to-label mapping with your label IDs or select them after import. 4. Optional: If using OpenAI instead of DeepSeek, update the API base URL and model name in the classification request to match your provider.

View the original on n8n.io → Check your own copy

Get the weekly “what broke” email

New templates, newly broken ones, and n8n release changes. One short email a week.

Form not loading? Subscribe here.