Getting Started
Create Your First Workflow
This guide walks you through building a complete, real-world workflow: automatically classifying and routing inbound support emails with AI.
What We'll Build
When a new email arrives → AI classifies the topic → Route to the right team → Log to a spreadsheet
1. Set Up the Email Trigger
- Open the Canvas and add an Email (IMAP) trigger node
- Click Add Credential → select Email (IMAP)
- Enter your mailbox details and click Save
- Set Check Every to
1 minute - Set Folder to
INBOX
2. Add an AI Classification Node
- Connect a new node from the trigger
- Search for AI Agent → select LLM: Classify Text
- In the System Prompt field, enter:
You are a support ticket classifier for riogentix.
Given the email subject and body, respond with ONLY one of these categories:
BILLING, TECHNICAL, FEATURE_REQUEST, ACCOUNT, OTHER
- Map the Input field to
{{ $json.subject }} - {{ $json.text }} - Set Output Key to
category
3. Add a Switch Node for Routing
- Connect a Switch node after the AI node
- Add routing rules:
- category == "BILLING" → output 1 - category == "TECHNICAL" → output 2 - category == "FEATURE_REQUEST" → output 3 - Default → output 4
4. Connect Team Channels
For each output, add a Slack or Microsoft Teams node:
- Output 1 (BILLING) → Post to
#billing-support - Output 2 (TECHNICAL) → Post to
#tech-support - Output 3 (FEATURE_REQUEST) → Post to
#product-feedback - Output 4 (OTHER) → Post to
#support-general
5. Log Everything to Google Sheets
- Connect all outputs to a Merge node
- Add a Google Sheets node after the merge
- Map columns: Date, From, Subject, Category, Slack Channel
6. Test and Activate
- Send a test email to your monitored inbox
- Click Test Workflow — watch each node light up green
- Verify the Slack message and spreadsheet row
- Click Save → toggle Active
Your AI-powered email router is live!
What's Next
- Add error handling with a Try/Catch node
- Set up a Retry policy for transient API failures
- Explore [Working with AI Agents](/docs/ai-agents-intro) for more advanced patterns