Triage support emails and draft Gmail replies with OpenAI
Quick overview This workflow monitors Gmail for new messages, detects emails by subject keywords, uses OpenAI to draft a reply grounded only in your provided guidelines, and saves the response as a Gmail draft in the original thread for manual review.
How it works Triggers every minute when a new email arrives in Gmail. Checks the email subject for support-style keywords (for example “pricing”, “refund”, or “help”) and continues only if it matches. Adds your FAQ/policy text as context for the response. Uses OpenAI (GPT-4o-mini) to generate a friendly, concise reply using only the FAQ content and the incoming email snippet. Creates a Gmail draft reply (not sent) with “Re:” subject and the original thread ID so it stays on the same conversation.
Setup Connect your Gmail OAuth2 credentials for both the Gmail trigger and the Gmail draft action. Add your OpenAI credentials for the OpenAI Chat Model node. Replace the placeholder FAQ/policy text in the FAQ context step with your real support content. Update the subject keyword filters to match the types of support/FAQ messages you want to auto-draft replies for.
Related Templates
Get Airtable data via AI and Obsidian Notes
I am submitting this workflow for the Obsidian community to showcase the potential of integrating Obsidian with n8n. Whi...
AI SEO Readability Audit: Check Website Friendliness for LLMs
Who is this for? This workflow is designed for SEO specialists, content creators, marketers, and website developers who ...
Use OpenRouter in n8n versions <1.78
What it is: In version 1.78, n8n introduced a dedicated node to use the OpenRouter service, which lets you to use a lot...
🔒 Please log in to import templates to n8n and favorite templates
Workflow Visualization
Loading...
Preparing workflow renderer
Comments (0)
Login to post comments