👉 n8n No Limits Access :

https://www.hostg.xyz/SHHAd

Hébergement VPS n8n | Automatisation sécurisée et évolutive

coupon -15% : DRFIRAS15

👉 Formation n8n en Français

Formation n8n en Français : Automatisation & Agents IA

coupon -20% : LANCEMENT : HERE


What you will build

A workflow that watches a Gmail support inbox, uses OpenAI to turn each email into a structured FAQ candidate (question + safe draft answer + score), logs every candidate to Google Sheets, and creates Google Docs / Gmail drafts for human review. Nothing is ever sent to a customer automatically.

This page is a build-along script: every node is documented in order, with copy-paste values, so you can recreate the workflow live.

Flow diagram

flowchart TD
    A["Gmail Trigger"] --> B["Configuration"]
    B --> C["Clean the email"]
    C --> D["Extract FAQ candidate (OpenAI)"]
    D --> E["Prepare FAQ candidate"]
    E --> F["Log to Google Sheets"]
    F --> G{"Route FAQ result"}
    G -->|draft_faq| H["Create FAQ draft doc"]
    H --> I["Insert FAQ draft body"]
    I --> J["Notify reviewer (Gmail draft)"]
    G -->|needs_human_review| K["Draft human review (Gmail)"]
    G -->|log_only| L["Logged only"]

Prerequisites & credentials

<aside> 🔑

You need four credentials in n8n. Create them once under Credentials → New, then select them on the matching nodes.

</aside>

Credential Type Used by How to create
Gmail account Gmail OAuth2 Gmail Trigger, both Gmail draft nodes New → Gmail OAuth2 → Sign in with Google → allow Gmail scope → Save. Click the test button to confirm.
OpenAi account OpenAI API OpenAI Chat Model Get an API key at platform.openai.com → API keys → Create. Paste it into the API Key field. Never use free OpenAI credits.
Google Sheets account Google Sheets OAuth2 Log to Google Sheets New → Google Sheets OAuth2 → Sign in with Google → allow Sheets + Drive scopes → Save.
Google Docs account Google Docs OAuth2 Create + Insert Docs nodes New → Google Docs OAuth2 → Sign in with Google → allow Docs + Drive scopes → Save.

<aside> 📄

Before the first run, create a Google Sheet and add a tab named FAQCandidates with the header columns listed in the Log to Google Sheets section below.

</aside>


Node 1 — Gmail Trigger

Type: n8n-nodes-base.gmailTrigger · Version: 1.4