Classify Emails and Send Replies with GPT-4o and gotoHuman for Supervision

Go to Workflow
150 views
Built by gotoHuman gotoHuman
Created on June 07, 2026

Description


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
The workflow is triggered for each new email which gets passed to an AI classification agent.
It assigns the email to one of the categories defined in the prompt (Customer Support, Sales opportunity, Promo, Personal,...). The agent also determines whether a reply is needed and if it is important.
If a reply is needed, we ask the AI Email Writer to draft a response. Even if it is missing context it can help us draft an outline for the response.
The email draft is sent to gotoHuman where the reviewer can manually edit it or ask to regenerate it with the option to even edit the prompt (Retries loop back to the AI Email Writer node)


Approved email replies are automatically sent from the workflow

How to set up

Most importantly, install the gotoHuman node before importing this template!
(Just add the node to a blank canvas before importing)
Set up your credentials for gotoHuman, OpenAI, and Gmail
In gotoHuman, select and create the pre-built review template "Email agent" or import the ID: v81wzxwYoFYvWpmuIBgX
Select this template in the gotoHuman node

Requirements

You need accounts for
gotoHuman (human supervision)
OpenAI (classification, drafting)
Gmail

How to customize

Change the predefined categories in the prompt of the AI classification agent
Provide the AI Email Writer with more context to create replies. Consider adding tools that allow the agent to fetch more infos about clients, your calendar, FAQs for your product,...

Nodes Used (4)

AI Agent
@n8n/n8n-nodes-langchain.agent
Gmail
n8n-nodes-base.gmail
OpenAI Chat Model
@n8n/n8n-nodes-langchain.lmChatOpenAi
Structured Output Parser
@n8n/n8n-nodes-langchain.outputParserStructured