Classify emails and send replies with GPT-4o and gotoHuman for supervision
UnknownWhat this workflow does
This AI workflow has 15 nodes and runs on Gmail events. Along the way it connects OpenAI Chat Model, Gmail and Gotohuman (community).
How it runs
Trigger: On Gmail events.
- AI Classifier (AI Agent): runs an AI agent, with model: OpenAI Chat Model; output parser: Structured Output
- Needs Human Attention? (Switch): routes items into 3 branches
- Set Prompt (Edit Fields (Set)): sets 1 field: prompt
- Goto Human: uses Goto Human
- AI Email Writer (AI Agent): runs an AI agent, with model: OpenAI Chat Model; output parser: Structured Output
- Human response (Switch): routes items into 3 branches
- Reply to thread (Gmail): reply
- Set (edited) prompt (Edit Fields (Set)): sets 2 fields: prompt, reviewToUpdate
Services it uses
Before you upgrade to n8n 3.0
We can't fully verify this one: it relies on 1 community package, and n8n 3.0 turns unverified community packages off by default (N8N_UNVERIFIED_PACKAGES_ENABLED=false).
- Check that @gotohuman/n8n-nodes-gotohuman is verified or supports 3.0 (used in gotoHuman: Human review).
- Also check Gmail Trigger below v1.4 runs as v1.4 (drafts skipped, max emails per poll).
Nodes used (9)
- OpenAI Chat Model
@n8n/n8n-nodes-langchain.lmChatOpenAi - Gmail Trigger
n8n-nodes-base.gmailTrigger - AI Agent
@n8n/n8n-nodes-langchain.agent - No Operation, do nothing
n8n-nodes-base.noOp - Edit Fields (Set)
n8n-nodes-base.set - Structured Output Parser
@n8n/n8n-nodes-langchain.outputParserStructured - Switch
n8n-nodes-base.switch - Goto Human
@gotohuman/n8n-nodes-gotohuman.gotoHuman - Gmail
n8n-nodes-base.gmail
From the author
Let AI classify your incoming emails and draft replies. Use gotoHuman to approve emails before they are sent out. It also lets you manually edit the draft or even ask for a retry. How it works 1. The workflow is triggered for each new email which gets passed…