Build a Jev-Gated Inbox Autopilot

Test Jev’s typed decisions, confidence, and guardrails in a live inbox agent.

Introduction

30 Second Summary

Your inbox can fill with receipts, newsletters, client requests, and urgent personal messages before you have time to sort them. The risky part is letting automation act when its judgment is uncertain.

In this project, you will build an inbox autopilot that uses Jev to label Gmail messages as Clients, Receipts, Newsletters, or Personal. High-confidence decisions can apply labels or archive newsletters, while uncertain emails go to Autopilot/Unsure for review.

What You'll Build

You’ll watch Jev explain a clear email, wrestle with an ambiguous one, and control a live inbox only when its evidence passes your safety policy.

By the end of this project, you'll have:

  • 🔍 A typed n8n decision output where you inspect the category choice, probabilities, confidence, urgency, and real-person estimate for a live email.
  • 📨 A three-message stress test that shows how Jev responds to clear, mixed-intent, and vague email evidence.
  • 🚦 A confidence-gated inbox agent that acts on supported decisions and sends weak decisions to Autopilot/Unsure for review.
  • 🚨 Secret Mission: Configure the existing Telegram Alert node so urgent human-written emails send evidence to your private bot chat.

Are there any prerequisites?

  • Gmail: A Gmail account for receiving and organizing the controlled test messages.
  • n8n Cloud: An n8n Cloud workspace for building and running the workflow.
  • TypeSafe access: Step 1 includes the direct Jev setup path and the required credit option.
  • Optional Telegram extension: The Secret Mission includes the account, bot, and credential setup if you choose to add alerts.

Before We Start

Before We Start...

Before the hands-on work begins, lock in the inbox decision you want to automate and the safeguards that keep uncertain messages reviewable. You will connect Gmail, Telegram, n8n, and one provider that gives your workflow access to Jev.

Connect n8n, Gmail, Jev, and Telegram

Connect n8n, Gmail, and Jev

Your inbox autopilot needs secure access to Gmail and Jev before it can process a message.

In this step, you will import the complete n8n Cloud workflow and connect its main path. The optional Telegram alert stays deactivated until the Secret Mission.

In this step, get ready to:
  • Import the complete workflow from its versioned URL.
  • Deactivate the optional Telegram alert.
  • Connect Gmail and direct TypeSafe credentials.
Import the workflow

The template already contains the capture, classification, confidence, category, and Gmail-action paths. Importing it keeps every learner on the same node layout.

  • Open the official n8n website.
  • Click Get Started for free.
  • Create your 14-day n8n Cloud trial workspace.
  • Complete the signup flow.
  • Click the + icon in the workspace to create a new workflow.
  • Open the three-dot menu in the upper-right navigation bar.
  • Select Import from URL.

You should see 18 functional nodes and 4 Sticky Notes, for 22 canvas objects in total. The workflow title is Confidence-Gated Inbox Autopilot - TypeSafe (NextWork).

  • Hover on Telegram Alert on the workflow canvas.
  • Select Deactivate.
  • Confirm that Telegram Alert is marked inactive.

Why do some nodes show warnings?

The template contains no credentials or account-specific Gmail label IDs. Warning indicators are expected until you connect those values.

Telegram Alert can keep its credential warning because the node is inactive. The Secret Mission configures and activates it.

The imported workflow remains unpublished, so it cannot process inbox mail while you prepare it.

Connect Gmail and create labels

The Gmail nodes share one managed OAuth connection. Your Google password remains with Google.

  • Double-click Gmail Trigger on the canvas.
  • Select Sign in with Google.
  • Select only Read, compose, and send emails from your Gmail account.
  • Scroll to the bottom of the Google authorization screen.
  • Click Continue or Approve to grant the requested Gmail access.

The Gmail nodes now share one managed OAuth connection. Your Google password remains with Google.

  • Open Gmail in a new browser tab.
  • Select Create new label from the left-side Labels area.
  • Create the label Clients.
  • Repeat the label flow for Receipts.
  • Repeat the label flow for Newsletters.
  • Repeat the label flow for Personal.
  • Repeat the label flow for Autopilot/Unsure.

Your inbox now has a visible destination for every category plus a review path for weak decisions.

Connect TypeSafe

