← Back to blog

Route Support Emails by Department with Jev + n8n

Build idea, not a verified tutorial. This was drafted by an automation Daniel built. Tool interfaces change often — check the current docs before relying on the steps.

Every support inbox mixes billing complaints, technical bugs, and sales questions. Reading each one and deciding where it goes is slow, repetitive work. Jev — TypeSafe AI's brand-new System One model, launched September 15 2026 — classifies that kind of decision in under 500 ms for a fraction of a cent, so n8n can route the email before you even open your laptop.

TRIGGERORCHESTRATEAI / ENRICHOUTPUTNew email in GmailHTTP Request → JevAPIJev: Choice + NouldecisionSwitch node (billing/ technical / salesSlack message in theright channel
How it flows
1

Get your Jev API key

Jev is in early access. Go to console.typesafe.ai, sign up, and copy the API key it shows you. An API key is a long string of letters and numbers that proves to Jev you have permission to use it — treat it like a password and never share it. Keep this key in a text file for now; you'll paste it into n8n in a moment.

console.typesafe.ai · API key page
1 Create a new key
Create API key
2 Copy your new key
ts_live_xxxxxxxxxxxxxxxxxxxxCopy
3 Store it safely
Paste it somewhere private. You cannot see the full key again after you close this screen. TypeSafe quickstart →
2

Create a new n8n workflow

n8n is a free, open-source automation tool where you connect steps together visually. Each step is called a node. Open your n8n instance (cloud or self-hosted) and create a blank workflow so you have a clean canvas to build on.

n8n · Workflows overview
1 Open the create menu (top-left)
+ New workflow
2 Name your workflow
NameSupport email router – Jev
3

Add a Gmail trigger

A trigger is the node that starts the workflow. Here you want n8n to watch your support inbox and fire whenever a new email arrives. Click Add first step… on the canvas, search for Gmail, and choose the trigger (not the action).

n8n · Node picker
1 Open the node picker
Add first step…
2 Find the Gmail trigger
3 Choose what to watch for
MR Message ReceivedNE New EmailNLE New Labeled Email
4 Connect your Google account and set the inbox
CredentialConnect Google OAuth2
LabelINBOX
Poll intervalEvery minute
4

Call the Jev API with an HTTP Request node

Add an HTTP Request node — this is n8n's built-in way to talk to any web API. You'll point it at TypeSafe's API and send the email's subject + body as the state (the text Jev will read), along with three typed questions. Jev evaluates all questions at once in one fast call.

n8n · HTTP Request node
1 Add the node
2 Configure the request
MethodPOST
URLhttps://api.typesafe.ai/v1/system-one
AuthenticationGeneric Credential Type → Header Auth
Header nameAuthorization
Header valueBearer ts_live_xxxx ← paste your key
3 Paste this JSON into the Body field (set Body Content Type → JSON)
{ "model": "jev-latest", "state": "{{ $json.subject }}\n\n{{ $json.text }}", "questions": { "department": { "type": "choice", "instructions": "Which team should handle this email", "criteria": { "billing": "Payments, invoices, refunds, charges", "technical": "Bugs, outages, broken integrations", "sales": "Pricing, upgrades, new accounts" } }, "is_urgent": { "type": "noul", "instructions": "The email conveys urgency or time-sensitivity" } } }
Returns{ department: { choice: 'technical', confidence: 0.91 }, is_urgent: { noul: 0.94 } }
5

Branch with a Switch node

The Switch node looks at the `department` value Jev returned and sends the email data down one of three lanes — billing, technical, or sales. Think of it like a post-office sorter: one input, multiple output slots. Add it after the HTTP Request node.

n8n · Switch node
1 Add the node
2 Set up Rules mode
ModeRules
Input field{{ $json.answers.department.choice }}
3 Add one rule per department (use + Add routing rule)
Rule 1 — Value equalsbilling → rename output: billing
Rule 2 — Value equalstechnical → rename output: technical
Rule 3 — Value equalssales → rename output: sales
Enable Fallback output for anything unrecognised
6

Send a Slack message in the right channel

Connect a Slack node to each output of the Switch node. Each one posts a short summary to its own channel — #billing-support, #tech-support, #sales-support. You can also prefix the message with 🚨 when `is_urgent` is above 0.8, so on-call staff notice immediately.

n8n · Slack node (one per branch)
1 Add to the billing branch first
2 Choose the operation
SAM Send a messagePTC Post to channelUAM Update a message
3 Configure the message
CredentialConnect your Slack workspace
Channel#billing-support
Message text{{ $json.answers.is_urgent.noul > 0.8 ? '🚨 URGENT — ' : '' }}New email: {{ $('Gmail Trigger').item.json.subject }} From: {{ $('Gmail Trigger').item.json.from }} Confidence: {{ $json.answers.department.confidence }}
4 Repeat for the other two branches
Duplicate the Slack node, change the Channel to #tech-support and #sales-support respectively. n8n Slack node docs →
7

Test, then publish the workflow

Click Test workflow to send a real email through the whole flow and check each node's output in the panel on the right. When everything looks right, click Publish — n8n keeps the workflow running 24/7 from that point on. You don't need to leave your computer on.

n8n · Canvas toolbar
1 Run once to verify each step
Test workflow
2 Jev's answer in the HTTP node output
Jev decisiontechnical · 91% confident
department.choicetechnical
department.confidence0.91
is_urgent.noul0.94
3 Activate 24/7 automatic routing
Publish

What you get

Every new email that lands in your support inbox gets classified and posted to the right Slack channel — billing, technical, or sales — with an urgency flag, before anyone has read it. The whole Jev call costs less than $0.001 per email. Rough effort: ~2 hours, free tiers (n8n Cloud free tier + TypeSafe early-access key; Jev input costs $0.042 per million tokens).

Sources