{"product_id":"gmail-triage-n8n-workflow-label-unread-emails-w-gemini-3-5","title":"Gmail Triage n8n Workflow: Label Unread Emails w\/ Gemini 3.5","description":"\u003ch3\u003eAutomatically triage your Gmail unread emails—then label and “process” them with Gemini (via OpenRouter)\u003c\/h3\u003e\n\u003cp\u003eThis \u003cstrong\u003eGmail Triage n8n Workflow\u003c\/strong\u003e polls your inbox for unread messages, sends the sender\/subject\/body to \u003cstrong\u003eGemini 3.5\u003c\/strong\u003e through \u003cstrong\u003eOpenRouter\u003c\/strong\u003e for structured classification, and then applies the matching \u003cstrong\u003eGmail label\u003c\/strong\u003e while marking the email as read—so your team’s inbox stays clean and organized.\u003c\/p\u003e\n\n\u003ch3\u003eWhat this workflow does\u003c\/h3\u003e\n\u003cul\u003e\n  \u003cli\u003e\n\u003cstrong\u003ePolls Gmail every minute\u003c\/strong\u003e and checks for up to \u003cstrong\u003e50 unread emails\u003c\/strong\u003e (excluding drafts).\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eExtracts and normalizes safe fields\u003c\/strong\u003e from each email, including \u003cstrong\u003esender\u003c\/strong\u003e, \u003cstrong\u003esubject\u003c\/strong\u003e, \u003cstrong\u003eplain-text body\u003c\/strong\u003e, and \u003cstrong\u003etimestamps\u003c\/strong\u003e.\u003c\/li\u003e\n  \u003cli\u003eUses \u003cstrong\u003eOpenRouter (Gemini)\u003c\/strong\u003e with a \u003cstrong\u003estrict JSON schema\u003c\/strong\u003e to classify each message (e.g., \u003cstrong\u003ecategory\u003c\/strong\u003e, \u003cstrong\u003epriority\u003c\/strong\u003e, \u003cstrong\u003elanguage\u003c\/strong\u003e, \u003cstrong\u003econfidence\u003c\/strong\u003e, plus a short \u003cstrong\u003esummary\u003c\/strong\u003e).\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eValidates the AI response\u003c\/strong\u003e; if the output is invalid, the workflow run fails.\u003c\/li\u003e\n  \u003cli\u003eLoads your existing Gmail labels and resolves the correct \u003cstrong\u003e“AI Triage\/…” label ID\u003c\/strong\u003e for the predicted category.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eApplies the label\u003c\/strong\u003e to the message and \u003cstrong\u003eremoves the UNREAD label\u003c\/strong\u003e to mark it as processed.\u003c\/li\u003e\n\u003c\/ul\u003e\n\n\u003ch3\u003eUse cases\u003c\/h3\u003e\n\u003cul\u003e\n  \u003cli\u003eRoute inbound sales: label \u003cstrong\u003eNew lead\u003c\/strong\u003e vs. \u003cstrong\u003eExisting client\u003c\/strong\u003e automatically.\u003c\/li\u003e\n  \u003cli\u003eInvoice triage: quickly tag \u003cstrong\u003eInvoice\u003c\/strong\u003e emails for accounting workflows.\u003c\/li\u003e\n  \u003cli\u003eVendor\/sponsor screening: classify \u003cstrong\u003eVendor pitch\u003c\/strong\u003e and reduce manual sorting.\u003c\/li\u003e\n  \u003cli\u003eInbox hygiene: apply \u003cstrong\u003eSpam\u003c\/strong\u003e label and move on after processing.\u003c\/li\u003e\n\u003c\/ul\u003e\n\n\u003ch3\u003eTechnical details\u003c\/h3\u003e\n\u003cul\u003e\n  \u003cli\u003e\n\u003cstrong\u003en8n nodes \/ stack:\u003c\/strong\u003e code, gmail, sticky note, http request, gmail trigger.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eGmail integration:\u003c\/strong\u003e OAuth2 credential, label lookup, label application, and UNREAD removal.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eAI integration:\u003c\/strong\u003e OpenRouter via \u003cstrong\u003eHTTP Request\u003c\/strong\u003e using a header-auth API key (Gemini 3.5).\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eRequired labels (create exactly):\u003c\/strong\u003e “AI Triage\/New lead”, “AI Triage\/Existing client”, “AI Triage\/Pricing”, “AI Triage\/Invoice”, “AI Triage\/Vendor pitch”, “AI Triage\/Spam”.\u003c\/li\u003e\n\u003c\/ul\u003e\n\n\u003cp\u003e\u003cstrong\u003eIdeal for:\u003c\/strong\u003e n8n users, automation engineers, and SaaS operators who want reliable Gmail triage automation with AI-powered labeling.\u003c\/p\u003e","brand":"N8N Commerce","offers":[{"title":"Default Title","offer_id":45742767636659,"sku":"N8N-17640","price":46.99,"currency_code":"GBP","in_stock":true}],"thumbnail_url":"\/\/cdn.shopify.com\/s\/files\/1\/0749\/6279\/6723\/files\/d40Gvaiug6cotN_pdMlXc_yqNt7eks.png?v=1785402191","url":"https:\/\/buyflowscripts.com\/products\/gmail-triage-n8n-workflow-label-unread-emails-w-gemini-3-5","provider":"N8N Commerce","version":"1.0","type":"link"}