Label Gmail emails with Google Gemini

Gemini classifies each new Gmail email and applies the matching label. This n8n template watches a Gmail inbox with the Gmail Trigger node, which detects every new incoming email. A Text Classifier node, backed by the Google Gemini Chat Model or another LLM, reads the email content and picks a category. The workflow then adds the matching label to the email in Gmail. Setup needs two connections: your Gmail account and your Google Gemini or other LLM credentials. It is for people who sort their Gmail inbox with labels.

n8nRead on 2026-11-165 steps

Steps

  1. Trigger: Gmail trigger detects each new emailGmail
  2. Text Classifier sorts it into categories
  3. Google Gemini powers the classificationGoogle Gemini
  4. Conditional labeling by category
    High Priority, Work Related, Promotions.
  5. Output: Gmail adds the correct labelGmail

Limits

  • Gmail only.
  • Labels only; it sends no reply and no alert.

What it does well

  • Needs only two connections: Gmail and an LLM.
  • Works with Gemini or another LLM model.

Before you import

Connect your Gmail account and your Google Gemini (or other LLM) credentials to n8n after the import.

Similar templates