{"product_id":"gmail-ai-triage-in-n8n-draft-replies-with-openai","title":"Gmail AI Triage in n8n: Draft Replies with OpenAI","description":"\u003ch3\u003eDraft smarter Gmail replies automatically—powered by OpenAI inside n8n\u003c\/h3\u003e\n\u003cp\u003e\u003cstrong\u003eGmail AI Triage in n8n: Draft Replies with OpenAI\u003c\/strong\u003e watches your inbox for new unread emails, classifies each message with OpenAI, and either \u003cem\u003edrafts a reply in the original thread\u003c\/em\u003e or files the email with the right follow-up label—so your “inbox-to-action” workflow stays fast and organized.\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 new \u003cem\u003eunread\u003c\/em\u003e messages using a Gmail trigger.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eSends the email subject and snippet to OpenAI\u003c\/strong\u003e to generate:\n    \u003cul\u003e\n      \u003cli\u003ea category,\u003c\/li\u003e\n      \u003cli\u003ea draft reply, and\u003c\/li\u003e\n      \u003cli\u003ea flag indicating whether the sender is waiting for an answer.\u003c\/li\u003e\n    \u003c\/ul\u003e\n  \u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eWhen an answer is needed\u003c\/strong\u003e (“waiting for an answer” flag):\n    \u003cul\u003e\n      \u003cli\u003ecreates a \u003cstrong\u003eGmail draft reply\u003c\/strong\u003e addressed to the original sender, in the \u003cstrong\u003esame thread\u003c\/strong\u003e.\u003c\/li\u003e\n      \u003cli\u003elabels the original message as \u003cstrong\u003eYouDecide\u003c\/strong\u003e when OpenAI classifies it as \u003cstrong\u003e“du”\u003c\/strong\u003e, otherwise labels it as \u003cstrong\u003eDrafted\u003c\/strong\u003e.\u003c\/li\u003e\n    \u003c\/ul\u003e\n  \u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eWhen no answer is needed\u003c\/strong\u003e:\n    \u003cul\u003e\n      \u003cli\u003elabels the original Gmail message as \u003cstrong\u003eNoise\u003c\/strong\u003e when OpenAI classifies it as \u003cstrong\u003e“werbung”\u003c\/strong\u003e.\u003c\/li\u003e\n      \u003cli\u003eotherwise labels it as \u003cstrong\u003eFYI\u003c\/strong\u003e.\u003c\/li\u003e\n    \u003c\/ul\u003e\n  \u003c\/li\u003e\n\u003c\/ul\u003e\n\n\u003ch3\u003eUse cases\u003c\/h3\u003e\n\u003cul\u003e\n  \u003cli\u003eTurn inbound customer questions into \u003cstrong\u003eready-to-review Gmail drafts\u003c\/strong\u003e without manual triage.\u003c\/li\u003e\n  \u003cli\u003eAutomatically separate “reply-required” messages from \u003cstrong\u003eFYI\u003c\/strong\u003e and low-signal items.\u003c\/li\u003e\n  \u003cli\u003eSupport SaaS workflows where agents need categorized queues and consistent labeling.\u003c\/li\u003e\n\u003c\/ul\u003e\n\n\u003ch3\u003eTechnical details\u003c\/h3\u003e\n\u003cul\u003e\n  \u003cli\u003e\n\u003cstrong\u003en8n workflow\u003c\/strong\u003e using Gmail Trigger and Gmail actions.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eOpenAI integration\u003c\/strong\u003e via \u003cem\u003en8n-nodes-langchain-openai\u003c\/em\u003e (select a model that can return JSON; the system message is already written).\u003c\/li\u003e\n  \u003cli\u003eUses label management with four Gmail labels: \u003cstrong\u003eYouDecide\u003c\/strong\u003e, \u003cstrong\u003eDrafted\u003c\/strong\u003e, \u003cstrong\u003eFYI\u003c\/strong\u003e, \u003cstrong\u003eNoise\u003c\/strong\u003e.\u003c\/li\u003e\n  \u003cli\u003eIncludes conditional logic (e.g., \u003cstrong\u003eif\u003c\/strong\u003e) to choose reply vs. file-by-label paths.\u003c\/li\u003e\n\u003c\/ul\u003e\n\n\u003ch3\u003eSetup checklist\u003c\/h3\u003e\n\u003cul\u003e\n  \u003cli\u003eConnect your \u003cstrong\u003eGmail OAuth2\u003c\/strong\u003e account and select the same credential in the trigger and Gmail steps.\u003c\/li\u003e\n  \u003cli\u003eAdd \u003cstrong\u003eOpenAI API credentials\u003c\/strong\u003e and adjust the four category definitions as needed.\u003c\/li\u003e\n  \u003cli\u003eCreate the required Gmail labels and update label IDs if they differ in your account.\u003c\/li\u003e\n\u003c\/ul\u003e","brand":"N8N Commerce","offers":[{"title":"Default Title","offer_id":46159502901427,"sku":"N8N-20399","price":30.99,"currency_code":"GBP","in_stock":true}],"thumbnail_url":"\/\/cdn.shopify.com\/s\/files\/1\/0749\/6279\/6723\/files\/I1dIKZsG1nYkLYov6d_Zr_jgTCcU0v.png?v=1791104518","url":"https:\/\/buyflowscripts.com\/products\/gmail-ai-triage-in-n8n-draft-replies-with-openai","provider":"N8N Commerce","version":"1.0","type":"link"}