Skip to main content

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

Workflow preview

Workflow preview
100%
Triage emergency patients via chat with GPT-4.1 and hospital systems preview
Open on n8n.io

1. Workflow Overview

How It Works This workflow automates hospital emergency department triage by intelligently processing patient intake information through multiple AI powered assessment stages. Designed for emergenc...

Best for

  • Support Chatbot automation workflows
  • AI Chatbot automation workflows
  • advanced n8n builders looking for reusable templates

Tools used

@n8n/n8n-nodes-langchain.chattrigger, @n8n/n8n-nodes-langchain.agent, @n8n/n8n-nodes-langchain.lmchatopenai, @n8n/n8n-nodes-langchain.memorybufferwindow, @n8n/n8n-nodes-langchain.outputparserstructured, n8n-nodes-base.if, n8n-nodes-base.httprequest, n8n-nodes-base.set

Source and attribution

This workflow is cataloged by N8N Workflows and links back to its original n8n.io source page by Cheng Siong Chin.

Original n8n.io source

1.1 Workflow description

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

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 teams, it solves the critical challenge of rapid, accurate patient prioritization during high-volume periods. The system captures initial patient data through a chat interface, uses specialized AI agents to analyze medical history and current symptoms, validates business rules for priority assignment, performs stability checks, calculates priority scores, and determines required actions. It then routes patients to appropriate care pathways while sending notifications to relevant medical teams and logging all interactions for audit compliance. The workflow leverages OpenAI models and structured JSON parsing to ensure consistent, protocol-driven triage decisions.

Setup Steps

  1. Configure OpenAI credentials with API key for AI agent access
  2. Set up Hospital Triage Agent node with your clinical triage protocols
  3. Configure Patient Consent and Structured JSON checkers with validation rules
  4. Connect notification endpoints for Execute Appointment and Send Notification nodes
  5. Set up audit logging system integration in Log Interactions node
  6. Customize business rule validation parameters for your facility's triage categories

Prerequisites

Active OpenAI API account, hospital system API access for appointments and notifications

Use Cases

Emergency department patient intake, urgent care prioritization, virtual triage for telehealth

Customization

Modify triage agent prompts to reflect your clinical protocols, adjust priority scoring algorithms

Benefits

Accelerates triage processing by 60%, ensures standardized clinical assessment

1.2 Logical Blocks

This catalog entry is organized from the workflow JSON. The node-level section below shows the executable blocks available for review before importing the template.

2. Block-by-Block Analysis

Block 1 - Patient Chat Interface

Type / Role
@n8n/n8n-nodes-langchain.chatTrigger - chatTrigger
Config choices
Version 1.4

Block 2 - Hospital Triage Agent

Type / Role
@n8n/n8n-nodes-langchain.agent - agent
Config choices
Version 3.1

Block 3 - OpenAI Chat Model

Type / Role
@n8n/n8n-nodes-langchain.lmChatOpenAi - lmChatOpenAi
Config choices
Version 1.3

Block 4 - Conversation Memory

Type / Role
@n8n/n8n-nodes-langchain.memoryBufferWindow - memoryBufferWindow
Config choices
Version 1.3

Block 5 - Structured JSON Output Parser

Type / Role
@n8n/n8n-nodes-langchain.outputParserStructured - outputParserStructured
Config choices
Version 1.3

Block 6 - Check Action Required

Type / Role
n8n-nodes-base.if - if
Config choices
Version 2.3

Block 7 - Execute Appointment Action

Type / Role
n8n-nodes-base.httpRequest - httpRequest
Config choices
Version 4.3

Block 8 - Send Notification

Type / Role
n8n-nodes-base.httpRequest - httpRequest
Config choices
Version 4.3

Block 9 - Format Response to Patient

Type / Role
n8n-nodes-base.set - set
Config choices
Version 3.4

Block 10 - Route by Intent Type

Type / Role
n8n-nodes-base.switch - switch
Config choices
Version 3.4

Block 11 - Log Interaction to Audit DB

Type / Role
n8n-nodes-base.postgres - postgres
Config choices
Version 2.6

Block 12 - Check Patient Eligibility

Type / Role
n8n-nodes-base.postgres - postgres
Config choices
Version 2.6

Block 13 - Retrieve Patient History

Type / Role
n8n-nodes-base.postgres - postgres
Config choices
Version 2.6

Block 14 - Calculate Priority Score

Type / Role
n8n-nodes-base.code - code
Config choices
Version 2

Block 15 - Validate Business Rules

Type / Role
n8n-nodes-base.code - code
Config choices
Version 2

Block 16 - Department Availability Checker Tool

Type / Role
@n8n/n8n-nodes-langchain.toolCode - toolCode
Config choices
Version 1.3

Block 17 - Patient Consent Validator Tool

Type / Role
@n8n/n8n-nodes-langchain.toolCode - toolCode
Config choices
Version 1.3

Block 18 - Check Confidence Threshold

Type / Role
n8n-nodes-base.if - if
Config choices
Version 2.3

Block 19 - Enrich with Patient Context

Type / Role
n8n-nodes-base.set - set
Config choices
Version 3.4

Block 20 - Prepare Escalation Data

Type / Role
n8n-nodes-base.set - set
Config choices
Version 3.4

Block 21 - Sticky Note

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 22 - Sticky Note1

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 23 - Sticky Note2

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 24 - Sticky Note3

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Showing the first 24 of 26 workflow blocks. Download the JSON for the full node graph.

3. Summary Table

Workflow Triage emergency patients via chat with GPT-4.1 and hospital systems
Complexity advanced
Nodes 26
Categories Support Chatbot, AI Chatbot
Author Cheng Siong Chin
Published 25 Jan 2026

4. Reproducing the Workflow from Scratch

  1. 1. Download the workflow JSON

    Use the JSON export at /data/workflows/12986/12986.json as the source template for this automation.

  2. 2. Import the template into n8n

    Open n8n, import the downloaded JSON, and review each node before activating the workflow.

  3. 3. Configure credentials and variables

    Replace placeholder credentials, API keys, webhook URLs, account IDs, and environment-specific values with your own settings.

  4. 4. Test with sample data

    Run the workflow manually or in a staging workspace, inspect node output, and confirm downstream systems receive the expected data.

  5. 5. Activate and monitor

    Enable the workflow only after testing, then monitor executions, errors, and rate limits during the first production runs.

5. General Notes & Resources

Review imported nodes carefully before activation. This catalog entry is intended to help you inspect the workflow structure, understand required services, and find related templates faster.

Node names, credentials, schedules, webhook paths, and external service limits may need adjustment for your workspace.

Frequently asked questions

What does Triage emergency patients via chat with GPT-4.1 and hospital systems do?

How It Works This workflow automates hospital emergency department triage by intelligently processing patient intake information through multiple AI powered assessment stages. Designed for emergenc...

What do I need before importing this workflow?

Review the workflow JSON, configure any required credentials in n8n, and test the automation in a safe workspace before using it in production.

Can I customize this workflow?

Yes. Use the block-by-block analysis and the downloadable JSON to inspect each node, then adjust credentials, prompts, schedules, filters, or destinations for your Support Chatbot, AI Chatbot use case.