{"product_id":"gmail-gpt-5-email-labeling-n8n-workflow-automation","title":"Gmail GPT-5 Email Labeling n8n Workflow Automation","description":"\u003ch3\u003eAutomatically label your Gmail with GPT—powered by n8n\u003c\/h3\u003e\n\u003cp\u003eThis \u003cstrong\u003eGmail GPT-5 Email Labeling\u003c\/strong\u003e n8n workflow watches your inbox for new Gmail messages, classifies each email with \u003cstrong\u003eOpenAI\u003c\/strong\u003e, and then automatically applies the correct \u003cstrong\u003eGmail label\u003c\/strong\u003e to keep your inbox organized—without manual sorting.\u003c\/p\u003e\n\n\u003ch3\u003eWhat this workflow does\u003c\/h3\u003e\n\u003cul\u003e\n  \u003cli\u003e\n\u003cstrong\u003eMonitors new emails:\u003c\/strong\u003e Triggers \u003cem\u003eevery minute\u003c\/em\u003e whenever a new message arrives in Gmail.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eClassifies email content with OpenAI:\u003c\/strong\u003e Sends the email \u003cstrong\u003esender\u003c\/strong\u003e, \u003cstrong\u003esubject\u003c\/strong\u003e, and \u003cstrong\u003esnippet\u003c\/strong\u003e to OpenAI and requests \u003cstrong\u003eexactly one category\u003c\/strong\u003e from your predefined list.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eMaps category → Gmail label ID:\u003c\/strong\u003e Converts the returned category into the corresponding \u003cstrong\u003eGmail label ID\u003c\/strong\u003e.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eUses a safe fallback:\u003c\/strong\u003e If the category is missing or unexpected, the workflow applies a \u003cstrong\u003edefault label ID\u003c\/strong\u003e you provide.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eApplies the label:\u003c\/strong\u003e Updates the original Gmail message with the selected label automatically.\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 Auto-label lead vs. support vs. billing messages to route work faster.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eAutomation engineers:\u003c\/strong\u003e Maintain a consistent labeling taxonomy using OpenAI classification.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eInbox management:\u003c\/strong\u003e Reduce manual inbox triage by enforcing category-based Gmail labels.\u003c\/li\u003e\n\u003c\/ul\u003e\n\n\u003ch3\u003eTechnical details\u003c\/h3\u003e\n\u003cul\u003e\n  \u003cli\u003e\n\u003cstrong\u003eTrigger:\u003c\/strong\u003e \u003cstrong\u003eGmail Trigger\u003c\/strong\u003e (checks every minute for new messages).\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eProcessing:\u003c\/strong\u003e \u003cstrong\u003eSet\u003c\/strong\u003e and \u003cstrong\u003eCode\u003c\/strong\u003e nodes to prepare inputs and map categories to \u003cstrong\u003eGmail label IDs\u003c\/strong\u003e.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eAI classification:\u003c\/strong\u003e Uses the \u003cstrong\u003en8n-nodes-langchain\u003c\/strong\u003e LLM node (Chat Model set to the model you choose) to classify emails into one category.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eGmail actions:\u003c\/strong\u003e Applies the selected label via the \u003cstrong\u003eGmail\u003c\/strong\u003e label action.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eNotes:\u003c\/strong\u003e Includes a \u003cstrong\u003esticky note\u003c\/strong\u003e for workflow guidance.\u003c\/li\u003e\n\u003c\/ul\u003e\n\n\u003ch3\u003eSetup\u003c\/h3\u003e\n\u003cp\u003eConnect your \u003cstrong\u003eGmail OAuth2\u003c\/strong\u003e credentials for the Gmail trigger and label action, add your \u003cstrong\u003eOpenAI API credentials\u003c\/strong\u003e, and set the OpenAI Chat Model. Then replace the placeholder taxonomy with your real \u003cstrong\u003eGmail label IDs\u003c\/strong\u003e (including the default label ID), and optionally adjust the category list to match your labeling scheme.\u003c\/p\u003e","brand":"N8N Commerce","offers":[{"title":"Default Title","offer_id":45726217044147,"sku":"N8N-17489","price":65.99,"currency_code":"GBP","in_stock":true}],"thumbnail_url":"\/\/cdn.shopify.com\/s\/files\/1\/0749\/6279\/6723\/files\/LI2Tx0LVO43PRW6g5Tx31_rj6qyGob.png?v=1785054813","url":"https:\/\/buyflowscripts.com\/products\/gmail-gpt-5-email-labeling-n8n-workflow-automation","provider":"N8N Commerce","version":"1.0","type":"link"}