Classify Text with AI
The outcome: After this challenge, AI will automatically read each email and decide what type it is - urgent issue, support request, billing question, or promotional. No more scanning subject lines yourself.
Why this matters: Email triage is tedious, repetitive work. Enterprise help desks use AI classification to route tickets to the right teams. You're building the same capability - the difference between a junior support person and an AI-augmented one.
The Text Classifier node uses AI to categorize text into your predefined categories. You define what "High Priority" or "Support Request" means, and the AI makes the call for each email.
What you'll learn:
- Text Classifier node - AI-powered content categorization
- Category definitions - teaching AI what each category means
- Multi-output nodes - different paths based on classification
Your Task
- 1Copy the exercise below
- 2Paste into your n8n editor (Ctrl+V)
- 3Solve it — use hints if you get stuck
- 4Check the solution when done
Add email classification to your workflow:
- Connect a Text Classifier node after your Gmail Trigger
- Set the input text to the email body
- Define four categories with clear descriptions:
- High Priority: Urgent issues requiring immediate attention
- Customer Support: General questions and support requests
- Finance/Billing: Invoice, payment, and account issues
- Promotions: Marketing emails and promotional content
- Connect an OpenAI Chat Model (GPT-4o-mini works well)
Test it: Send yourself emails with different intents and verify they're classified correctly.
Expected output: Each email gets a classification category added to its data.
Get the exercise workflow
Create a free account to copy exercises into your n8n editor.