{ "name": "Medical Triage with Verifiable Decision Receipts", "nodes": [ { "parameters": { "httpMethod": "POST", "path": "medical-triage", "options": {}, "responseMode": "responseNode" }, "id": "364aaff9-832b-4edb-b4af-c66dfa03be6b", "name": "Medical Triage", "type": "n8n-nodes-base.webhook", "typeVersion": 2.1, "position": [ 0, 300 ], "webhookId": "4e52c69f-625f-406e-8f07-8ea096d7c8ac" }, { "parameters": { "modelId": { "__rl": true, "mode": "list", "value": "gpt-4o", "cachedResultName": "GPT-4O" }, "messages": { "values": [ { "role": "system", "content": "=You are a clinical triage AI assistant (decision support only). Return JSON: {\"acuity\":\"ESI-1..ESI-5\",\"recommendation\":\"...\",\"reason\":\"...\"}." }, { "content": "=Return JSON only.\n\nInput:\n{{ JSON.stringify($json.body) }}" } ] }, "jsonOutput": true, "options": {} }, "id": "000be89b-ec68-417d-b948-165986803c22", "name": "AI Decision", "type": "@n8n/n8n-nodes-langchain.openAi", "typeVersion": 2.1, "position": [ 220, 300 ], "credentials": { "openAiApi": { "id": "REPLACE_OPENAI_CRED_ID", "name": "OpenAi account" } } }, { "parameters": { "operation": "generateReceipt", "agentName": "TriageAgent", "workflowName": "={{ $workflow.name }}", "action": "={{ 'AI decision: ' + ($json.message.content.decision || $json.message.content.recommendation || 'completed') }}", "decision": "={{ JSON.stringify($json.message.content) }}", "additionalFields": { "modelProvider": "openai", "modelUsed": "gpt-4o", "decisionType": "medical_triage", "riskLevel": "critical", "humanReview": true, "policies": "clinical-decision-support, hipaa", "permissions": "triage.recommend", "tags": "healthcare, triage, regulated" } }, "id": "0ab62aa5-3ff9-44ac-8a87-0a8c58b8a2df", "name": "Signatrust: Receipt", "type": "n8n-nodes-signatrust.signatrust", "typeVersion": 1, "position": [ 440, 300 ], "credentials": { "signatrustApi": { "id": "REPLACE_SIGNATRUST_CRED_ID", "name": "Signatrust API account" } } }, { "parameters": { "respondWith": "json", "responseBody": "={{ { status:\"OK\", receipt_id:$json.id, decision:$('AI Decision').item.json.message.content } }}", "options": {} }, "id": "b39ba449-883c-4e21-9a39-43c08150624e", "name": "Respond", "type": "n8n-nodes-base.respondToWebhook", "typeVersion": 1.1, "position": [ 660, 300 ] }, { "parameters": { "content": "## Medical Triage with Verifiable Decision Receipts\n**Why Signatrust?** Every AI decision here becomes a tamper-evident, Ed25519-signed receipt — verifiable for audits and disputes.", "height": 170, "width": 420, "color": 5 }, "id": "81229a1e-c25f-4c4a-8cce-628d1b5a1157", "name": "Sticky Note 552ece", "type": "n8n-nodes-base.stickyNote", "typeVersion": 1, "position": [ -40, 40 ] } ], "connections": { "Medical Triage": { "main": [ [ { "node": "AI Decision", "type": "main", "index": 0 } ] ] }, "AI Decision": { "main": [ [ { "node": "Signatrust: Receipt", "type": "main", "index": 0 } ] ] }, "Signatrust: Receipt": { "main": [ [ { "node": "Respond", "type": "main", "index": 0 } ] ] } }, "active": false, "pinData": {}, "settings": { "executionOrder": "v1" }, "tags": [ { "name": "Medical Triage — healthcare" }, { "name": "Medical Triage — triage" }, { "name": "Medical Triage — regulated" }, { "name": "Signatrust (16)" } ], "meta": { "templateCredsSetupCompleted": false }, "versionId": "189dd024-4dd1-4c98-b153-7b9e1ac8c736" }