Templates / Generate Lookio RAG-backed Gmail drafts from incoming emails with GPT-4.1

Generate Lookio RAG-backed Gmail drafts from incoming emails with GPT-4.1

Ready for 3.0

by Guillaume Duvernay ✓ · 35 views · created 2026-01-03 · Ticket Management, AI RAG

Ready for 3.0. This template uses no nodes that n8n 3.0 removes. No removed nodes, versions or helpers found. Static check, last run 2026-12-01.

📬 Weekly n8n 3.0 breakage alerts, free

What this workflow does

This AI workflow has 7 nodes and runs on Gmail events. Along the way it connects OpenAI Chat Model and Gmail.

How it runs

Trigger: On Gmail events.

  1. Formulate question for knowledge base (Basic LLM Chain): sends a prompt to an LLM, with model: OpenAI Chat Model
  2. Lookio API call (HTTP Request): calls an HTTP API (POST)
  3. Write email draft (Basic LLM Chain): sends a prompt to an LLM, with model: OpenAI Chat Model; output parser: Structured Output Parser
  4. Create email draft (Gmail): work with draft

Services it uses

OpenAI Chat ModelGmail

Before you upgrade to n8n 3.0

Nothing in this workflow is removed in n8n 3.0, so it should import and run after the upgrade.

  • Still check Gmail Trigger below v1.4 runs as v1.4 (drafts skipped, max emails per poll) (New email incoming).

Nodes used (6)

From the author

This n8n template automatically generates knowledge-backed draft email replies when a new message arrives in a connected Gmail account. The workflow extracts a clean question from the incoming email using an LLM, queries a Lookio assistant (your RAG knowledge…

Excerpt from Guillaume Duvernay's description on n8n.io.

View the original on n8n.io → Check your own copy

Get the weekly “what broke” email

New templates, newly broken ones, and n8n release changes. One short email a week.

Form not loading? Subscribe here.