{"product_id":"n8n-gmail-triage-workflow-gpt-5-6-email-labeling","title":"n8n Gmail Triage Workflow: GPT-5.6 Email Labeling","description":"\u003ch3\u003eAutomatically triage your unread Gmail with GPT-based labeling—no manual inbox sorting\u003c\/h3\u003e\n\u003cp\u003eThis n8n workflow polls your Gmail every minute, sends each unread email to an OpenAI Chat Model for strict JSON classification, and then automatically applies the right Gmail label (or marks it as SPAM) to keep your inbox clean, professional, and prioritized.\u003c\/p\u003e\n\n\u003ch3\u003eWhat this workflow does\u003c\/h3\u003e\n\u003cul\u003e\n  \u003cli\u003e\n\u003cstrong\u003eChecks Gmail every minute\u003c\/strong\u003e for unread messages.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eExtracts key fields\u003c\/strong\u003e from each email: message ID, sender, subject, and plain-text body.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eClassifies with OpenAI\u003c\/strong\u003e by sending the email content to an OpenAI Chat Model with instructions to return a \u003cstrong\u003estrict JSON\u003c\/strong\u003e result (category, priority, summary, and an action flag).\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eParses and validates the AI response\u003c\/strong\u003e, using a \u003cstrong\u003esafe default classification\u003c\/strong\u003e if JSON parsing fails.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eRoutes by chosen category\u003c\/strong\u003e and applies the matching Gmail label.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eProtects your inbox\u003c\/strong\u003e by applying Gmail’s \u003cstrong\u003eSPAM\u003c\/strong\u003e label when the action flag indicates it.\u003c\/li\u003e\n\u003c\/ul\u003e\n\n\u003ch3\u003eUse cases\u003c\/h3\u003e\n\u003cul\u003e\n  \u003cli\u003e\n\u003cstrong\u003eSaaS operators\u003c\/strong\u003e who want unread emails categorized into Client, Prospect, Administration, Facture, Newsletter, and Urgent without manual work.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eAutomation engineers\u003c\/strong\u003e testing reliable AI-driven email triage with structured JSON outputs and fallback behavior.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eTeams\u003c\/strong\u003e managing high email volume who need consistent priority labeling to reduce response time.\u003c\/li\u003e\n\u003c\/ul\u003e\n\n\u003ch3\u003eTechnical details\u003c\/h3\u003e\n\u003cul\u003e\n  \u003cli\u003e\n\u003cstrong\u003en8n Gmail integration\u003c\/strong\u003e using a Gmail Trigger plus Gmail actions to add labels or apply SPAM.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eOpenAI Chat Model\u003c\/strong\u003e for GPT-based classification and summarization (via strict JSON format).\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eLogic and orchestration nodes:\u003c\/strong\u003e if, set, code, gmail, merge, switch.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eSetup requirements:\u003c\/strong\u003e\n    \u003cul\u003e\n      \u003cli\u003eAdd a \u003cstrong\u003eGmail OAuth\u003c\/strong\u003e credential for the Gmail Trigger and Gmail actions.\u003c\/li\u003e\n      \u003cli\u003eAdd an \u003cstrong\u003eOpenAI credential\u003c\/strong\u003e for the OpenAI Chat Model node.\u003c\/li\u003e\n      \u003cli\u003eCreate Gmail labels: \u003cstrong\u003eUrgent, Client, Prospect, Facture, Administration, Newsletter\u003c\/strong\u003e, then copy their label IDs and replace each \u003ccode\u003eYOUR_GMAIL_LABEL_ID_...\u003c\/code\u003e placeholder.\u003c\/li\u003e\n    \u003c\/ul\u003e\n  \u003c\/li\u003e\n\u003c\/ul\u003e","brand":"N8N Commerce","offers":[{"title":"Default Title","offer_id":45962329161907,"sku":"N8N-18913","price":21.99,"currency_code":"GBP","in_stock":true}],"thumbnail_url":"\/\/cdn.shopify.com\/s\/files\/1\/0749\/6279\/6723\/files\/2y9ZfF4Sg4XBaRNnCRucG_WtbZPjPg.png?v=1788600420","url":"https:\/\/buyflowscripts.com\/products\/n8n-gmail-triage-workflow-gpt-5-6-email-labeling","provider":"N8N Commerce","version":"1.0","type":"link"}