Build An n8n AI Agent For Your Company - Classify, reply, and route emails with a simple AI flow

by
Build a practical AI Agent System in n8n that reads unread emails, classifies them as Sales, Support, HR, or Spam, then sends each one to the right place. The workflow uses Gmail, Google Gemini, Notion, Telegram, and Google Drive, with human review and error handling added so it works beyond a basic demo.

Add a comment

Replies

Best
Maker
📌
Hi Product Hunt 👋 This video is a practical build of an AI Agent System using n8n. The pain point is simple: shared inboxes get messy fast. One person has to read every email, decide what it is, copy details into another app, forward messages to the right team, and hope nothing important gets buried. So I wanted to build a workflow that handles the repetitive part. Inside the video, I cover: - Gmail Trigger for collecting unread emails - Cleaning email data before sending it to the agent - Getting and connecting a Google Gemini API key - Building the AI Agent inside n8n - Forcing the agent to return structured JSON - Adding category, summary, priority, and confidence score - Creating a Human Review Gate for unclear emails - Using a Switch node to route Sales, Support, HR, and Spam - Sending Sales emails into a Notion lead database - Sending Support alerts to Telegram - Saving HR attachments into Google Drive - Marking Spam emails as read - Testing the full system with multiple email formats - Adding basic error handling before publishing The main idea is to show how an AI Agent workflow should behave beyond a simple demo. It needs to classify correctly, route correctly, and stop when the message is too unclear. I also cover the limits: this still needs testing, human review, good field mapping, and careful rollout before using it with important customer emails. Curious to hear from you: would you use n8n for inbox automation, or would you rather build this kind of agent with another automation stack?