n8n

Inbox Triage in n8n

Sample data. Valisthea Psychiatry is a fictional practice, so every name and number is synthetic.

When a whole team shares one inbox, it is nobody's inbox. I built an n8n workflow that sorts every message to the right team, prepares a reply and chases what is late, and sends nothing until a person approves.

78

replies drafted, 11 quarantined

The problem
A shared inbox needs sorting by team, and suspicious mail needs keeping apart.
The result
78 replies drafted for approval, 11 quarantined.

What it does

  1. Every 15 minutes during the day, Monday to Saturday, it reads the new messages.
  2. It looks for crisis words first, before the AI sees anything. The on-call clinician is alerted and the 988 line is sent.
  3. Suspicious messages, like a changed bank account or a fake login link, go to a quarantine tab for management. The AI never sees them.
  4. Everything else goes to the AI, Gemini, which only sorts it and picks one of 11 approved reply templates. It does not write the reply.
  5. Each message lands in a Google Sheet the teams work in. A person reads the draft, fixes the wording and approves it.
  6. Late items are flagged, and the team lead hears about them.

What keeps it safe

  • Apart from the 988 line on a crisis message, nothing goes to a patient or a partner until a person approves, and it only goes out once.
  • Replies are built from wording the practice already approved, so the AI cannot make something up. A bad AI answer is caught and handed to a person.
  • At the end it counts everything. Every message must have an owner, or it sends an alert.

How I tested it

  • In a test inbox of 114 messages, with a stand-in for the AI so every answer was known, all 114 reached the right team and end state. 78 replies were drafted, 4 crisis messages were alerted first and 11 suspicious ones went to quarantine. That tests the workflow, not the AI.
  • 78 of 78 drafts matched an approved template exactly. 14 of 14 bad AI answers I planted were caught or ignored.
  • The 17 messages my rules handle never reached the AI, and the AI's request log shows it.
  • On its own the AI got urgency right on 69 of 91 messages and under-called some, so I added a rule floor on top of it.

Built with

  • n8n
  • Gemini
  • Google Sheets

Want one like this for your business?

Tell me what is slowing your team down. I will tell you what to automate, and what not to.

See all 16 builds