GenAiHub

Last checked 23 October 2026 — responded normally.

Classify and label new Gmail emails with OpenAI GPT-4.1 mini

Quick Overview

Live
Open / InstallLast updated October 23, 2026

Description

Quick Overview This workflow polls Gmail for new messages, uses OpenAI to classify each email into a category and priority with a short summary, and then applies matching Gmail labels (for example, AI/Urgent or AI/Sales Lead) when the labels exist in your account. How it works Checks Gmail for new emails every minute. Normalizes each email (sender, subject, truncated body, message ID) and prepares it for classification. Sends the email content to OpenAI and receives a strict JSON result with category, priority, summary, whether a reply is needed, and a short reason. Validates and parses the OpenAI output, falling back to the “other” category if the response is invalid. Fetches all existing Gmail labels and maps each classified category (and optional priority) to a label ID using your configured prefix. Adds the resolved label(s) to the Gmail message when the target label exists, and skips emails where the expected label is missing. Setup Add a Gmail OAuth2 credential and connect it to the Gmail Trigger and Gmail nodes. Add an OpenAI credential and connect it to the OpenAI classification node. Create the Gmail labels the workflow expects (for example, AI/Urgent, AI/Sales Lead, AI/Support, AI/Billing, AI/Newsletter-Spam, and AI/Other) or update the label prefix and mappings to match your labels. Update the Settings values (business name, OpenAI model, optional classification notes, and maximum body length) and optionally enable priority labels if you also create AI/Priority-High, AI/Priority-Medium, and AI/Priority-Low. An n8n automation workflow template by ReadyUpAgents.

Community Metrics

Views
2
Avg Rating
N/A
Ratings
0
Likes
0
Comments
—

Author

ReadyUpAgents

Platform

web

Pricing model

free

Categories

  • Automation
  • AI

Tags

  • n8n
  • workflow
  • gmail
  • code
  • openai

Capabilities

  • 3 nodes
  • 2 views

Information

TypeWorkflow
Sourcen8n
AddedOctober 18, 2026

Comments

?

Others in the same category, ranked by how often they are opened.