The template sends Jev requests directly to TypeSafe. n8n stores the TypeSafe API key as a masked credential.

Keep the API key private

Your TypeSafe API key authorizes paid Jev requests. Keep it inside the masked n8n credential and out of workflow fields or screenshots.

✔️ TypeSafe is ready

Use this path when your TypeSafe account already has usable credit.

ⓧ Set up TypeSafe and add credits

This setup charges $5 to your payment method and adds reusable TypeSafe credit. The project uses only a small part of that balance.

Before you add credits

The $5 top-up is a real charge. Complete it only when you are ready to run paid Jev requests.

  • Return to n8n.
  • Open Ask Jev.
  • Set Authentication to Generic Credential Type.
  • Set Generic Auth Type to Bearer Auth.
  • Click Connect to Bearer Auth.
  • Paste the copied TypeSafe API key into the Bearer Token field.
  • Save the credential.
  • Return to the workflow canvas.
  • Confirm Gmail Trigger no longer shows a credential warning.
  • Confirm Ask Jev no longer shows a credential warning.
  • Confirm Telegram Alert remains inactive.

Still seeing a main-path warning?

Check that Gmail Trigger uses the Google connection you just approved. Check that Ask Jev uses the saved Bearer Auth credential.

Help me trace the remaining credential warning.

Your main-path credentials are ready, and the optional alert is safely inactive. Next, you will run a controlled Gmail message through Jev and inspect its typed evidence.

Get a Typed Decision from Jev

Your imported workflow now has Gmail and TypeSafe credentials. The optional Telegram node remains inactive while you test the complete Gmail-to-Jev decision path.

This step isolates the path from Gmail Trigger through Normalize Email to Ask Jev. You will inspect Jev's typed evidence before relying on any downstream action.

In this step, get ready to:
  • Inspect the imported n8n capture and classification nodes.
  • Run one controlled email through the workflow.
  • Read the category, urgency, real-person, and usage fields.

How the decision path works

  • Gmail Trigger captures one unread test email.
  • Normalize Email keeps the message ID, sender, subject, and body in a predictable shape.
  • Ask Jev returns category, urgency, and real-person evidence.
  • The confidence gate decides whether the workflow acts or sends the message for review.
Inspect the imported decision path

The template normalizes every email into a small, predictable input shape. Ask Jev then requests three decision primitives from that bounded state.

  • Open Gmail Trigger on the workflow canvas.
  • Confirm that Poll Time is configured to check for new email once every minute.
  • Confirm that the maximum result count is 1.
  • Confirm that Search contains subject:NW-TRIAGE-TEST.
  • Confirm that Read Status is Unread emails only.

The temporary subject filter keeps unrelated inbox messages outside every manual test.

Open Normalize Email.

  • Confirm that it maps messageId, sender, subject, and body.
  • Confirm that jevEndpoint is https://api.typesafe.ai/v1/systemone.
  • Confirm that jevModel is jev-latest.

The bounded body keeps long threads from expanding the request without a clear limit. The provider fields keep the endpoint and model visible in the data flow.

The imported workflow cannot carry account-specific Gmail label IDs between accounts. n8n validates all five category branches before it starts, so each Add Label node needs its destination mapped.

  • Select each Gmail "Add Label" nodes
  • Set Label Names or IDs in Clients Add Label to Clients.

Repeat the Label Names or IDs mapping for the remaining four Add Label nodes.

  • Set Receipts Add Label to Receipts.
  • Set Newsletters Add Label to Newsletters.
  • Set Personal Add Label to Personal.
  • Set Unsure Add Label to Autopilot/Unsure.
  • Confirm that all five red warning indicators disappear.
Run the first controlled email

A real Gmail message proves that the imported expressions survive actual sender, subject, and body text. Keep the workflow unpublished so this remains a manual test.

Which account should receive the test?

Send the message to the Gmail address connected to Gmail Trigger.

A second sender account gives the clearest inbound test. You can also send from the connected account to itself when you keep the inbox copy unread.

  • Open Gmail in another browser tab.
  • Compose a new message.
  • Enter the Gmail address connected to Gmail Trigger.
  • Enter NW-TRIAGE-TEST First decision in the Subject field.
  • Enter Hi, the client launch is blocked. Please call me before 3 PM today. in the message body.
  • Send the email.
  • Confirm that the received inbox copy is unread.

