n8n

How to Automate Gmail Support Replies?

Turn incoming emails into fast, accurate replies with a built in knowledge base and a simple approval step. Ideal for support teams and account managers who need short, correct responses without losing control.

New emails arrive through IMAP and are converted to clean Markdown. A summary is created so the model focuses on what matters. Company files from Google Drive are indexed into Qdrant, and an OpenAI agent uses that knowledge to write a reply under 100 words. A Gmail step sends the draft to a reviewer and waits for free text feedback. A classifier decides if the draft is approved. If not, a reviewer agent rewrites the message using the feedback. The final email is sent by SMTP to the original sender.

Setup is simple once the tools are connected. You set the Qdrant URL and collection name, pick the Google Drive folder, and run the manual path to build the vector index. Then you enable the IMAP trigger for live use. Expect faster replies, fewer mistakes, and a steady tone across messages. This fits customer support, pre sales, and simple account care.

What are the key features?

  • IMAP email trigger captures new messages as they arrive
  • Markdown conversion cleans HTML so the model reads content clearly
  • Summarization step creates a short brief for faster and focused drafting
  • Google Drive files are loaded, split into chunks, and embedded to Qdrant
  • Qdrant retrieval is used as a tool inside the OpenAI agent for RAG
  • OpenAI writes a concise reply under 100 words with a business tone
  • Gmail send and wait collects human feedback in free text form
  • Text classifier detects approval or requests for changes
  • Reviewer agent rewrites the draft based on the received feedback
  • SMTP send returns the final reply to the original sender with the right subject

What are the benefits?

  • Reduce drafting time from 10 minutes to 1 minute
  • Automate up to 70 percent of reply writing while keeping human approval
  • Improve answer accuracy by using company files stored in Qdrant
  • Handle up to 3 times more email volume with the same team
  • Connect Gmail, Google Drive, OpenAI, and Qdrant in one flow
  • Cut context switching by reviewing and approving inside email

How do you set it up?

  1. Import the template into n8n: Create a new workflow in n8n > Click the three dots menu > Select 'Import from File' > Choose the downloaded JSON file.
  2. You'll need accounts with Gmail, IMAP, SMTP, Google Drive, OpenAI, Qdrant and DeepSeek. See the Tools Required section above for links to create accounts with these services.
  3. In the n8n credentials manager, create IMAP credentials for the inbox you want to watch. Double click the Email Trigger node and in the Credential to connect with field click Create new credential, then follow the on screen steps.
  4. Create SMTP credentials for the sender mailbox used to send final replies. Open the Send Email node and create a new SMTP credential, then test the connection.
  5. Connect Gmail with OAuth2. Open the Gmail node, choose Create new credential, sign in to the reviewer Gmail account, and grant send and read permissions for send and wait.
  6. Connect Google Drive with OAuth2. Open the Google Drive nodes, create a new credential, and choose the folder that holds your company documents for the knowledge base.
  7. Set up OpenAI and DeepSeek API keys. For each node using these models, create a new credential and paste the API key from the vendor API page. Name credentials clearly, for example OpenAI Prod and DeepSeek Prod.
  8. Set up Qdrant access. In the Qdrant nodes and HTTP Request nodes, create a new Qdrant API credential and paste the API key and base URL. In the HTTP nodes, replace QDRANTURL and set the COLLECTION name.
  9. Build the knowledge base. Run the manual path that creates or refreshes the collection, downloads files from Google Drive, loads and splits text, and writes embeddings to Qdrant. Confirm the collection exists in your Qdrant dashboard.
  10. Review model settings. In the OpenAI node ensure the model is set to gpt 4o mini or your preferred model. In the agent nodes keep the system messages and word limits as provided, or adjust to your tone.
  11. Test end to end. Send a test email to the IMAP inbox. Check that a summary is created, a draft is written, Gmail sends an approval message, feedback returns, and the final email is sent by SMTP with the Re subject.
  12. Troubleshoot common issues. If Gmail approval does not arrive, verify Gmail OAuth scopes and that send and wait is enabled. If Qdrant fails, confirm the base URL, API key, and collection name. If no documents load, check Google Drive permissions. If sending fails, verify SMTP host, port, and from address.

Tools Required

$24 / mo or $20 / mo billed annually to use n8n in the cloud. However, the local or self-hosted n8n Community Edition is free.

DeepSeek

Sign up

$0.035/1M input tokens (cache hit), $0.135/1M input tokens (cache miss), $0.550/1M output tokens

Gmail

Sign up

No cost: Personal Gmail (Gmail API has no usage-based pricing; quotas apply)

Google Drive

Sign up

Drive API: $0 (no additional cost; quota-limited)

OpenAI

Sign up

Pay-as-you-go: GPT-5 at $1.25 per 1M input tokens and $10 per 1M output tokens

Qdrant

Sign up

Free tier: $0, 1 GB free cluster (no credit card), accessible via REST/GRPC API

Similar Templates

Join Futurise to access 1,200+ automation templates

Get instant access to ready-made automation workflows for n8n, Make.com, AI agents, and more. Download, customise, and deploy in minutes.