Route Items with Labels
The outcome: After this challenge, emails will automatically get labeled in Gmail based on their classification, creating instant visual organization. Your inbox becomes self-sorting.
Why this matters: Labels aren't just organization - they're an audit trail. When you check your inbox, you can immediately see what the AI classified each email as. If something's wrong, you can correct it. This visibility is crucial before you let AI agents respond automatically.
The Text Classifier already outputs to multiple branches. You'll add Gmail labels to each path, creating visual organization while setting up the routing for specialized AI agents.
What you'll learn:
- Multi-output routing - connecting different actions to classification results
- Gmail labels - automated inbox organization
- Audit trails - visibility into what automation decided
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 routing and labeling to your email triage workflow:
- After each Text Classifier output branch, add a Gmail node to add labels:
- High Priority → "High Priority" label
- Customer Support → "Support" label
- Finance/Billing → "Finance" label
- Promotions → "Promotions" label
- Create these labels in your Gmail account if they don't exist
- For each labeled email, prepare it for agent processing (you'll add agents in the next challenge)
Test it: Send yourself emails with different intents and verify they receive the correct labels in Gmail.
Expected result: Emails are labeled in Gmail based on their classification.
Get the exercise workflow
Create a free account to copy exercises into your n8n editor.