A manual execution checks Gmail once, so it finishes immediately when no matching email is ready. Before you run it, which category and urgency result do you expect from this message?

  • Return to n8n.
  • Select Execute step.
  • Confirm that Gmail Trigger shows 1 item.
  • Click Ask Jev node
  • Confirm that the downstream path runs through Ask Jev.
  • Return to the completed n8n execution.
  • Select Normalize Email.
  • Open the OUTPUT panel.
  • Confirm that body contains the controlled email text.
  • Select Ask Jev.
  • Switch its output to JSON view.

You should see an answers object and a usage object. That is the first complete Jev decision from the imported workflow.

Jev request failed?

Confirm that Ask Jev uses Generic Credential Type authentication with the saved Bearer Auth credential.

Confirm that jevEndpoint is https://api.typesafe.ai/v1/systemone and jevModel is jev-latest. If the account is not ready, return to the TypeSafe setup option in Step 1.

Help me diagnose the failed Jev request.

You have a live typed decision from the imported workflow. Next, you will vary the email evidence and compare how Jev responds.

Replace the Sample with a Real Gmail Message

Your first Gmail message reached Jev through n8n. You now have a clear result to use as a baseline.

This step changes only the email evidence. A vague message reveals whether the winning category remains trustworthy when every option has weak support.

In this step, get ready to:
  • Use the clear-message result from Step 2 as your baseline.
  • Run a vague message through the imported workflow.
  • Compare the category evidence before relying on the result.
Test vague evidence

The next email includes follow-up details, earlier conversations, and possible changes without naming a clear purpose. This broader context gives Jev more evidence to weigh, but no single category should dominate.

Before you send it, do you expect the winning category to disappear or remain with weaker support?

Why run the workflow manually?

At this point, the workflow is still unpublished. Selecting Execute step starts a temporary manual listening session for Gmail Trigger.

Prepare the email before you start the listening session. In Step 4, publishing the workflow makes the trigger poll automatically without this manual click.

  • Compose a new Gmail message to the connected inbox.
  • Set recipient to yourself
  • Enter NW-TRIAGE-TEST Vague in the Subject field.
  • Copy the following message into the email body:
Hi, I wanted to follow up on the information I sent last week about the situation we discussed. A few details may have changed since then, although I am still checking which version is current and whether any of the updates matter. There are also some notes from earlier conversations that may be relevant, but I cannot tell if they affect what happens next. Could you look through everything when you have time and let me know whether anything needs attention? There is no firm deadline, and I am not sure which part should take priority.
  • Send the prepared email.
  • Keep the inbox copy unread.
  • Select Execute step in n8n to start listening for the prepared message.
  • Check the connected Gmail inbox for the workflow's effect.

Open the completed Ask Jev output in JSON view.

  • Mostly Clients (92%), a little Personal (8%). Confidence 0.9 passes the gate.
  • Score 0.65 sits between Low and Medium. Confidence 0.47 means Jev isn't sure.
  • Split between Low and Medium. Zero chance of High.
  • Noul is a yes-or-no probability. A value of 0.67 suggests a human sender, but the evidence remains too weak for an urgent automatic action.
  • 633 input, 79 output tokens. Output is just 11% of total usage, because Jev returns structured JSON (labels, scores, probabilities) instead of generated text.

A choice is not permission

Jev must return one option for a choice question. A winner can remain even when every option has weak support.

Treat the complete distribution and confidence as evidence. The confidence gate decides whether that evidence is strong enough for automation.

Vague message did not run?

Confirm that the subject begins with NW-TRIAGE-TEST and that the inbox copy stayed unread during the one-minute poll.

Help me trace the missing execution.

You have seen that Jev can return a winning category even when its evidence is weak. Next, you will confirm the workflow's guardrails and publish the restricted autopilot.

Add Guardrails and Publish the Autopilot

Publish and Test Five Live Emails

You saw Jev return a choice even when its evidence was weak. Now you will let that confidence gate control five live Gmail messages.

Until this workflow is published, n8n runs it only when you click Execute workflow. Once published, n8n checks Gmail every minute and processes new matching emails automatically.

