← All projects

ProjectPrototypeJul 2026

InquiryOS: AI-Powered Enterprise Inquiry Routing Platform

An automation that reads incoming messages (job applications, sales leads, support problems, spam) and routes each one to the right team, flagged in the response it returns. Built during the Kanz AI Training Hackathon. The whole AI pipeline runs locally, with no outside AI service.

In short. A shared inbox fills up with job applications, sales leads, support problems and spam, and someone has to sort each message. A small AI model running locally sorts them, plain steps check the input and score the lead, and each message is routed to the right team. It is a prototype: the ticket and email steps are not connected and the accuracy was not measured.

  • n8n
  • Ollama (Qwen)
  • Postman
  • Replit

Demo video

Watch it work

A recording of five test messages sent to the workflow from Postman: a general question, a sales lead, a support problem, a job application and spam. Each one is then checked in n8n's Executions tab to see where it went. Click a chapter to jump to it.

Speed14 chapters
  1. Core flow

  2. Safety and limits

  3. Core flow

  4. Safety and limits

  5. Core flow

How it flows

Follow a message through the workflow

Pick a test message from the demo:

What came out

Category General, confidence 0.99, with an automatic answer. The run took 6.0 seconds.

Click any box to see what that step does.

Problem
A shared inbox gets job applications, sales leads, support problems and spam, and someone has to sort it.
Approach
A small AI model sorts each message. Plain steps check the input, score the lead and pick the team.
Result
A recording on this page shows five test messages (general, sales, support, job application and spam) each reaching the right route. A write-up on Kanz is currently down.
Limits
How often the AI picks the right team has not been measured, and the ticket and email steps are not connected yet.
Try it
Watch the demo ↓
6
types of message it sorts
70%
below this confidence, the AI takes a second look
75%
minimum confidence to reply by itself
local
the AI runs locally

01What it does

A company inbox gets job applications, sales leads, support problems, partnership offers and spam. This automation reads each message, decides what kind it is, and sends it to the right place. When the AI is unsure, it looks again more carefully, or hands the message to a person.

It is built in n8n, and the AI is a small model (qwen2.5:3b) running locally, so CVs and customer details never leave it. The example company in the prompts is ConnectWave Telecom.

Write-up on Kanz (currently down) ↗

02Step by step

The main workflow has 25 parts, but only two of them use the AI. The rest is plain code, which is what makes a small AI model reliable enough.

  1. A message arrivesPlain code

    The website form (or any app) sends the message to the workflow.

  2. Check the messagePlain code

    It must have a name, a valid email, a subject and a message. If not, the sender gets an error right away and the AI is never used.

  3. Tidy it upPlain code

    Removes extra spaces and makes the email lower-case.

  4. First guess from the AIAI model

    A small AI model (qwen2.5:3b) running locally picks one category: HR, Sales, Support, Partnership, Spam or General. It also says how sure it is and how urgent the message is.

  5. Read the AI's answer safelyPlain code

    If the AI's answer is broken, the code looks for a category name in the text and marks it as unsure. If that fails too, it files the message as General. The workflow never crashes because of a bad AI answer.

  6. Is a second look needed?Decision

    Yes, when the AI is less than 70% sure, or when the message is for HR. Otherwise the first guess stands.

  7. Second, more careful guessAI model

    The same AI model gets a longer, more detailed question and tries again. If its answer is broken, the first guess is used.

  8. Write a log lineNot built yet

    The result is printed to the console. Saving it in a database is not built yet.

  9. Send it to the right teamDecision

    One path for each category, plus a catch-all path, so an unexpected answer never lands in the wrong team.

03Where messages go

TypeGoes toStatus
HRWorkflow 3: reads cover letterspartly built
Builds a candidate profile. Sending the email draft is not built yet.
SalesWorkflow 4: scores the leadpartly built
Scoring works. Saving to a CRM and notifying sales are not built yet.
SupportWorkflow 5: finds the problem typepartly built
Picks the team. Searching help articles, creating tickets and alerts are not built yet.
GeneralWorkflow 6: tries to answerpartly built
Writes an answer and checks confidence. Sending the email is not built yet.
PartnershipNo handler yetpartly built
Goes to an empty step for now.
SpamDroppeddone
Dropped on purpose, with no notification.
Anything elseCatch-alldone
Has its own path so nothing is lost.

Workflow 3 · HR

Reads the cover letter, builds a candidate profile and drafts an email to the candidate.

not built yet The email draft is not sent.

Workflow 4 · Sales

Finds what the customer wants, how big the company looks, how urgent it is and whether a budget is mentioned. Then it scores the lead with a fixed point system.

not built yet Saving to a CRM and the two sales notifications are not built yet.

Workflow 5 · Support

Finds the type of problem and how serious it is, then picks the right team. Critical problems go down a separate path.

not built yet Searching help articles, creating tickets, the network-team alert and the team queue are not built yet.

Workflow 6 · General questions

Writes an answer, and sends it automatically only if the AI says it can answer and is at least 75% sure.

not built yet Sending the reply and passing the message to a person are not built yet.

Error handler

A separate workflow that runs when anything fails, and records what went wrong.

not built yet It writes to the console.

04Try the lead score

For sales messages, the AI only reads out four facts. The score itself comes from a simple point system, so the same facts always give the same score:

  • Urgency: high +30, medium +15
  • Company size: enterprise +30, medium +15
  • Budget mentioned: +20
  • Message priority: high +20, medium +10
  • Maximum 100. Hot is 70 or more, Warm is 40 or more, otherwise Cold.

Your inputs

Result

HOT
Lead score
75 / 100

+15 urgency medium +30 size enterprise +20 budget mentioned +10 priority medium = 75

This is the real scoring code from the sales workflow, run on the values you choose. In the real workflow the AI reads out the first three values, and the points are added by plain code.

05Why it works this way

A quick guess first, a careful one only if neededMost messages are clear, so a short question is enough. The longer question only runs when the AI is unsure or the message is for HR.
Check the message before using the AIBad input is rejected by plain code, so the AI only sees proper messages.
A safe fallback for every AI answerSmall models sometimes answer in the wrong format. Every step has a safe default instead of crashing.
Only auto-reply when the AI is confidentA reply goes out by itself only if the AI says it can answer and is at least 75% sure. Everything else goes to a person.
Run the AI locallyCVs and customer details stay on the same machine instead of going to an online service.

06What to know

What works: the API takes a message, checks it, sorts it, scores sales leads, and returns a response that flags the right department. What does not: everything that would act on that result. No emails are sent, and no tickets, CRM records, alerts or queues are created. How often the AI picks the right category has not been measured.
  • Both AI guesses use the same small model. The second one only gets a better question, not a bigger brain.
  • About ten steps after sorting are not built yet (CRM, tickets, notifications, emails, help-article search, saving logs).
  • How often the AI picks the right category has not been measured.
  • The workflow files are not public, and the Kanz write-up is currently down. The recorded demo on this page is the way to see it working.
Get in touch