{"product_id":"answer-gmail-support-emails-with-gemini-slack-in-n8n","title":"Answer Gmail Support Emails with Gemini \u0026 Slack in n8n","description":"\u003ch3\u003eAnswer Gmail support emails with Gemini—backed by your docs—and escalate gaps to Slack\u003c\/h3\u003e\n\u003cp\u003eThis n8n workflow watches your Gmail \u003cb\u003eSupport\u003c\/b\u003e label, retrieves the most relevant passages from your documentation (indexed via Google Gemini embeddings), and drafts a \u003cb\u003egrounded Gmail reply\u003c\/b\u003e. If the docs don’t cover the question, it sends the missing context to \u003cb\u003eSlack\u003c\/b\u003e and logs it for documentation follow-up.\u003c\/p\u003e\n\n\u003ch3\u003eWhat this workflow does\u003c\/h3\u003e\n\u003cul\u003e\n  \u003cli\u003e\n\u003cb\u003eIndexes your documentation\u003c\/b\u003e by running manually to fetch a docs sitemap (supports both \u003ci\u003esitemapindex\u003c\/i\u003e and flat sitemap formats), collecting eligible page URLs.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cb\u003eBuilds a searchable passage library\u003c\/b\u003e: downloads each page, extracts the main article content, splits it into overlapping text passages, and generates \u003cb\u003eGoogle Generative Language (Gemini) embeddings\u003c\/b\u003e for each passage.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cb\u003eStores and refreshes the index\u003c\/b\u003e in an \u003cb\u003en8n Data Table\u003c\/b\u003e: normalizes vectors and upserts passage records (text, URL, title, vector, and the run ID), then deletes older rows from previous indexing runs.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cb\u003eMonitors Gmail\u003c\/b\u003e every few minutes for new unread emails with the specified Support label, extracts the new question (removing quoted history), and embeds the question with Gemini.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cb\u003eFinds top matching answers\u003c\/b\u003e by loading the stored passage index from the Data Table, computing cosine similarity, and stopping early when the best match falls below a configurable minimum score.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cb\u003eDrafts grounded replies and audits them\u003c\/b\u003e using Gemini from the retrieved passages only, then runs a second Gemini pass to audit claims against the same passages.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cb\u003eResponds or escalates\u003c\/b\u003e: if the audit passes, it creates a Gmail draft reply in the original thread; if coverage is insufficient, it escalates to \u003cb\u003eSlack\u003c\/b\u003e and logs the gap for documentation follow-up.\u003c\/li\u003e\n\u003c\/ul\u003e\n\n\u003ch3\u003eUse cases\u003c\/h3\u003e\n\u003cul\u003e\n  \u003cli\u003eSaaS teams reducing support response time by turning documentation into \u003cb\u003edraft Gmail replies\u003c\/b\u003e.\u003c\/li\u003e\n  \u003cli\u003eAutomation engineers maintaining a \u003cb\u003eGemini + n8n\u003c\/b\u003e knowledge index that stays current via sitemap re-indexing.\u003c\/li\u003e\n  \u003cli\u003eOperators routing out-of-coverage questions to Slack so docs can be updated quickly.\u003c\/li\u003e\n\u003c\/ul\u003e\n\n\u003ch3\u003eTechnical details\u003c\/h3\u003e\n\u003cul\u003e\n  \u003cli\u003e\n\u003cb\u003en8n nodes:\u003c\/b\u003e if, set, code, gmail, merge, slack\u003c\/li\u003e\n  \u003cli\u003e\n\u003cb\u003eCore components:\u003c\/b\u003e Gmail label trigger, Data Table passage index, Gemini embeddings, cosine similarity scoring, grounded JSON reply + audit\u003c\/li\u003e\n\u003c\/ul\u003e","brand":"N8N Commerce","offers":[{"title":"Default Title","offer_id":45931136516275,"sku":"N8N-18950","price":32.99,"currency_code":"GBP","in_stock":true}],"thumbnail_url":"\/\/cdn.shopify.com\/s\/files\/1\/0749\/6279\/6723\/files\/xSFSHN1lU-MoUhyN7xzwI_J0IEGjss.png?v=1788254372","url":"https:\/\/buyflowscripts.com\/products\/answer-gmail-support-emails-with-gemini-slack-in-n8n","provider":"N8N Commerce","version":"1.0","type":"link"}