CASE STUDY 06 / 08 · INBOX AUTOMATION
AI Email Triage & Drafting Assistant
This n8n workflow starts with a Gmail trigger, classifies incoming emails into four categories, adds a matching Gmail label and passes each category to its own AI agent. The agents connect to a shared OpenAI chat model and a Gmail draft action; the priority path also connects to a Telegram notification.

01 / THE PROBLEM
The challenge.
A busy inbox mixes support requests, billing questions, promotions and urgent messages. Sorting each one and preparing a relevant response takes attention away from other work.
02 / THE SOLUTION
The connected answer.
This n8n workflow starts with a Gmail trigger, classifies incoming emails into four categories, adds a matching Gmail label and passes each category to its own AI agent. The agents connect to a shared OpenAI chat model and a Gmail draft action; the priority path also connects to a Telegram notification.
03 / HOW IT WORKS
Inside the logic.
The Gmail Trigger watches for a new email. Its message flows into a Text Classifier, which chooses one of four paths: support, finance/billing, promotions or priority.
Each path first applies a category label in Gmail. That labelled message then moves to a dedicated AI agent for that type of request. The workflow image shows all four agents using an OpenAI chat model and connecting to a Gmail action that creates a draft.
The priority agent has an additional Telegram text-message step, giving that path a separate notification. The image shows draft creation, not automatic sending of a reply; the final text and any follow-up still need review.
- 01
New email arrives
A Gmail Trigger starts the workflow.
- 02
Classify the email
A Text Classifier selects support, finance/billing, promotions or priority.
Support
Apply a Support label and route to the customer support agent.
Finance/Billing
Apply a Finance/Billing label and route to the finance agent.
Promotions
Apply a Promotion label and route to the promotions agent.
Priority
Apply a Priority label and route to the priority agent.
- 03
Prepare a category-specific draft
Each AI agent is connected to an OpenAI chat model and a Gmail create-draft tool.
- 04
Flag the priority path
The priority agent also leads to a Telegram text-message step.
BUILD GUIDE
How to build it.
A practical guide to recreating this workflow in n8n.
- 01
Start with incoming mail
Add a Gmail Trigger in n8n and connect the mailbox to watch for new messages.
- 02
Classify each message
Connect a Text Classifier to the trigger and define four categories: support email, finance/billing, promotions and priority. Connect the OpenAI Chat Model to its model input.
- 03
Add the Gmail labels
Create a Gmail add-label step on each classifier branch, using the matching Support, Finance/Billing, Promotion or Priority label.
- 04
Set up the four agents
After each label step, connect a dedicated AI Agent for customer support, finance, promotions or priority. Give each agent category-specific instructions and attach the OpenAI Chat Model.
- 05
Connect draft creation
Attach the Gmail create-draft action as a tool for the agents. Keep it as a draft rather than automatically sending the response.
- 06
Add priority notification
Connect the priority agent to a Telegram send-text-message step so that branch can notify someone separately.
- 07
Test every category
Send sample emails for each of the four categories, check the applied label and draft, and inspect the priority Telegram branch before activating the workflow.
04 / TECHNOLOGY USED
Connected tools.
05 / WORKFLOW SCREENSHOTS
Behind the build.
AI Email Triage & Drafting Assistant workflow in n8n
Select the image to enlarge.
06 / RESULT
What it demonstrates.
The pictured workflow sorts incoming Gmail messages into four labelled paths, hands each to a category-specific AI agent for draft preparation and adds a Telegram message on the priority path. The diagram does not show automatic sending of a finished reply.
WHAT THIS PROJECT SHOWS
UP NEXT
AI Image Generator