In this step, get ready to:
  • Set the Gmail Trigger's automatic polling safety cap.
  • Publish a credential-complete workflow.
  • Prove automatic labeling, archiving, and review routing across five live messages.
Configure automatic polling

The imported template still limits each poll to one email. Raise that limit before publishing so one poll can collect the new matching messages waiting in Gmail.

  • Open Gmail Trigger on the workflow canvas.
  • Change Max Emails per Poll from 1 to 50.
  • Keep Simplify off.
  • Return to the workflow canvas.

Why cap each poll at 50?

The value 50 is a safety cap, not a target. Each poll processes every new matching email it finds, up to 50.

The cap limits how many Jev calls a flooded inbox can start at once. Messages beyond the cap remain queued for a later poll.

💡 Why keep Simplify off?

The workflow needs the full email body for classification, so keep Simplify off. The warning about larger responses is expected.

The workflow's Sticky Note still describes the original one-message default. The 50 value in Gmail Trigger controls the behavior you publish.

  • Return to the workflow editor.
  • Click Publish in the top-right corner.
  • Confirm the publish prompt.

The autopilot is now live. n8n checks Gmail every minute without waiting for you to click Execute workflow.

Where does the workflow keep running?

A local or desktop n8n instance runs this workflow only while n8n is open. Closing that instance stops its polling.

n8n Cloud keeps the published workflow running in its hosted workspace. Your browser can be closed.

💡 Use the primary inbox address

Send the tests from another email account when possible. This makes each message arrive as ordinary inbound mail.

If you use the connected Gmail account, address each message to its primary email address. Gmail may not place mail sent to an alias or group address in the primary Inbox.

Test 1: Expect the Clients label while the optional Telegram node stays inactive.

  • Compose a new message to the connected Gmail address.
  • Enter NW-TRIAGE-TEST 1 Client approval in the Subject field.
  • Copy the following message into the email body:
Could you approve the launch plan before 3 PM today? The client team is blocked until you confirm.

Before you send Test 1, do you think it can run without clicking Execute workflow?

  • Send the message.

Why wait one minute?

The Gmail Trigger can take about one minute to collect the message. Its label can take up to another minute to appear, so a short delay does not mean the workflow is stuck.

  • Wait about one minute.
  • Open the workflow's Executions tab.
  • Confirm an automatic run appears without clicking Execute workflow.
  • Return to Gmail.
  • Confirm Test 1 is read and carries the Clients label.

That automatic run proves the published trigger is watching Gmail and routing new mail on its own.

No successful automatic run?

If no run appears after two minutes, confirm the workflow is published. Confirm the subject contains NW-TRIAGE-TEST.

If a run appears as failed, open it to see which node errored. Fix that node before sending the remaining tests.

Help me trace the missing automatic run.

Send the remaining tests together

The first automatic run is proven. Send Tests 2 to 5 back-to-back so the next polls can collect the waiting messages.

Test 2: Expect the Receipts label.

  • Compose another message to the connected Gmail address.
  • Enter NW-TRIAGE-TEST 2 Receipt in the Subject field.
  • Copy the following message into the email body:
Your payment of $48.00 for order 4821 was received. Keep this email as your receipt.
  • Send the message.
  • Start Test 3 without waiting for a label.

Test 3: Expect the Newsletters label and removal from the Inbox.

  • Compose another message to the connected Gmail address.
  • Enter NW-TRIAGE-TEST 3 Weekly digest in the Subject field.
  • Copy the following message into the email body:
Here are this week's product launches, tutorials, and industry stories. You are receiving the weekly Tech Brief digest.
  • Send the message.
  • Start Test 4 without waiting for a label.

Test 4: Expect the Personal label.

  • Compose another message to the connected Gmail address.
  • Enter NW-TRIAGE-TEST 4 Dinner plans in the Subject field.
  • Copy the following message into the email body:
Are you free for dinner with the family this Saturday? Let me know what time works for you.
  • Send the message.
  • Start Test 5 without waiting for a label.

Test 5: Expect the confidence gate to apply Autopilot/Unsure.

  • Compose another message to the connected Gmail address.
  • Enter NW-TRIAGE-TEST 5 Please review in the Subject field.
  • Copy the following message into the email body:
Your payment receipt is ready. This week's product roundup is attached. Are you free for dinner on Saturday? Please review the launch notes when you have time.
  • Send the message.

