{"product_id":"n8n-workflow-auto-mark-unread-gmail-junk-with-gpt-5","title":"N8N Workflow: Auto-Mark Unread Gmail Junk with GPT-5","description":"\u003ch3\u003eAuto-Mark Unread Gmail Junk with GPT-5 (plus Undo)\u003c\/h3\u003e\n\u003cp\u003eKeep your Gmail Inbox clean automatically: this n8n workflow scans \u003cstrong\u003eunread Gmail messages\u003c\/strong\u003e, uses \u003cstrong\u003eOpenAI GPT-5\u003c\/strong\u003e to spot \u003cstrong\u003ehigh-confidence junk from unknown senders\u003c\/strong\u003e, moves them to \u003cstrong\u003eGmail Spam\u003c\/strong\u003e, and sends you a \u003cstrong\u003eTelegram report with a one-tap Undo\u003c\/strong\u003e.\u003c\/p\u003e\n\n\u003ch3\u003eWhat this workflow does\u003c\/h3\u003e\n\u003cul\u003e\n  \u003cli\u003e\n\u003cstrong\u003eRuns on a schedule or on demand:\u003c\/strong\u003e starts daily via a \u003cstrong\u003ecron schedule\u003c\/strong\u003e or triggers from a \u003cstrong\u003eTelegram message\/callback\u003c\/strong\u003e button.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eBuilds a “known” sender list:\u003c\/strong\u003e pulls unread messages from your Gmail Inbox and also uses recent \u003cstrong\u003eGmail Sent\u003c\/strong\u003e mail to gather contacts\/domains you’ve already interacted with.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003ePre-filters to reduce false positives:\u003c\/strong\u003e excludes emails from people you have written to, and only sends remaining candidates to \u003cstrong\u003eOpenAI GPT-5\u003c\/strong\u003e for junk classification.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eUses confidence scoring:\u003c\/strong\u003e keeps borderline\/low-confidence items in the Inbox, while preparing an \u003cstrong\u003eundo batch\u003c\/strong\u003e for only the high-confidence junk.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eMoves selected emails to Spam:\u003c\/strong\u003e moves each chosen message to \u003cstrong\u003eGmail Spam\u003c\/strong\u003e and removes \u003cstrong\u003eInbox\/Unread labels\u003c\/strong\u003e.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eLogs every run:\u003c\/strong\u003e appends a run entry to \u003cstrong\u003eGoogle Sheets\u003c\/strong\u003e.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eTelegram reporting + one-tap Undo:\u003c\/strong\u003e sends a report listing what moved and why, including an inline \u003cstrong\u003eUndo\u003c\/strong\u003e button. If tapped before expiry, the workflow restores the batch from \u003cstrong\u003eSpam back to Inbox\u003c\/strong\u003e and confirms the result in Telegram.\u003c\/li\u003e\n\u003c\/ul\u003e\n\n\u003ch3\u003eUse cases\u003c\/h3\u003e\n\u003cul\u003e\n  \u003cli\u003eReduce inbox clutter from newsletters, spam, and suspicious senders without manually checking Gmail.\u003c\/li\u003e\n  \u003cli\u003eSaaS operators automate low-risk cleanup of unread messages while keeping uncertain items untouched.\u003c\/li\u003e\n  \u003cli\u003eAutomation engineers need auditability via Telegram notifications and Google Sheets run logs.\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 nodes:\u003c\/strong\u003e if, set, code, gmail, switch, telegram\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eIntegrations:\u003c\/strong\u003e Gmail (OAuth2 with permission to read\/modify labels), OpenAI (model set to \u003cstrong\u003egpt-5\u003c\/strong\u003e), Telegram bot, Google Sheets run logging\u003c\/li\u003e\n\u003c\/ul\u003e","brand":"N8N Commerce","offers":[{"title":"Default Title","offer_id":46190235680947,"sku":"N8N-20630","price":36.99,"currency_code":"GBP","in_stock":true}],"thumbnail_url":"\/\/cdn.shopify.com\/s\/files\/1\/0749\/6279\/6723\/files\/cprW1COUofasF0jWePyXg_nu2e8CGh.png?v=1791450821","url":"https:\/\/buyflowscripts.com\/products\/n8n-workflow-auto-mark-unread-gmail-junk-with-gpt-5","provider":"N8N Commerce","version":"1.0","type":"link"}