Templates / Draft and approve Gmail replies with OpenAI, Cognee, Slack, and Google Sheets

Draft and approve Gmail replies with OpenAI, Cognee, Slack, and Google Sheets

Needs changes

by Rahul Joshi ✓ · 17 views · created 2026-09-24 · Ticket Management, AI RAG

Needs changes. This template uses 1 thing(s) that n8n 3.0 removes: AI Agent v1 (old agent modes). 1 breaking item(s) found. Static check, last run 2026-12-01.

📬 Weekly n8n 3.0 breakage alerts, free

What this workflow does

This AI workflow has 20 nodes and runs on Gmail events (plus 1 other trigger). Along the way it connects Slack, Google Sheets, Gmail and OpenAI Chat Model and 1 more.

How it runs

Trigger: On Gmail events (plus 1 other trigger).

  1. Is Automated Sender? (If): checks a condition and branches into true / false
  2. Format Error Message (Edit Fields (Set)): sets 4 fields: errorMessage, failedNode, workflowName…
  3. Classify: Needs Reply? (Basic LLM Chain): sends a prompt to an LLM, with model: OpenAI Chat Model; output parser: Reply Classification Schema
  4. Notify Error in Slack (Slack): uses Slack
  5. Needs a Reply? (If): checks a condition and branches into true / false
  6. Draft Reply Agent (AI Agent): runs an AI agent, with model: OpenAI Chat Model; 1 tool (Search Company Brain (Cognee))
  7. Create Gmail Draft (Gmail): work with draft
  8. Request Approval in Slack (Slack): send and wait for a reply
  9. Approved? (If): checks a condition and branches into true / false
  10. Mark Approved (Edit Fields (Set)): sets 5 fields: timestamp, from, subject…

…plus 2 more steps. See the full node list below.

Services it uses

SlackGoogle SheetsGmailOpenAI Chat ModelCognee (community)

Before you upgrade to n8n 3.0

1 thing in this workflow is removed in n8n 3.0. Fix it before you upgrade:

  • AI Agent v1 (old agent modes) in Draft Reply Agent (v1.9): replace with Latest AI Agent node (Tools Agent). For SQL Agent, use a Postgres or MySQL tool with a recent AI Agent.
  • Also check Gmail Trigger below v1.4 runs as v1.4 (drafts skipped, max emails per poll).

Rather not rewrite it? Many of these flows can be rebuilt in Make (free plan).

Published 2026 — 6% of 2026 templates need changes for 3.0. See how template age affects 3.0 readiness →

Removed in 3.0Replace with
AI Agent v1 (old agent modes)
Draft Reply Agent (v1.9)
Latest AI Agent node (Tools Agent). For SQL Agent, use a Postgres or MySQL tool with a recent AI Agent.

Nodes used (13)

From the author

Quick overview This workflow monitors a Gmail inbox for new messages, uses OpenAI to decide whether a reply is needed, drafts grounded replies with a Cognee knowledge base, saves them as Gmail drafts, and requests human approval in Slack while logging…

Excerpt from Rahul Joshi'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.