{"product_id":"n8n-gmail-auto-reply-drafts-with-openrouter-qwen-docs-rag","title":"n8n Gmail Auto-Reply Drafts with OpenRouter Qwen + Docs RAG","description":"\u003ch3\u003eAuto-Reply Gmail emails with Qwen—when it’s safe, draft for review when it isn’t\u003c\/h3\u003e\n\u003cp\u003eThis n8n workflow watches your \u003cstrong\u003eGmail inbox\u003c\/strong\u003e, uses \u003cstrong\u003eOpenRouter (Qwen)\u003c\/strong\u003e to decide whether an incoming message should be auto-replied, drafted for human review, or ignored—and grounds its responses using your \u003cstrong\u003eGoogle Docs knowledge base\u003c\/strong\u003e.\u003c\/p\u003e\n\n\u003ch3\u003eWhat this workflow does\u003c\/h3\u003e\n\u003cul\u003e\n  \u003cli\u003e\n\u003cstrong\u003eChecks for new Gmail messages every minute\u003c\/strong\u003e using a Gmail trigger.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eFetches the full email content\u003c\/strong\u003e (via the Gmail message ID).\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eClassifies the email with OpenRouter (Qwen)\u003c\/strong\u003e as one of three actions: \u003cem\u003eReply\u003c\/em\u003e, \u003cem\u003eDraft\u003c\/em\u003e, or \u003cem\u003eNothing\u003c\/em\u003e—based on sensitivity and whether action is required.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eIf classified as “Reply”\u003c\/strong\u003e: retrieves relevant reference content from a \u003cstrong\u003eGoogle Docs\u003c\/strong\u003e knowledge base, generates a final response with Qwen, and \u003cstrong\u003esends the reply in Gmail\u003c\/strong\u003e.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eIf classified as “Draft”\u003c\/strong\u003e: pulls reference content from the same \u003cstrong\u003eGoogle Docs\u003c\/strong\u003e sources, generates a suggested response with Qwen, and \u003cstrong\u003esaves it as a Gmail draft\u003c\/strong\u003e threaded with the original conversation and addressed to the sender.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eIf classified as “Nothing”\u003c\/strong\u003e: the workflow takes no further action.\u003c\/li\u003e\n\u003c\/ul\u003e\n\n\u003ch3\u003eUse cases\u003c\/h3\u003e\n\u003cul\u003e\n  \u003cli\u003eReduce support response time by auto-replying common, low-risk questions while sending higher-sensitivity emails to draft mode.\u003c\/li\u003e\n  \u003cli\u003eTurn internal documentation into actionable email responses by grounding answers in your Google Docs knowledge base.\u003c\/li\u003e\n  \u003cli\u003eGive teams a “human review” safety net: sensitive messages become \u003cstrong\u003eGmail drafts\u003c\/strong\u003e instead of immediate sends.\u003c\/li\u003e\n\u003c\/ul\u003e\n\n\u003ch3\u003eTechnical details (n8n + integrations)\u003c\/h3\u003e\n\u003cul\u003e\n  \u003cli\u003e\n\u003cstrong\u003eGmail Trigger\u003c\/strong\u003e (polls every minute) + Gmail actions for \u003cstrong\u003ereading\u003c\/strong\u003e, \u003cstrong\u003ereplying\u003c\/strong\u003e, and \u003cstrong\u003ecreating drafts\u003c\/strong\u003e.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eOpenRouter API\u003c\/strong\u003e using \u003cstrong\u003eQwen\u003c\/strong\u003e (example model: \u003cem\u003eqwen\/qwen-2.5-7b-instruct\u003c\/em\u003e).\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eGoogle Docs Tool\u003c\/strong\u003e to pull reference content from two knowledge-base document URLs.\u003c\/li\u003e\n  \u003cli\u003eWorkflow control via nodes including \u003cstrong\u003eSwitch\u003c\/strong\u003e (Reply\/Draft\/Nothing branching), plus supporting nodes like \u003cstrong\u003eNoOp\u003c\/strong\u003e and \u003cstrong\u003eSticky Note\u003c\/strong\u003e.\u003c\/li\u003e\n\u003c\/ul\u003e\n\n\u003cp\u003e\u003cstrong\u003eSetup requirements:\u003c\/strong\u003e connect OAuth2 credentials for Gmail and Google Docs (read, reply, create drafts; and Docs access), add an OpenRouter API credential, and replace the two Google Docs document URLs with your own knowledge-base files.\u003c\/p\u003e","brand":"N8N Commerce","offers":[{"title":"Default Title","offer_id":45726238867635,"sku":"N8N-17470","price":46.99,"currency_code":"GBP","in_stock":true}],"thumbnail_url":"\/\/cdn.shopify.com\/s\/files\/1\/0749\/6279\/6723\/files\/PcXx5mSdPr91_pDlrv__K_aAORZyt2.png?v=1785056895","url":"https:\/\/buyflowscripts.com\/products\/n8n-gmail-auto-reply-drafts-with-openrouter-qwen-docs-rag","provider":"N8N Commerce","version":"1.0","type":"link"}