Automate Email Management with OpenAI Classification, Gmail Drafts & Slack Alerts

Go to Workflow
140 views
Built by Fabian ZNTL Fabian ZNTL
Created on June 05, 2026

Description

What it does
This workflow automatically processes incoming emails with intelligent AI classification, creating draft responses and sending Slack notifications based on email content.

How it works
Monitors emails with the 'AI-Agent' label
AI classification into categories: Inquiry, Support, Newsletter, Action Item
Adds appropriate labels to emails automatically
Creates draft replies for Support and Inquiry emails
Sends Slack notifications for Action Items and Newsletter summaries

Setup Requirements
Gmail OAuth2 credentials configured
OpenAI API credentials (or other AI provider)
Slack OAuth2 credentials (if notifications desired)
Gmail labels created (see setup instructions below)

How to customize
Modify classification categories in the AI Agent
Adjust label mappings in the Parse Classification node
Customize draft response templates
Configure different Slack channels for different email types

Nodes Used (5)

AI Agent
@n8n/n8n-nodes-langchain.agent
Code
n8n-nodes-base.code
Gmail
n8n-nodes-base.gmail
OpenAI Chat Model
@n8n/n8n-nodes-langchain.lmChatOpenAi
Slack
n8n-nodes-base.slack