Templates / Triage emergency patients via chat with GPT-4.1 and hospital systems

Triage emergency patients via chat with GPT-4.1 and hospital systems

Ready for 3.0

by Cheng Siong Chin ✓ · 361 views · created 2026-01-25 · Support Chatbot, AI Chatbot

Ready for 3.0. This template uses no nodes that n8n 3.0 removes. No removed nodes, versions or helpers found. Static check, last run 2026-10-19.

What this workflow does

This AI workflow has 20 nodes and runs when a chat message arrives. Along the way it connects OpenAI Chat Model and Postgres.

How it runs

Trigger: When a chat message arrives.

  1. Hospital Triage Agent (AI Agent): runs an AI agent, with model: OpenAI Chat Model; 2 tools (Patient Consent Validator Tool, Department Availability Checker Tool); memory: Conversation Memory; output parser: Structured JSON Output Parser
  2. Check Confidence Threshold (If): checks a condition and branches into true / false
  3. Retrieve Patient History (Postgres): run a query
  4. Prepare Escalation Data (Edit Fields (Set)): sets 3 fields: escalation_reason, escalation_priority, original_confidence
  5. Enrich with Patient Context (Edit Fields (Set)): sets 2 fields: previous_visits, patient_risk_level
  6. Format Response to Patient (Edit Fields (Set)): sets 1 field: output
  7. Validate Business Rules (Code): runs custom JavaScript code
  8. Route by Intent Type (Switch): routes items into 4 branches
  9. Check Patient Eligibility (Postgres): run a query
  10. Log Interaction to Audit DB (Postgres): uses Postgres

…plus 4 more steps. See the full node list below.

Services it uses

OpenAI Chat ModelPostgres

Before you upgrade to n8n 3.0

Nothing in this workflow is removed in n8n 3.0, so it should import and run after the upgrade.

Nodes used (12)

From the author

How It Works This workflow automates hospital emergency department triage by intelligently processing patient intake information through multiple AI-powered assessment stages. Designed for emergency departments, urgent care centers, and hospital admission…

Excerpt from Cheng Siong Chin's description on n8n.io.

View the original on n8n.io → Check your own copy

Get the weekly “what broke” email

New templates, newly broken ones, and n8n release changes. One short email a week.

Form not loading? Subscribe here.