{
  "id": "_yVwfrnb95ldBe-LCo7IR",
  "name": "Smart quality event risk orchestration for human supervision",
  "tags": [],
  "nodes": [
    {
      "id": "d0a813da-8d9f-4850-8d0a-0f731462d0fa",
      "name": "Quality Event Webhook",
      "type": "n8n-nodes-base.webhook",
      "position": [
        -2064,
        192
      ],
      "parameters": {
        "path": "quality-event",
        "options": {},
        "httpMethod": "POST",
        "responseMode": "lastNode"
      },
      "typeVersion": 2.1
    },
    {
      "id": "da1fcebe-2fce-4f84-8422-40b56f08facf",
      "name": "Workflow Configuration",
      "type": "n8n-nodes-base.set",
      "position": [
        -1840,
        192
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "id-1",
              "name": "criticalEmailRecipient",
              "type": "string",
              "value": "<__PLACEHOLDER_VALUE__Critical Alert Email Address__>"
            },
            {
              "id": "id-2",
              "name": "executiveEmailRecipient",
              "type": "string",
              "value": "<__PLACEHOLDER_VALUE__Executive Alert Email Address__>"
            },
            {
              "id": "id-3",
              "name": "slackChannelId",
              "type": "string",
              "value": "<__PLACEHOLDER_VALUE__Slack Channel ID__>"
            },
            {
              "id": "id-4",
              "name": "qualityThresholdScore",
              "type": "number",
              "value": 85
            },
            {
              "id": "id-5",
              "name": "recallRiskThreshold",
              "type": "string",
              "value": "MEDIUM"
            }
          ]
        },
        "includeOtherFields": true
      },
      "typeVersion": 3.4
    },
    {
      "id": "fc516d0c-c268-4fa8-847a-2bdf893b05a0",
      "name": "Anthropic Model - Traceability Agent",
      "type": "@n8n/n8n-nodes-langchain.lmChatAnthropic",
      "position": [
        -1536,
        624
      ],
      "parameters": {
        "model": {
          "__rl": true,
          "mode": "list",
          "value": "claude-sonnet-4-5-20250929"
        },
        "options": {}
      },
      "credentials": {
        "anthropicApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1.3
    },
    {
      "id": "74c6a08d-5303-47cf-b68d-0a9f48c3206c",
      "name": "Anthropic Model - Recall Orchestration Agent",
      "type": "@n8n/n8n-nodes-langchain.lmChatAnthropic",
      "position": [
        -848,
        624
      ],
      "parameters": {
        "model": {
          "__rl": true,
          "mode": "list",
          "value": "claude-sonnet-4-5-20250929"
        },
        "options": {}
      },
      "credentials": {
        "anthropicApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1.3
    },
    {
      "id": "9dcec906-0644-4517-b1bd-42d2d4045c91",
      "name": "Anthropic Model - Risk Assessment Agent",
      "type": "@n8n/n8n-nodes-langchain.lmChatAnthropic",
      "position": [
        -1184,
        624
      ],
      "parameters": {
        "model": {
          "__rl": true,
          "mode": "list",
          "value": "claude-sonnet-4-5-20250929"
        },
        "options": {}
      },
      "credentials": {
        "anthropicApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1.3
    },
    {
      "id": "fdd45dae-d416-4245-9cd7-0addebd1f4f4",
      "name": "Anthropic Model - Orchestrator",
      "type": "@n8n/n8n-nodes-langchain.lmChatAnthropic",
      "position": [
        -1616,
        416
      ],
      "parameters": {
        "model": {
          "__rl": true,
          "mode": "list",
          "value": "claude-sonnet-4-5-20250929"
        },
        "options": {}
      },
      "credentials": {
        "anthropicApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1.3
    },
    {
      "id": "fce359c9-3708-4933-8576-668c287ae579",
      "name": "Traceability Output Parser",
      "type": "@n8n/n8n-nodes-langchain.outputParserStructured",
      "position": [
        -1376,
        624
      ],
      "parameters": {
        "jsonSchemaExample": "{\n  \"validationStatus\": \"VALID\",\n  \"partNumber\": \"PT-12345\",\n  \"batchNumber\": \"BATCH-2024-001\",\n  \"lineageComplete\": true,\n  \"missingData\": [],\n  \"qualityScore\": 95,\n  \"traceabilityChain\": [\"Supplier A\", \"Warehouse B\", \"Assembly Line C\"],\n  \"complianceStatus\": \"COMPLIANT\",\n  \"reasoning\": \"All part, batch, and quality lineage data validated successfully with complete traceability chain.\"\n}"
      },
      "typeVersion": 1.3
    },
    {
      "id": "d2331fbd-5fc9-43de-ab48-e3de7f8b96e4",
      "name": "Risk Assessment Output Parser",
      "type": "@n8n/n8n-nodes-langchain.outputParserStructured",
      "position": [
        -1024,
        624
      ],
      "parameters": {
        "jsonSchemaExample": "{\n  \"riskLevel\": \"HIGH\",\n  \"riskScore\": 85,\n  \"affectedUnits\": 1500,\n  \"customerImpact\": \"CRITICAL\",\n  \"safetyRisk\": true,\n  \"regulatoryRisk\": true,\n  \"financialImpact\": \"$500,000 - $2,000,000\",\n  \"recommendedAction\": \"IMMEDIATE_CONTAINMENT\",\n  \"reasoning\": \"High risk due to safety concerns affecting 1500 units with potential regulatory violations.\"\n}"
      },
      "typeVersion": 1.3
    },
    {
      "id": "2fe9440e-c74d-41dc-9a5e-465bb0c3e142",
      "name": "Recall Orchestration Output Parser",
      "type": "@n8n/n8n-nodes-langchain.outputParserStructured",
      "position": [
        -656,
        624
      ],
      "parameters": {
        "jsonSchemaExample": "{\n  \"recallRequired\": false,\n  \"containmentWorkflow\": [\"Quarantine affected batches\", \"Notify quality team\", \"Initiate root cause analysis\"],\n  \"reportingArtifacts\": [\"Traceability Report\", \"Risk Assessment Summary\", \"Containment Action Plan\"],\n  \"executiveAlertRequired\": true,\n  \"estimatedTimeline\": \"24-48 hours\",\n  \"stakeholders\": [\"Quality Director\", \"Operations Manager\", \"Compliance Officer\"],\n  \"requiresHumanApproval\": true,\n  \"reasoning\": \"Containment workflow prepared but requires executive approval before execution due to high risk level.\"\n}"
      },
      "typeVersion": 1.3
    },
    {
      "id": "a2bf0bfa-af98-45b8-98a7-6b70f1246726",
      "name": "Orchestrator Output Parser",
      "type": "@n8n/n8n-nodes-langchain.outputParserStructured",
      "position": [
        -512,
        432
      ],
      "parameters": {
        "jsonSchemaExample": "{\n  \"overallRiskLevel\": \"HIGH\",\n  \"traceabilityValidated\": true,\n  \"riskAssessmentComplete\": true,\n  \"recallOrchestrationComplete\": true,\n  \"actionRequired\": \"EXECUTIVE_APPROVAL\",\n  \"summary\": \"Quality event validated with high risk requiring executive approval before containment execution.\",\n  \"agentsCalled\": [\"Traceability Agent\", \"Risk Assessment Agent\", \"Recall Orchestration Agent\"]\n}"
      },
      "typeVersion": 1.3
    },
    {
      "id": "e02285f1-d88a-4994-9d6d-fca62e681758",
      "name": "Traceability Agent Tool",
      "type": "@n8n/n8n-nodes-langchain.agentTool",
      "position": [
        -1488,
        416
      ],
      "parameters": {
        "text": "={{ $fromAI(\"qualityEventData\", \"Quality event data including part numbers, batch numbers, and quality metrics\", \"json\") }}",
        "options": {
          "systemMessage": "You are a Traceability Validation Specialist responsible for validating quality event data.\n\nYour task is to:\n1. Validate part numbers, batch numbers, and quality lineage data\n2. Verify traceability chain completeness from supplier to customer\n3. Check compliance with quality standards and regulations\n4. Identify any missing or incomplete data\n5. Calculate quality score based on data completeness and accuracy\n6. Determine validation status: VALID, INVALID, or SUSPICIOUS\n7. Return structured validation results with reasoning\n\nIMPORTANT: You validate data only - you do not make recall decisions."
        },
        "hasOutputParser": true,
        "toolDescription": "Validates structured part, batch, and quality lineage data to ensure complete traceability and compliance"
      },
      "typeVersion": 3
    },
    {
      "id": "1ba96a8e-0e15-4bcc-891b-54249fff94f4",
      "name": "Risk Assessment Agent Tool",
      "type": "@n8n/n8n-nodes-langchain.agentTool",
      "position": [
        -1200,
        416
      ],
      "parameters": {
        "text": "={{ $fromAI(\"traceabilityResults\", \"Validated traceability data from the Traceability Agent\", \"json\") }}",
        "options": {
          "systemMessage": "You are a Risk Assessment Specialist responsible for evaluating quality event risk.\n\nYour task is to:\n1. Analyze validated traceability data for risk indicators\n2. Assess customer impact and affected unit count\n3. Evaluate safety risks and potential harm\n4. Determine regulatory compliance risks\n5. Estimate financial impact range\n6. Calculate overall risk score (0-100)\n7. Assign risk level: LOW, MEDIUM, HIGH, or CRITICAL\n8. Recommend action: MONITOR, INVESTIGATE, CONTAINMENT, or IMMEDIATE_CONTAINMENT\n9. Return structured risk assessment with reasoning\n\nIMPORTANT: You assess risk only - you do not initiate recalls."
        },
        "hasOutputParser": true,
        "toolDescription": "Assesses risk level based on validated traceability data including safety, regulatory, and financial impact"
      },
      "typeVersion": 3
    },
    {
      "id": "94a25b95-92be-401f-9ae2-4cbec8ba3296",
      "name": "Recall Orchestration Agent Tool",
      "type": "@n8n/n8n-nodes-langchain.agentTool",
      "position": [
        -832,
        432
      ],
      "parameters": {
        "text": "={{ $fromAI(\"riskAssessmentResults\", \"Risk assessment results from the Risk Assessment Agent\", \"json\") }}",
        "options": {
          "systemMessage": "You are a Recall Orchestration Specialist responsible for preparing containment workflows.\n\nYour task is to:\n1. Analyze risk assessment results to determine response requirements\n2. Prepare containment workflow steps (quarantine, notifications, investigations)\n3. Generate reporting artifacts (traceability reports, risk summaries, action plans)\n4. Determine if executive alert is required\n5. Identify stakeholders who need to be involved\n6. Estimate timeline for containment execution\n7. Determine if human approval is required before execution\n8. Return structured orchestration plan with reasoning\n\nCRITICAL: You prepare containment workflows but NEVER initiate recalls autonomously. All high-risk actions require human approval."
        },
        "hasOutputParser": true,
        "toolDescription": "Prepares containment workflows, reporting artifacts, and executive alerts without initiating recalls autonomously"
      },
      "typeVersion": 3
    },
    {
      "id": "8b2b3cd5-c5d5-4a62-81e2-6080fd9f9bf7",
      "name": "Master Orchestrator Agent",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        -1200,
        192
      ],
      "parameters": {
        "text": "={{ $json }}",
        "options": {
          "systemMessage": "You are the Master Orchestrator for the Quality Traceability and Recall Orchestration System.\n\nYour task is to:\n1. Call the Traceability Agent Tool to validate quality event data\n2. Call the Risk Assessment Agent Tool to evaluate risk based on traceability results\n3. Call the Recall Orchestration Agent Tool to prepare containment workflows based on risk assessment\n4. Synthesize results from all three agents\n5. Determine overall risk level and required action\n6. Return structured orchestration summary\n\nYou coordinate the three specialized agents in sequence and provide a comprehensive summary of the quality event analysis."
        },
        "promptType": "define",
        "hasOutputParser": true
      },
      "typeVersion": 3.1
    },
    {
      "id": "a2522df7-7c20-4ff4-99f9-3f09d28a123a",
      "name": "Route by Risk Level",
      "type": "n8n-nodes-base.switch",
      "position": [
        -368,
        256
      ],
      "parameters": {
        "rules": {
          "values": [
            {
              "outputKey": "High Risk",
              "conditions": {
                "options": {
                  "leftValue": "",
                  "caseSensitive": true,
                  "typeValidation": "strict"
                },
                "combinator": "and",
                "conditions": [
                  {
                    "operator": {
                      "type": "string",
                      "operation": "equals"
                    },
                    "leftValue": "={{ $json.output.overallRiskLevel }}",
                    "rightValue": "HIGH"
                  }
                ]
              },
              "renameOutput": true
            },
            {
              "outputKey": "Critical Risk",
              "conditions": {
                "options": {
                  "leftValue": "",
                  "caseSensitive": true,
                  "typeValidation": "strict"
                },
                "combinator": "and",
                "conditions": [
                  {
                    "operator": {
                      "type": "string",
                      "operation": "equals"
                    },
                    "leftValue": "={{ $json.output.overallRiskLevel }}",
                    "rightValue": "CRITICAL"
                  }
                ]
              },
              "renameOutput": true
            },
            {
              "outputKey": "Low/Medium Risk",
              "conditions": {
                "options": {
                  "leftValue": "",
                  "caseSensitive": true,
                  "typeValidation": "strict"
                },
                "combinator": "or",
                "conditions": [
                  {
                    "operator": {
                      "type": "string",
                      "operation": "equals"
                    },
                    "leftValue": "={{ $json.output.overallRiskLevel }}",
                    "rightValue": "LOW"
                  },
                  {
                    "operator": {
                      "type": "string",
                      "operation": "equals"
                    },
                    "leftValue": "={{ $json.output.overallRiskLevel }}",
                    "rightValue": "MEDIUM"
                  }
                ]
              },
              "renameOutput": true
            }
          ]
        },
        "options": {
          "fallbackOutput": "extra",
          "renameFallbackOutput": "Unclassified"
        }
      },
      "typeVersion": 3.4
    },
    {
      "id": "1934e9ca-ac05-4acb-a7e6-c831d8bbd332",
      "name": "Check Requires Human Approval",
      "type": "n8n-nodes-base.if",
      "position": [
        -96,
        208
      ],
      "parameters": {
        "options": {},
        "conditions": {
          "options": {
            "leftValue": "",
            "caseSensitive": false,
            "typeValidation": "loose"
          },
          "combinator": "and",
          "conditions": [
            {
              "id": "id-1",
              "operator": {
                "type": "string",
                "operation": "equals"
              },
              "leftValue": "={{ $json.output.actionRequired }}",
              "rightValue": "EXECUTIVE_APPROVAL"
            }
          ]
        }
      },
      "typeVersion": 2.3
    },
    {
      "id": "5aeb2691-93d8-4f8f-92c7-785bb2214523",
      "name": "Wait for Human Approval",
      "type": "n8n-nodes-base.wait",
      "position": [
        144,
        112
      ],
      "parameters": {
        "resume": "webhook",
        "options": {},
        "httpMethod": "POST"
      },
      "typeVersion": 1.1
    },
    {
      "id": "386be9f5-e018-43b0-a86e-6bf4e957d470",
      "name": "Send Critical Alert Email",
      "type": "n8n-nodes-base.emailSend",
      "position": [
        368,
        464
      ],
      "parameters": {
        "html": "=<html>\n<body style=\"font-family: Arial, sans-serif; line-height: 1.6; color: #333;\">\n<div style=\"background-color: #dc3545; color: white; padding: 20px;\">\n<h2>\ud83d\udea8 CRITICAL QUALITY ALERT</h2>\n</div>\n\n<div style=\"padding: 20px;\">\n<p><strong>Risk Level:</strong> <span style=\"color: #dc3545; font-weight: bold;\">{{ $json.output.overallRiskLevel }}</span></p>\n<p><strong>Timestamp:</strong> {{ $now.toFormat(\"yyyy-MM-dd HH:mm:ss\") }}</p>\n\n<h3>Orchestration Summary</h3>\n<p>{{ $json.output.summary }}</p>\n\n<h3>Agents Engaged</h3>\n<ul>\n{{ $json.output.agentsCalled.map(a => `<li>${a}</li>`).join(\"\") }}\n</ul>\n\n<h3>Action Required</h3>\n<p style=\"background-color: #fff3cd; padding: 15px; border-left: 4px solid #ffc107;\">\n<strong>{{ $json.output.actionRequired }}</strong>\n</p>\n\n<p style=\"color: #666; font-size: 12px; margin-top: 30px;\">This is an automated alert from the AI-Powered Quality Traceability and Recall Orchestration System.</p>\n</div>\n</body>\n</html>",
        "options": {},
        "subject": "=CRITICAL QUALITY ALERT: {{ $json.output.overallRiskLevel }} Risk - {{ $now.toFormat(\"yyyy-MM-dd HH:mm\") }}",
        "toEmail": "={{ $('Workflow Configuration').first().json.criticalEmailRecipient }}",
        "fromEmail": "<__PLACEHOLDER_VALUE__Sender Email Address__>"
      },
      "typeVersion": 2.1
    },
    {
      "id": "0b91d282-45c4-4fa8-9abb-aea4ccbd28b1",
      "name": "Send Executive Alert Email",
      "type": "n8n-nodes-base.emailSend",
      "position": [
        368,
        256
      ],
      "parameters": {
        "html": "=<html>\n<body style=\"font-family: Arial, sans-serif; line-height: 1.6; color: #333;\">\n<div style=\"background-color: #6c757d; color: white; padding: 20px;\">\n<h2>\u2b06\ufe0f EXECUTIVE APPROVAL REQUIRED</h2>\n</div>\n\n<div style=\"padding: 20px;\">\n<p><strong>Risk Level:</strong> <span style=\"color: #dc3545; font-weight: bold;\">{{ $json.output.overallRiskLevel }}</span></p>\n<p><strong>Action Required:</strong> {{ $json.output.actionRequired }}</p>\n<p><strong>Timestamp:</strong> {{ $now.toFormat(\"yyyy-MM-dd HH:mm:ss\") }}</p>\n\n<h3>Executive Summary</h3>\n<p>{{ $json.output.summary }}</p>\n\n<h3>Traceability Validation</h3>\n<p><strong>Status:</strong> {{ $json.output.traceabilityValidated ? \"\u2705 Validated\" : \"\u274c Not Validated\" }}</p>\n\n<h3>Risk Assessment</h3>\n<p><strong>Status:</strong> {{ $json.output.riskAssessmentComplete ? \"\u2705 Complete\" : \"\u274c Incomplete\" }}</p>\n\n<h3>Recall Orchestration</h3>\n<p><strong>Status:</strong> {{ $json.output.recallOrchestrationComplete ? \"\u2705 Complete\" : \"\u274c Incomplete\" }}</p>\n\n<div style=\"background-color: #d1ecf1; border-left: 4px solid #0c5460; padding: 15px; margin: 20px 0;\">\n<h4>Approval Instructions</h4>\n<p>Please review the quality event details and approve or reject the containment workflow execution.</p>\n<p><strong>Approval Webhook:</strong> Use the webhook URL provided in the workflow execution to submit your decision.</p>\n</div>\n\n<p style=\"color: #666; font-size: 12px; margin-top: 30px;\">This is an automated alert from the AI-Powered Quality Traceability and Recall Orchestration System.</p>\n</div>\n</body>\n</html>",
        "options": {},
        "subject": "=EXECUTIVE APPROVAL REQUIRED: Quality Event - {{ $json.output.overallRiskLevel }} Risk",
        "toEmail": "={{ $('Workflow Configuration').first().json.executiveEmailRecipient }}",
        "fromEmail": "<__PLACEHOLDER_VALUE__Sender Email Address__>"
      },
      "typeVersion": 2.1
    },
    {
      "id": "c891c408-822f-4eb7-84f1-c1d1258e61d8",
      "name": "Send Slack Notification",
      "type": "n8n-nodes-base.slack",
      "position": [
        368,
        656
      ],
      "parameters": {
        "text": "=\ud83d\udd14 *Quality Event Alert*\n\n*Risk Level:* {{ $json.output.overallRiskLevel }}\n*Action Required:* {{ $json.output.actionRequired }}\n\n*Summary:*\n{{ $json.output.summary }}\n\n*Agents Engaged:*\n{{ $json.output.agentsCalled.map(a => `\u2022 ${a}`).join(\"\\n\") }}\n\n_Timestamp: {{ $now.toFormat(\"yyyy-MM-dd HH:mm:ss\") }}_",
        "select": "channel",
        "channelId": {
          "__rl": true,
          "mode": "id",
          "value": "={{ $('Workflow Configuration').first().json.slackChannelId }}"
        },
        "otherOptions": {},
        "authentication": "oAuth2"
      },
      "credentials": {
        "slackOAuth2Api": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 2.4
    },
    {
      "id": "3a4025c0-1b45-48eb-8c9b-aab8343a70e6",
      "name": "Merge Notification Paths",
      "type": "n8n-nodes-base.merge",
      "position": [
        592,
        464
      ],
      "parameters": {
        "mode": "chooseBranch"
      },
      "typeVersion": 3.2
    },
    {
      "id": "5c406e30-87ca-4438-ae2f-0c96f209d653",
      "name": "Log Audit Trail",
      "type": "n8n-nodes-base.code",
      "position": [
        816,
        464
      ],
      "parameters": {
        "jsCode": "// Log audit trail for quality event processing\nconst timestamp = new Date().toISOString();\nconst orchestratorOutput = $json.output || {};\n\nconst auditLog = {\n  timestamp: timestamp,\n  eventType: \"QUALITY_EVENT_PROCESSED\",\n  riskLevel: orchestratorOutput.overallRiskLevel || \"UNKNOWN\",\n  actionRequired: orchestratorOutput.actionRequired || \"NONE\",\n  traceabilityValidated: orchestratorOutput.traceabilityValidated || false,\n  riskAssessmentComplete: orchestratorOutput.riskAssessmentComplete || false,\n  recallOrchestrationComplete: orchestratorOutput.recallOrchestrationComplete || false,\n  agentsCalled: orchestratorOutput.agentsCalled || [],\n  summary: orchestratorOutput.summary || \"No summary available\",\n  notificationsSent: true,\n  workflowStatus: \"COMPLETED\"\n};\n\nconsole.log(\"Audit Trail:\", JSON.stringify(auditLog, null, 2));\n\nreturn [{ json: auditLog }];"
      },
      "typeVersion": 2
    },
    {
      "id": "a0b01029-e250-4feb-96af-bffeefcf16fc",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -2192,
        96
      ],
      "parameters": {
        "color": 7,
        "width": 944,
        "height": 784,
        "content": "## Traceability Analysis  \nIdentifies contamination sources and affected product scope for containment decisions."
      },
      "typeVersion": 1
    },
    {
      "id": "d7f7f97f-8c05-4863-9e4f-17dff945db60",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -992,
        -288
      ],
      "parameters": {
        "color": 5,
        "width": 512,
        "height": 304,
        "content": "## Prerequisites\nNVIDIA NIM API key, Gmail account with app password\n## Use Cases\nManufacturing defect escalation, food safety incident management\n## Customization\nModify risk scoring thresholds, add industry-specific compliance agents\n## Benefits\nReduces risk assessment time by 75%, ensures consistent evaluation methodology"
      },
      "typeVersion": 1
    },
    {
      "id": "975fc092-e75a-4abc-bb27-8b11b2e5c9de",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1456,
        -240
      ],
      "parameters": {
        "width": 400,
        "height": 256,
        "content": "## Setup Steps\n1. Configure NVIDIA NIM API credentials with Llama-3.1-70B-Instruct model access\n2. Set up routing logic thresholds\n3. Connect Gmail SMTP for executive alerts and Slack webhook for team notifications\n4. Configure human approval nodes with designated approver email addresses\n5. Customize AI agent prompts for industry-specific risk criteria"
      },
      "typeVersion": 1
    },
    {
      "id": "afc912f8-7185-45f4-baec-715cb9538a99",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -2160,
        -240
      ],
      "parameters": {
        "width": 640,
        "height": 272,
        "content": "## How It Works\nThis workflow automates quality event risk assessment through AI-powered multi-agent analysis with mandatory human oversight for critical decisions. Designed for quality managers, compliance officers, and risk analysts in manufacturing, healthcare, or service industries, it solves the challenge of consistent, transparent risk evaluation while maintaining human accountability. When quality events are detected, the system orchestrates specialized AI agents (traceability, risk assessment, and recall evaluation) to analyze different risk dimensions simultaneously. Results are synthesized, routed through human approval gates based on risk severity, and distributed via automated notifications. This ensures high-risk decisions receive proper scrutiny while low-risk events flow efficiently through automated channels."
      },
      "typeVersion": 1
    },
    {
      "id": "8d584b54-88f4-490b-a216-69c2cee6e8fb",
      "name": "Sticky Note4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -864,
        80
      ],
      "parameters": {
        "color": 7,
        "width": 1824,
        "height": 880,
        "content": "## Recall Evaluation \nEnsures regulatory compliance and protects consumer safety through proper escalation protocols."
      },
      "typeVersion": 1
    },
    {
      "id": "53be746d-d8d0-47db-9d76-bc8b6004de45",
      "name": "Sticky Note5",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1216,
        96
      ],
      "parameters": {
        "color": 7,
        "width": 320,
        "height": 816,
        "content": "## Risk Assessment\nQuantifies business impact and legal obligations to prioritize response actions."
      },
      "typeVersion": 1
    }
  ],
  "active": false,
  "settings": {
    "availableInMCP": false,
    "executionOrder": "v1"
  },
  "versionId": "610ca7bd-d957-4017-b19c-30e82a8a82b7",
  "connections": {
    "Route by Risk Level": {
      "main": [
        [
          {
            "node": "Check Requires Human Approval",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Send Critical Alert Email",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Send Slack Notification",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Quality Event Webhook": {
      "main": [
        [
          {
            "node": "Workflow Configuration",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Workflow Configuration": {
      "main": [
        [
          {
            "node": "Master Orchestrator Agent",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Send Slack Notification": {
      "main": [
        [
          {
            "node": "Merge Notification Paths",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Traceability Agent Tool": {
      "ai_tool": [
        [
          {
            "node": "Master Orchestrator Agent",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "Wait for Human Approval": {
      "main": [
        [
          {
            "node": "Send Executive Alert Email",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Merge Notification Paths": {
      "main": [
        [
          {
            "node": "Log Audit Trail",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Master Orchestrator Agent": {
      "main": [
        [
          {
            "node": "Route by Risk Level",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Send Critical Alert Email": {
      "main": [
        [
          {
            "node": "Merge Notification Paths",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Orchestrator Output Parser": {
      "ai_outputParser": [
        [
          {
            "node": "Master Orchestrator Agent",
            "type": "ai_outputParser",
            "index": 0
          }
        ]
      ]
    },
    "Risk Assessment Agent Tool": {
      "ai_tool": [
        [
          {
            "node": "Master Orchestrator Agent",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "Send Executive Alert Email": {
      "main": [
        [
          {
            "node": "Merge Notification Paths",
            "type": "main",
            "index": 1
          }
        ]
      ]
    },
    "Traceability Output Parser": {
      "ai_outputParser": [
        [
          {
            "node": "Traceability Agent Tool",
            "type": "ai_outputParser",
            "index": 0
          }
        ]
      ]
    },
    "Check Requires Human Approval": {
      "main": [
        [
          {
            "node": "Wait for Human Approval",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Send Executive Alert Email",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Risk Assessment Output Parser": {
      "ai_outputParser": [
        [
          {
            "node": "Risk Assessment Agent Tool",
            "type": "ai_outputParser",
            "index": 0
          }
        ]
      ]
    },
    "Anthropic Model - Orchestrator": {
      "ai_languageModel": [
        [
          {
            "node": "Master Orchestrator Agent",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Recall Orchestration Agent Tool": {
      "ai_tool": [
        [
          {
            "node": "Master Orchestrator Agent",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "Recall Orchestration Output Parser": {
      "ai_outputParser": [
        [
          {
            "node": "Recall Orchestration Agent Tool",
            "type": "ai_outputParser",
            "index": 0
          }
        ]
      ]
    },
    "Anthropic Model - Traceability Agent": {
      "ai_languageModel": [
        [
          {
            "node": "Traceability Agent Tool",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Anthropic Model - Risk Assessment Agent": {
      "ai_languageModel": [
        [
          {
            "node": "Risk Assessment Agent Tool",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Anthropic Model - Recall Orchestration Agent": {
      "ai_languageModel": [
        [
          {
            "node": "Recall Orchestration Agent Tool",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    }
  }
}