See llms.txt for all machine-readable content.

Back to Templates

Turn support emails into FAQ drafts with Gmail, OpenAI, Sheets and Docs

Created by

Created by: Dr. Firas || drfiras
Dr. Firas

Last update

Last update 2 days ago

Categories

Share


Quick overview

This workflow monitors a Gmail inbox for new support-style emails, uses OpenAI to extract a reusable FAQ question and safe draft answer, logs results to Google Sheets, and then creates a Google Docs draft and/or Gmail review drafts for a human reviewer.

How it works

  1. Polls Gmail every 5 minutes for unread emails matching the configured support-related search query.
  2. Cleans the email content by stripping quoted replies, signatures, and HTML to produce a concise plain-text body.
  3. Sends the cleaned email and product context to OpenAI to extract a structured FAQ candidate (question, draft answer, category, score, sensitivity flag, tags, and recommended action).
  4. Calculates a routing status based on the FAQ score threshold and sensitivity/recommended action, and prepares draft text for a Google Doc and reviewer email.
  5. Appends every processed email and extracted fields to a Google Sheets tab for tracking and reporting.
  6. If the candidate is strong, creates a Google Docs FAQ draft, inserts the draft content, and creates a Gmail draft notification to the reviewer with the document link.
  7. If the candidate needs manual handling, creates a Gmail draft to the reviewer with the review notes and suggested customer reply, otherwise it takes no further action beyond logging.

Setup

  1. Connect credentials for Gmail, OpenAI, Google Sheets, and Google Docs in n8n.
  2. Create or choose a Google Sheet and ensure the target tab (for example, "FAQCandidates") exists with columns matching the fields being appended.
  3. In the configuration values, set your product/service name, Google Sheet ID and tab name, Google Docs folder ID, reviewer email address, FAQ score threshold, and the OpenAI model to use.
  4. Adjust the Gmail trigger search query and polling interval to match your support inbox and filtering needs.

Additional info

Turn customer support emails into FAQ drafts with Gmail, OpenAI, Sheets and Docs

📥 Open full documentation on Notion

Need help customizing?

Contact me for consulting and support : Linkedin

MY NEW YOUTUBE CHANNEL

👉 Subscribe to my new YouTube channel. Here I'll share videos and Shorts with practical tutorials and FREE templates for n8n.

The AI Doctor