{"product_id":"n8n-gmail-ai-classifier-log-enquiries-to-google-sheets","title":"n8n Gmail AI Classifier: Log Enquiries to Google Sheets","description":"\u003ch3\u003eTurn every real Gmail enquiry into a clean, structured Google Sheets log—automatically\u003c\/h3\u003e\n\u003cp\u003eThis n8n workflow polls your Gmail inbox, filters out auto-replies and bounce emails, then uses an OpenAI-compatible Chat Completions model to classify genuine enquiries and append them as validated rows in Google Sheets.\u003c\/p\u003e\n\n\u003ch3\u003eWhat this workflow does\u003c\/h3\u003e\n\u003cul\u003e\n  \u003cli\u003e\n\u003cstrong\u003ePolls Gmail every 15 minutes\u003c\/strong\u003e and fetches emails \u003cem\u003eregardless of read status\u003c\/em\u003e.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eFilters and normalizes incoming messages\u003c\/strong\u003e by removing common machine-generated emails (e.g., out-of-office replies and delivery failures) and standardizing key fields such as sender, reply-to, subject, body, and a short excerpt.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eClassifies enquiries with OpenAI-compatible chat\u003c\/strong\u003e by sending the email content to the OpenAI Chat Completions API to generate a JSON output.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eValidates, sanitizes, and hardens the AI result\u003c\/strong\u003e against allowed values, escalates to high priority when required, substitutes missing or out-of-range fields, and sanitizes text to prevent Google Sheets formula injection.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eAppends one structured row per enquiry\u003c\/strong\u003e into Google Sheets with received time, sender details, the AI classification (category, priority, sentiment, language, summary, recommended action), and the excerpt.\u003c\/li\u003e\n\u003c\/ul\u003e\n\n\u003ch3\u003eUse cases\u003c\/h3\u003e\n\u003cul\u003e\n  \u003cli\u003eSupport and sales teams who want \u003cstrong\u003eautomatic lead\/enquiry logging\u003c\/strong\u003e directly from Gmail into Google Sheets.\u003c\/li\u003e\n  \u003cli\u003eSaaS operators tracking incoming requests and prioritizing tickets without manual triage.\u003c\/li\u003e\n  \u003cli\u003eAutomation engineers building an \u003cstrong\u003eAI-assisted email intake pipeline\u003c\/strong\u003e using n8n, Gmail, OpenAI-compatible models, and Google Sheets.\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 Trigger\u003c\/strong\u003e (polling interval + search query settings)\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eHTTP Request\u003c\/strong\u003e to OpenAI-compatible \u003cem\u003eChat Completions\u003c\/em\u003e API\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eCode + Set\u003c\/strong\u003e steps for formatting, validation, and escalation logic\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eGoogle Sheets\u003c\/strong\u003e integration to append structured rows (with formula injection protection)\u003c\/li\u003e\n\u003c\/ul\u003e\n\u003cp\u003ePerfect for n8n automation workflow builders who need reliable, structured enquiry classification from Gmail.\u003c\/p\u003e","brand":"N8N Commerce","offers":[{"title":"Default Title","offer_id":45761004634291,"sku":"N8N-17832","price":2.99,"currency_code":"GBP","in_stock":true}],"thumbnail_url":"\/\/cdn.shopify.com\/s\/files\/1\/0749\/6279\/6723\/files\/vNiE3fuW1dObPhoOKmyi3_Og2MZdgR.png?v=1785920912","url":"https:\/\/buyflowscripts.com\/products\/n8n-gmail-ai-classifier-log-enquiries-to-google-sheets","provider":"N8N Commerce","version":"1.0","type":"link"}