Templates / Triage and label Gmail inbox emails with OpenRouter Gemini 3.5

Triage and label Gmail inbox emails with OpenRouter Gemini 3.5

Ready for 3.0

by Andrew · 4 views · created 2026-07-29 · 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.

What this workflow does

This workflow has 9 nodes and runs on Gmail events. Along the way it connects Gmail. It also calls openrouter.ai over HTTP.

How it runs

Trigger: On Gmail events.

  1. Normalize Email Data (Code): runs custom JavaScript code
  2. Build Classification Request (Code): runs custom JavaScript code
  3. Classify with OpenRouter (HTTP Request): calls openrouter.ai (POST)
  4. Verify Classification Output (Code): runs custom JavaScript code
  5. Fetch Gmail Labels (Gmail): get many (label)
  6. Determine Category Label (Code): runs custom JavaScript code
  7. Label Email by Category (Gmail): add labels (message)
  8. Mark as read (Gmail): remove labels (message)

Services it uses

Gmail

HTTP calls to: openrouter.ai

Before you upgrade to n8n 3.0

Nothing in this workflow is removed in n8n 3.0, so it should import and run after the upgrade.

Nodes used (4)

From the author

Quick overview This workflow polls your Gmail inbox for unread emails, sends the sender/subject/body to OpenRouter (Gemini) for structured triage, then applies a matching Gmail label and marks the message as read. How it works 1. Polls Gmail every minute for…

Excerpt from Andrew's description on n8n.io.

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.