Tests 2 to 5 should all be labeled within about two minutes. They may appear in one or two executions depending on when the poll runs.

  • Wait about two minutes.
  • Open the workflow's Executions tab.
  • Confirm one or two automatic executions processed Tests 2 to 5.
  • Return to Gmail.
  • Confirm all five test messages are read and carry workflow-added labels.

Some messages are still unlabeled?

Confirm the workflow remains published and every subject contains NW-TRIAGE-TEST. Mark any accidentally opened test unread so the trigger can match it.

Open any failed execution to identify the node that errored. A failure in Ask Jev or a Gmail label node can leave one or more messages unfinished.

Help me trace the unfinished batch.

Secret mission

Alert on Urgent Human Emails

Configure the existing Telegram Alert node, then prove that an urgent human-written email can reach your private bot chat without weakening the Gmail guardrails.

Clean Up Your Resources

Clean Up Your Resources

Decide whether to keep the workflow available, pause it, or delete its project resources. Published Jev requests can consume provider credit, and n8n Cloud may require a paid plan after the free trial ends.

Cost warning

Each published execution can consume TypeSafe credit when Ask Jev runs. Jev costs $0.042 per million input tokens, while output tokens are free.

TypeSafe pricing can change. Pause or delete the workflow when you finish, then review the remaining credit in your TypeSafe account.

Resources you used:

  • The n8n workflow named Confidence-Gated Inbox Autopilot - TypeSafe (NextWork).
  • The saved n8n Gmail credential.
  • The n8n Bearer Auth credential under Generic Credential Type for TypeSafe.
  • The TypeSafe API key named Inbox Autopilot.
  • The Gmail labels Clients, Receipts, Newsletters, Personal, and Autopilot/Unsure.

Keep everything running

No action is needed while you continue using the inbox autopilot. The published workflow can keep processing matching unread messages.

  • Upgrade n8n Cloud before the 14-day trial ends.
  • Keep Confidence-Gated Inbox Autopilot - TypeSafe (NextWork) published.
  • Monitor your remaining credit in TypeSafe.

Pause - I'll come back to this later

Unpublishing the inbox workflow stops production executions. Your workflow, credentials, labels, and TypeSafe key remain available.

  • Open Confidence-Gated Inbox Autopilot - TypeSafe (NextWork) in the workflow editor.
  • Select Unpublish.
  • Confirm that the workflow now shows an unpublished state.
  • Return to the n8n Cloud workspace before the trial ends.

Delete - I don't want to use this again

Deleting these resources removes the reusable workflow and saved access. Download anything you want to keep before you revoke the TypeSafe key.

  • Open Confidence-Gated Inbox Autopilot - TypeSafe (NextWork) in the workflow editor.
  • Open the upper-right three-dot menu.
  • Select Download to save a final workflow JSON.
  • Select Unpublish.
  • Return to the Workflows page.
  • Open the three-dot menu beside Confidence-Gated Inbox Autopilot - TypeSafe (NextWork).
  • Select Delete.
  • Open Credentials in n8n.
  • Delete the saved Gmail credential.
  • Delete the Bearer Auth credential stored under Generic Credential Type.
  • Open the official TypeSafe API keys page.
  • Find the Inbox Autopilot key.
  • Use its deletion control to revoke the key.
  • Confirm that the key no longer appears.
  • Remove the Clients, Receipts, Newsletters, Personal, and Autopilot/Unsure labels from Gmail's left-side Labels area.
  • Confirm that the five project labels no longer appear in Gmail.
  • Let the n8n Cloud trial expire without upgrading if you do not need the workspace.

Nice Work!

Nice Work!

You did it. Your inbox agent turns Jev's typed evidence into guarded Gmail labels, archiving, and review routing.

You've learned how to:

  • Ask Jev for a category choice, urgency score, real-person estimate, confidence values, and measured input-token usage.
  • Stress-test typed decisions with clear, mixed-intent, and vague email evidence before connecting actions.
  • Publish confidence gating across five live Gmail messages to verify category labels, review routing, and newsletter archiving.
  • Secret Mission: Configure the existing Telegram Alert node and verify it with an urgent human-written inbox message.

Ready to quiz yourself?