AutomationFlowsAI & RAG › Validate Property Compliance Risk and Orchestrate Actions with Openai,…

Validate Property Compliance Risk and Orchestrate Actions with Openai,…

Original n8n title: Validate Property Compliance Risk and Orchestrate Actions with Openai, Google Calendar, Gmail, Slack, and Google Sheets

ByCheng Siong Chin @cschin on n8n.io

This workflow automates medical imaging analysis and diagnostic reporting for radiology departments, imaging centers, and hospital networks managing high patient volumes. Designed for radiologists, medical imaging technicians, and diagnostic coordinators, it solves the challenge…

Cron / scheduled trigger★★★★★ complexityAI-powered38 nodesHTTP RequestAgentOpenAI ChatOutput Parser StructuredGoogle Calendar ToolGmail ToolSlack ToolGoogle Sheets Tool
AI & RAG Trigger: Cron / scheduled Nodes: 38 Complexity: ★★★★★ AI nodes: yes Added:

This workflow corresponds to n8n.io template #13338 — we link there as the canonical source.

This workflow follows the Agent → Agenttool recipe pattern — see all workflows that pair these two integrations.

The workflow JSON

Copy or download the full n8n JSON below. Paste it into a new n8n workflow, add your credentials, activate. Full import guide →

Download .json
{
  "id": "6Yqm_5DSIKSMTvB5OvcRU",
  "name": "AI-powered pedical imaging analysis & diagnostic reporting system",
  "tags": [],
  "nodes": [
    {
      "id": "b4793f80-d9d0-4af8-a629-3a6b50eb3d63",
      "name": "Schedule Property Monitoring",
      "type": "n8n-nodes-base.scheduleTrigger",
      "position": [
        -3776,
        216
      ],
      "parameters": {
        "rule": {
          "interval": [
            {
              "field": "minutes",
              "minutesInterval": 15
            }
          ]
        }
      },
      "typeVersion": 1.3
    },
    {
      "id": "9d79a67b-0896-47ce-932c-0614b9a8f2d8",
      "name": "Workflow Configuration",
      "type": "n8n-nodes-base.set",
      "position": [
        -3552,
        216
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "id-1",
              "name": "sensorApiUrl",
              "type": "string",
              "value": "<__PLACEHOLDER_VALUE__Property Sensor API URL__>"
            },
            {
              "id": "id-2",
              "name": "complianceApiUrl",
              "type": "string",
              "value": "<__PLACEHOLDER_VALUE__Compliance Database API URL__>"
            },
            {
              "id": "id-3",
              "name": "criticalRiskThreshold",
              "type": "number",
              "value": 75
            },
            {
              "id": "id-4",
              "name": "highRiskThreshold",
              "type": "number",
              "value": 50
            },
            {
              "id": "id-5",
              "name": "mediumRiskThreshold",
              "type": "number",
              "value": 25
            }
          ]
        },
        "includeOtherFields": true
      },
      "typeVersion": 3.4
    },
    {
      "id": "b89fe18b-91d0-46dc-9e2c-8233d8183037",
      "name": "Fetch Property Sensor Data",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        -3328,
        120
      ],
      "parameters": {
        "url": "={{ $('Workflow Configuration').first().json.sensorApiUrl }}",
        "options": {},
        "sendHeaders": true,
        "headerParameters": {
          "parameters": [
            {
              "name": "Content-Type",
              "value": "application/json"
            }
          ]
        }
      },
      "typeVersion": 4.3
    },
    {
      "id": "519a0c7c-6623-4bc4-beea-7fb3ebe47c86",
      "name": "Fetch Compliance Database",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        -3328,
        312
      ],
      "parameters": {
        "url": "={{ $('Workflow Configuration').first().json.complianceApiUrl }}",
        "options": {},
        "sendHeaders": true,
        "headerParameters": {
          "parameters": [
            {
              "name": "Content-Type",
              "value": "application/json"
            }
          ]
        }
      },
      "typeVersion": 4.3
    },
    {
      "id": "aaa93ed9-d69e-47ee-bc9a-960029588d20",
      "name": "Combine Property Data",
      "type": "n8n-nodes-base.merge",
      "position": [
        -3104,
        216
      ],
      "parameters": {
        "mode": "combine",
        "options": {},
        "joinMode": "enrichInput1"
      },
      "typeVersion": 3.2
    },
    {
      "id": "9074d575-8bb2-405f-9eec-e43d5037740d",
      "name": "Property Validation Agent",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        -2880,
        216
      ],
      "parameters": {
        "text": "=Property Data:\n{{ JSON.stringify($json, null, 2) }}\n\nAnalyze this property data and validate construction integrity, occupancy compliance, and maintenance requirements.",
        "options": {
          "systemMessage": "You are a Property Validation Specialist AI Agent responsible for monitoring and validating property conditions.\n\nYour task is to:\n1. Analyze construction sensor data (structural integrity, temperature, humidity, vibration)\n2. Validate occupancy compliance (capacity limits, safety regulations, zoning requirements)\n3. Assess maintenance signals (equipment status, wear indicators, preventive maintenance needs)\n4. Identify anomalies, violations, or degradation patterns\n5. Classify issues by severity: CRITICAL, HIGH, MEDIUM, LOW\n6. Provide detailed validation findings with evidence from sensor data\n7. Return structured validation results\n\nValidation criteria:\n- Construction: Structural stress >80% threshold, foundation settlement >5mm, vibration >0.5g\n- Occupancy: Capacity >95%, fire safety violations, accessibility non-compliance\n- Maintenance: Equipment failure indicators, overdue maintenance >30 days, efficiency <70%\n\nYou MUST provide traceable evidence for all findings by referencing specific sensor readings and compliance standards."
        },
        "promptType": "define",
        "hasOutputParser": true
      },
      "typeVersion": 3.1
    },
    {
      "id": "037f646d-de05-4a0e-8cff-dfebf61d09e2",
      "name": "OpenAI Model - Validation Agent",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "position": [
        -2928,
        448
      ],
      "parameters": {
        "model": {
          "__rl": true,
          "mode": "list",
          "value": "gpt-4.1-mini"
        },
        "options": {},
        "builtInTools": {}
      },
      "credentials": {
        "openAiApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1.3
    },
    {
      "id": "fbcd1598-926a-4366-9022-47f05cd59e8e",
      "name": "Validation Output Parser",
      "type": "@n8n/n8n-nodes-langchain.outputParserStructured",
      "position": [
        -2744,
        440
      ],
      "parameters": {
        "schemaType": "manual",
        "inputSchema": "{\n  \"type\": \"object\",\n  \"properties\": {\n    \"validationStatus\": {\n      \"type\": \"string\",\n      \"enum\": [\"PASS\", \"FAIL\", \"WARNING\"]\n    },\n    \"issues\": {\n      \"type\": \"array\",\n      \"items\": {\n        \"type\": \"object\",\n        \"properties\": {\n          \"category\": {\n            \"type\": \"string\",\n            \"enum\": [\"construction\", \"occupancy\", \"maintenance\"]\n          },\n          \"severity\": {\n            \"type\": \"string\",\n            \"enum\": [\"CRITICAL\", \"HIGH\", \"MEDIUM\", \"LOW\"]\n          },\n          \"description\": {\"type\": \"string\"},\n          \"evidence\": {\"type\": \"string\"},\n          \"recommendation\": {\"type\": \"string\"}\n        },\n        \"required\": [\"category\", \"severity\", \"description\", \"evidence\", \"recommendation\"]\n      }\n    },\n    \"complianceScore\": {\n      \"type\": \"number\",\n      \"minimum\": 0,\n      \"maximum\": 100\n    },\n    \"timestamp\": {\"type\": \"string\"}\n  },\n  \"required\": [\"validationStatus\", \"issues\", \"complianceScore\", \"timestamp\"],\n  \"additionalProperties\": false\n}"
      },
      "typeVersion": 1.3
    },
    {
      "id": "eb1fee08-df75-47bc-ab6d-2930f8944664",
      "name": "Route by Validation Status",
      "type": "n8n-nodes-base.switch",
      "position": [
        -2304,
        96
      ],
      "parameters": {
        "rules": {
          "values": [
            {
              "outputKey": "CRITICAL",
              "conditions": {
                "options": {
                  "leftValue": "",
                  "caseSensitive": false,
                  "typeValidation": "loose"
                },
                "combinator": "and",
                "conditions": [
                  {
                    "operator": {
                      "type": "string",
                      "operation": "equals"
                    },
                    "leftValue": "={{ $json.riskLevel }}",
                    "rightValue": "CRITICAL"
                  }
                ]
              },
              "renameOutput": true
            },
            {
              "outputKey": "HIGH",
              "conditions": {
                "options": {
                  "leftValue": "",
                  "caseSensitive": false,
                  "typeValidation": "loose"
                },
                "combinator": "and",
                "conditions": [
                  {
                    "operator": {
                      "type": "string",
                      "operation": "equals"
                    },
                    "leftValue": "={{ $json.riskLevel }}",
                    "rightValue": "HIGH"
                  }
                ]
              },
              "renameOutput": true
            },
            {
              "outputKey": "MEDIUM",
              "conditions": {
                "options": {
                  "leftValue": "",
                  "caseSensitive": false,
                  "typeValidation": "loose"
                },
                "combinator": "and",
                "conditions": [
                  {
                    "operator": {
                      "type": "string",
                      "operation": "equals"
                    },
                    "leftValue": "={{ $json.riskLevel }}",
                    "rightValue": "MEDIUM"
                  }
                ]
              },
              "renameOutput": true
            },
            {
              "outputKey": "LOW",
              "conditions": {
                "options": {
                  "leftValue": "",
                  "caseSensitive": false,
                  "typeValidation": "loose"
                },
                "combinator": "and",
                "conditions": [
                  {
                    "operator": {
                      "type": "string",
                      "operation": "equals"
                    },
                    "leftValue": "={{ $json.riskLevel }}",
                    "rightValue": "LOW"
                  }
                ]
              },
              "renameOutput": true
            }
          ]
        },
        "options": {
          "fallbackOutput": "extra"
        }
      },
      "typeVersion": 3.4
    },
    {
      "id": "1bc21640-8f81-43e4-b0d2-fc5d1aa57741",
      "name": "Governance Orchestration Agent",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        -1712,
        80
      ],
      "parameters": {
        "text": "=Validation Results:\n{{ JSON.stringify($json, null, 2) }}\n\nCoordinate appropriate actions based on these validation findings.",
        "options": {
          "systemMessage": "You are a Governance Orchestration Agent responsible for coordinating property compliance and maintenance operations.\n\nYour task is to:\n1. Analyze validation results and determine required actions\n2. Coordinate repair scheduling for maintenance issues\n3. Initiate compliance inspections for regulatory violations\n4. Manage lease notifications for tenant-impacting issues\n5. Execute escalation workflows for critical situations\n6. Ensure all actions are traceable and auditable\n7. Log all decisions and actions taken\n\nAvailable specialized agents:\n- Repair Scheduling Agent: Handles maintenance work orders, contractor scheduling, resource allocation\n- Compliance Inspection Agent: Manages regulatory inspections, certification renewals, audit preparation\n- Lease Management Agent: Handles tenant notifications, lease compliance, occupancy management\n\nAvailable tools:\n- Google Calendar: Schedule repairs, inspections, and follow-ups\n- Gmail: Send formal notifications to stakeholders\n- Slack: Alert operations teams for immediate action\n- Google Sheets: Log all actions for audit trail\n\nDecision framework:\n- CRITICAL issues: Immediate escalation + all relevant agents + emergency notifications\n- HIGH issues: Schedule within 24 hours + relevant agents + stakeholder notifications\n- MEDIUM issues: Schedule within 7 days + relevant agents + routine notifications\n- LOW issues: Schedule within 30 days + log for tracking\n\nYou MUST provide structured output documenting all decisions and actions for compliance auditing."
        },
        "promptType": "define",
        "hasOutputParser": true
      },
      "typeVersion": 3.1
    },
    {
      "id": "0bc11a35-52b2-48f5-9848-edaaa6077f9e",
      "name": "OpenAI Model - Orchestration Agent",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "position": [
        -2080,
        320
      ],
      "parameters": {
        "model": {
          "__rl": true,
          "mode": "list",
          "value": "gpt-4.1-mini"
        },
        "options": {},
        "builtInTools": {}
      },
      "credentials": {
        "openAiApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1.3
    },
    {
      "id": "af7af4ea-c10b-4518-8bf9-e0144e1f1fee",
      "name": "Orchestration Output Parser",
      "type": "@n8n/n8n-nodes-langchain.outputParserStructured",
      "position": [
        -480,
        320
      ],
      "parameters": {
        "schemaType": "manual",
        "inputSchema": "{\n  \"type\": \"object\",\n  \"properties\": {\n    \"actionsExecuted\": {\n      \"type\": \"array\",\n      \"items\": {\n        \"type\": \"object\",\n        \"properties\": {\n          \"actionType\": {\n            \"type\": \"string\",\n            \"enum\": [\"repair_scheduled\", \"inspection_initiated\", \"notification_sent\", \"escalation_triggered\", \"logged\"]\n          },\n          \"tool\": {\"type\": \"string\"},\n          \"details\": {\"type\": \"string\"},\n          \"timestamp\": {\"type\": \"string\"}\n        },\n        \"required\": [\"actionType\", \"tool\", \"details\", \"timestamp\"]\n      }\n    },\n    \"agentsInvoked\": {\n      \"type\": \"array\",\n      \"items\": {\"type\": \"string\"}\n    },\n    \"escalationLevel\": {\n      \"type\": \"string\",\n      \"enum\": [\"none\", \"operational\", \"managerial\", \"executive\"]\n    },\n    \"reasoning\": {\"type\": \"string\"},\n    \"nextReviewDate\": {\"type\": \"string\"}\n  },\n  \"required\": [\"actionsExecuted\", \"agentsInvoked\", \"escalationLevel\", \"reasoning\", \"nextReviewDate\"],\n  \"additionalProperties\": false\n}"
      },
      "typeVersion": 1.3
    },
    {
      "id": "c9862be0-b028-47b8-8244-7ac5d29dd1e9",
      "name": "Google Calendar Tool - Schedule Repairs",
      "type": "n8n-nodes-base.googleCalendarTool",
      "position": [
        -1968,
        432
      ],
      "parameters": {
        "end": "={{ $fromAI('endDateTime', 'End date and time in ISO format', 'string') }}",
        "start": "={{ $fromAI('startDateTime', 'Start date and time in ISO format', 'string') }}",
        "calendar": {
          "__rl": true,
          "mode": "id",
          "value": "<__PLACEHOLDER_VALUE__Property Management Calendar ID__>"
        },
        "additionalFields": {
          "summary": "={{ $fromAI('eventTitle', 'Title for the calendar event', 'string') }}",
          "description": "={{ $fromAI('eventDescription', 'Description of the scheduled activity', 'string') }}"
        }
      },
      "credentials": {
        "googleCalendarOAuth2Api": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1.3
    },
    {
      "id": "1993a81e-d934-4eef-819b-cd147e3e5976",
      "name": "Gmail Tool - Send Notifications",
      "type": "n8n-nodes-base.gmailTool",
      "position": [
        -1824,
        320
      ],
      "parameters": {
        "sendTo": "={{ $fromAI('recipients', 'Email recipients', 'string') }}",
        "message": "={{ $fromAI('messageBody', 'Email message content', 'string') }}",
        "options": {},
        "subject": "={{ $fromAI('subject', 'Email subject line', 'string') }}"
      },
      "credentials": {
        "gmailOAuth2": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 2.2
    },
    {
      "id": "7abd623c-1f43-46bf-a2d3-00140f10cd19",
      "name": "Slack Tool - Alert Teams",
      "type": "n8n-nodes-base.slackTool",
      "position": [
        -1696,
        432
      ],
      "parameters": {
        "text": "={{ $fromAI('alertMessage', 'Alert message for the team', 'string') }}",
        "select": "channel",
        "channelId": {
          "__rl": true,
          "mode": "id",
          "value": "={{ $fromAI('slackChannel', 'Slack channel ID or name', 'string') }}"
        },
        "otherOptions": {},
        "authentication": "oAuth2"
      },
      "credentials": {
        "slackOAuth2Api": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 2.4
    },
    {
      "id": "0740d1a4-0589-4b43-b513-f0dd8b5c59bf",
      "name": "Google Sheets Tool - Log Actions",
      "type": "n8n-nodes-base.googleSheetsTool",
      "position": [
        -1568,
        320
      ],
      "parameters": {
        "options": {},
        "operation": "append",
        "sheetName": {
          "__rl": true,
          "mode": "name",
          "value": "<__PLACEHOLDER_VALUE__Audit Log Sheet Name__>"
        },
        "documentId": {
          "__rl": true,
          "mode": "id",
          "value": "<__PLACEHOLDER_VALUE__Audit Log Spreadsheet ID__>"
        }
      },
      "credentials": {
        "googleSheetsOAuth2Api": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 4.7
    },
    {
      "id": "d565e2af-83ca-4966-9ed1-44a889952e76",
      "name": "Repair Scheduling Agent Tool",
      "type": "@n8n/n8n-nodes-langchain.agentTool",
      "position": [
        -1344,
        320
      ],
      "parameters": {
        "text": "={{ $fromAI('repairRequest', 'Repair scheduling request details', 'json') }}",
        "options": {
          "systemMessage": "You are a Repair Scheduling Specialist Agent.\n\nYour task is to:\n1. Analyze repair requirements from validation findings\n2. Determine urgency and resource requirements\n3. Identify appropriate contractors or maintenance teams\n4. Calculate estimated duration and costs\n5. Recommend optimal scheduling windows\n6. Provide structured repair plan\n\nConsiderations:\n- Emergency repairs: <4 hours response time\n- Urgent repairs: <24 hours response time\n- Standard repairs: <7 days response time\n- Preventive maintenance: <30 days scheduling\n\nReturn structured repair scheduling recommendations."
        },
        "hasOutputParser": true,
        "toolDescription": "Analyzes repair requirements and provides detailed scheduling recommendations including urgency, resources, timeline, and cost estimates"
      },
      "typeVersion": 3
    },
    {
      "id": "e7ccc9ca-ba60-4563-ad94-e3acac06657a",
      "name": "OpenAI Model - Repair Agent",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "position": [
        -1328,
        496
      ],
      "parameters": {
        "model": {
          "__rl": true,
          "mode": "list",
          "value": "gpt-4.1-mini"
        },
        "options": {},
        "builtInTools": {}
      },
      "credentials": {
        "openAiApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1.3
    },
    {
      "id": "0135665a-d832-490a-a471-69b627da14dd",
      "name": "Repair Agent Output Parser",
      "type": "@n8n/n8n-nodes-langchain.outputParserStructured",
      "position": [
        -1184,
        528
      ],
      "parameters": {
        "schemaType": "manual",
        "inputSchema": "{\n  \"type\": \"object\",\n  \"properties\": {\n    \"repairPriority\": {\n      \"type\": \"string\",\n      \"enum\": [\"emergency\", \"urgent\", \"standard\", \"preventive\"]\n    },\n    \"estimatedDuration\": {\"type\": \"string\"},\n    \"estimatedCost\": {\"type\": \"number\"},\n    \"requiredResources\": {\n      \"type\": \"array\",\n      \"items\": {\"type\": \"string\"}\n    },\n    \"recommendedSchedule\": {\"type\": \"string\"},\n    \"contractorType\": {\"type\": \"string\"}\n  },\n  \"required\": [\"repairPriority\", \"estimatedDuration\", \"estimatedCost\", \"requiredResources\", \"recommendedSchedule\"],\n  \"additionalProperties\": false\n}"
      },
      "typeVersion": 1.3
    },
    {
      "id": "9c7c7ab9-fe1b-4e6f-80e5-ff5d1d15ea7f",
      "name": "Compliance Inspection Agent Tool",
      "type": "@n8n/n8n-nodes-langchain.agentTool",
      "position": [
        -1056,
        320
      ],
      "parameters": {
        "text": "={{ $fromAI('complianceRequest', 'Compliance inspection request details', 'json') }}",
        "options": {
          "systemMessage": "You are a Compliance Inspection Specialist Agent.\n\nYour task is to:\n1. Analyze compliance violations from validation findings\n2. Identify applicable regulations and standards\n3. Determine inspection requirements and scope\n4. Assess regulatory risk and potential penalties\n5. Recommend inspection timeline and preparation steps\n6. Provide structured compliance action plan\n\nRegulatory frameworks:\n- Building codes and safety standards\n- Fire safety and emergency egress\n- Accessibility (ADA/local requirements)\n- Environmental regulations\n- Occupancy and zoning compliance\n\nReturn structured compliance inspection recommendations."
        },
        "hasOutputParser": true,
        "toolDescription": "Analyzes compliance violations and provides detailed inspection requirements including regulatory framework, risk assessment, timeline, and preparation steps"
      },
      "typeVersion": 3
    },
    {
      "id": "695d159d-b128-476f-9302-56381615b4e0",
      "name": "OpenAI Model - Compliance Agent",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "position": [
        -1008,
        528
      ],
      "parameters": {
        "model": {
          "__rl": true,
          "mode": "list",
          "value": "gpt-4.1-mini"
        },
        "options": {},
        "builtInTools": {}
      },
      "credentials": {
        "openAiApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1.3
    },
    {
      "id": "f084aefa-7884-4fb9-8b55-6dbd5c473989",
      "name": "Compliance Agent Output Parser",
      "type": "@n8n/n8n-nodes-langchain.outputParserStructured",
      "position": [
        -864,
        528
      ],
      "parameters": {
        "schemaType": "manual",
        "inputSchema": "{\n  \"type\": \"object\",\n  \"properties\": {\n    \"inspectionType\": {\n      \"type\": \"string\",\n      \"enum\": [\"building_code\", \"fire_safety\", \"accessibility\", \"environmental\", \"occupancy\"]\n    },\n    \"regulatoryFramework\": {\"type\": \"string\"},\n    \"riskLevel\": {\n      \"type\": \"string\",\n      \"enum\": [\"critical\", \"high\", \"medium\", \"low\"]\n    },\n    \"potentialPenalties\": {\"type\": \"string\"},\n    \"inspectionTimeline\": {\"type\": \"string\"},\n    \"preparationSteps\": {\n      \"type\": \"array\",\n      \"items\": {\"type\": \"string\"}\n    }\n  },\n  \"required\": [\"inspectionType\", \"regulatoryFramework\", \"riskLevel\", \"inspectionTimeline\", \"preparationSteps\"],\n  \"additionalProperties\": false\n}"
      },
      "typeVersion": 1.3
    },
    {
      "id": "8be7bdfb-c574-49c7-810d-059a96647514",
      "name": "Lease Management Agent Tool",
      "type": "@n8n/n8n-nodes-langchain.agentTool",
      "position": [
        -768,
        320
      ],
      "parameters": {
        "text": "={{ $fromAI('leaseRequest', 'Lease management request details', 'json') }}",
        "options": {
          "systemMessage": "You are a Lease Management Specialist Agent.\n\nYour task is to:\n1. Analyze tenant-impacting issues from validation findings\n2. Determine lease compliance implications\n3. Identify required tenant notifications\n4. Assess impact on lease terms and obligations\n5. Recommend communication strategy and timeline\n6. Provide structured lease management action plan\n\nLease considerations:\n- Habitability and quiet enjoyment obligations\n- Maintenance and repair responsibilities\n- Notice requirements for entry and repairs\n- Rent abatement or compensation scenarios\n- Lease violation documentation\n\nReturn structured lease management recommendations."
        },
        "hasOutputParser": true,
        "toolDescription": "Analyzes tenant-impacting issues and provides detailed lease management recommendations including notification requirements, compliance implications, and communication strategy"
      },
      "typeVersion": 3
    },
    {
      "id": "61922ca7-8aef-4c9a-808c-2cc751ddef76",
      "name": "OpenAI Model - Lease Agent",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "position": [
        -688,
        528
      ],
      "parameters": {
        "model": {
          "__rl": true,
          "mode": "list",
          "value": "gpt-4.1-mini"
        },
        "options": {},
        "builtInTools": {}
      },
      "credentials": {
        "openAiApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1.3
    },
    {
      "id": "780d7cfc-b8ee-4c3a-a41f-b0dd29f6dd1e",
      "name": "Lease Agent Output Parser",
      "type": "@n8n/n8n-nodes-langchain.outputParserStructured",
      "position": [
        -528,
        528
      ],
      "parameters": {
        "schemaType": "manual",
        "inputSchema": "{\n  \"type\": \"object\",\n  \"properties\": {\n    \"notificationType\": {\n      \"type\": \"string\",\n      \"enum\": [\"maintenance_notice\", \"repair_entry\", \"service_disruption\", \"lease_violation\", \"rent_adjustment\"]\n    },\n    \"affectedTenants\": {\n      \"type\": \"array\",\n      \"items\": {\"type\": \"string\"}\n    },\n    \"noticeRequirement\": {\"type\": \"string\"},\n    \"leaseImplications\": {\"type\": \"string\"},\n    \"communicationTimeline\": {\"type\": \"string\"},\n    \"recommendedActions\": {\n      \"type\": \"array\",\n      \"items\": {\"type\": \"string\"}\n    }\n  },\n  \"required\": [\"notificationType\", \"affectedTenants\", \"noticeRequirement\", \"communicationTimeline\", \"recommendedActions\"],\n  \"additionalProperties\": false\n}"
      },
      "typeVersion": 1.3
    },
    {
      "id": "3ad2cd9b-9704-4f1c-a1eb-ce4a606affb2",
      "name": "Store Validation Results",
      "type": "n8n-nodes-base.dataTable",
      "position": [
        -2304,
        416
      ],
      "parameters": {
        "columns": {
          "value": {},
          "mappingMode": "autoMapInputData"
        },
        "options": {},
        "dataTableId": {
          "__rl": true,
          "mode": "id",
          "value": "<__PLACEHOLDER_VALUE__Validation Results Table ID__>"
        }
      },
      "typeVersion": 1.1
    },
    {
      "id": "d0ea4f15-5295-4e9f-854d-87e6da776914",
      "name": "Store Orchestration Decisions",
      "type": "n8n-nodes-base.dataTable",
      "position": [
        -32,
        192
      ],
      "parameters": {
        "columns": {
          "value": {},
          "mappingMode": "autoMapInputData"
        },
        "options": {},
        "dataTableId": {
          "__rl": true,
          "mode": "id",
          "value": "<__PLACEHOLDER_VALUE__Orchestration Decisions Table ID__>"
        }
      },
      "typeVersion": 1.1
    },
    {
      "id": "2ce95a82-8690-4b48-b0c5-2d677ccf80a9",
      "name": "Calculate Risk Scores",
      "type": "n8n-nodes-base.code",
      "position": [
        -2528,
        216
      ],
      "parameters": {
        "jsCode": "const items = $input.all();\nconst results = [];\n\nfor (const item of items) {\n  const validation = item.json;\n  let riskScore = 0;\n  \n  // Calculate risk score based on issues\n  if (validation.issues && validation.issues.length > 0) {\n    for (const issue of validation.issues) {\n      switch(issue.severity) {\n        case 'CRITICAL':\n          riskScore += 25;\n          break;\n        case 'HIGH':\n          riskScore += 15;\n          break;\n        case 'MEDIUM':\n          riskScore += 8;\n          break;\n        case 'LOW':\n          riskScore += 3;\n          break;\n      }\n    }\n  }\n  \n  // Cap at 100\n  riskScore = Math.min(riskScore, 100);\n  \n  // Determine risk level\n  let riskLevel = 'LOW';\n  const config = $('Workflow Configuration').first().json;\n  \n  if (riskScore >= config.criticalRiskThreshold) {\n    riskLevel = 'CRITICAL';\n  } else if (riskScore >= config.highRiskThreshold) {\n    riskLevel = 'HIGH';\n  } else if (riskScore >= config.mediumRiskThreshold) {\n    riskLevel = 'MEDIUM';\n  }\n  \n  results.push({\n    json: {\n      ...validation,\n      riskScore,\n      riskLevel,\n      calculatedAt: new Date().toISOString()\n    }\n  });\n}\n\nreturn results;"
      },
      "typeVersion": 2
    },
    {
      "id": "94c3c769-0d20-49e1-8f06-e618b45c40fc",
      "name": "Check Critical Threshold",
      "type": "n8n-nodes-base.if",
      "position": [
        -272,
        96
      ],
      "parameters": {
        "options": {},
        "conditions": {
          "options": {
            "leftValue": "",
            "caseSensitive": false,
            "typeValidation": "loose"
          },
          "combinator": "and",
          "conditions": [
            {
              "id": "id-1",
              "operator": {
                "type": "string",
                "operation": "equals"
              },
              "leftValue": "={{ $json.escalationLevel }}",
              "rightValue": "executive"
            }
          ]
        }
      },
      "typeVersion": 2.3
    },
    {
      "id": "fb5cc31f-965e-492c-8689-34f5fe82fabd",
      "name": "Consolidate All Actions",
      "type": "n8n-nodes-base.merge",
      "position": [
        -32,
        384
      ],
      "parameters": {},
      "typeVersion": 3.2
    },
    {
      "id": "38e7642e-8299-4b41-be79-34173e69d93c",
      "name": "Format Audit Report",
      "type": "n8n-nodes-base.set",
      "position": [
        192,
        384
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "id-1",
              "name": "reportTitle",
              "type": "string",
              "value": "Property Compliance and Maintenance Audit Report"
            },
            {
              "id": "id-2",
              "name": "reportDate",
              "type": "string",
              "value": "={{ $now.toISO() }}"
            },
            {
              "id": "id-3",
              "name": "validationSummary",
              "type": "string",
              "value": "={{ $json.validationStatus }}"
            },
            {
              "id": "id-4",
              "name": "riskLevel",
              "type": "string",
              "value": "={{ $json.riskLevel }}"
            },
            {
              "id": "id-5",
              "name": "riskScore",
              "type": "number",
              "value": "={{ $json.riskScore }}"
            },
            {
              "id": "id-6",
              "name": "actionsExecuted",
              "type": "string",
              "value": "={{ JSON.stringify($json.actionsExecuted, null, 2) }}"
            },
            {
              "id": "id-7",
              "name": "escalationLevel",
              "type": "string",
              "value": "={{ $json.escalationLevel }}"
            },
            {
              "id": "id-8",
              "name": "nextReviewDate",
              "type": "string",
              "value": "={{ $json.nextReviewDate }}"
            },
            {
              "id": "id-9",
              "name": "auditTrail",
              "type": "string",
              "value": "Complete audit trail stored in data tables for regulatory compliance"
            }
          ]
        }
      },
      "typeVersion": 3.4
    },
    {
      "id": "49bc2c0c-4ed4-4f9b-a81a-ca579d5aa4ca",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -2608,
        -416
      ],
      "parameters": {
        "color": 4,
        "width": 576,
        "height": 336,
        "content": "## Prerequisites\nPACS/VNA system API access, HIPAA-compliant AI service accounts\n## Use Cases\nEmergency radiology triage (stroke, trauma), lung nodule detection and tracking\n## Customization\nModify AI models for modality-specific analysis (CT, MRI, X-ray, ultrasound)\n## Benefits\nReduces diagnosis turnaround time by 60%, improves critical finding detection rates"
      },
      "typeVersion": 1
    },
    {
      "id": "724ded3e-e77b-4840-a478-c4051cfa50b1",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -3120,
        -432
      ],
      "parameters": {
        "width": 448,
        "height": 336,
        "content": "## Setup Steps\n1. Connect **imaging trigger** for automatic study notifications\n2. Configure **PACS/VNA system APIs** with credentials for DICOM image retrieval and metadata access\n3. Add **AI model API keys** to Validation Agent and specialized diagnostic agents \n4. Define **risk stratification criteria** in routing logic based on clinical protocols and imaging findings\n5. Link **Google Calendar API** for radiologist scheduling and case assignment workflows\n6. Configure **Slack** integration for care team communication and critical finding alerts\n7. Connect **email system** for patient/referring physician notifications and report distribution"
      },
      "typeVersion": 1
    },
    {
      "id": "70dd2af1-9684-4a99-a9ae-89739ce75366",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -3856,
        -464
      ],
      "parameters": {
        "width": 704,
        "height": 368,
        "content": "## How It Works\nThis workflow automates medical imaging analysis and diagnostic reporting for radiology departments, imaging centers, and hospital networks managing high patient volumes. Designed for radiologists, medical imaging technicians, and diagnostic coordinators, it solves the challenge of rapidly analyzing imaging studies, prioritizing critical findings, routing cases appropriately, and generating structured reports while maintaining diagnostic accuracy and regulatory compliance. The system triggers on new imaging studies, fetches imagery and metadata, prepares data through AI agents (Validation ensures image quality and completeness), calculates risk scores, routes by validation status and risk level through multiple pathways, deploys specialized AI agents for comprehensive analysis (Orchestration coordinates findings, Google Calendar manages scheduling, Slack Tool enables team communication, Email Actions handles notifications, Water Monitoring tracks contrast protocols, Compliance Validation ensures regulatory adherence, Leave Management coordinates radiologist availability), and generates final diagnostic reports with complete audit trails. Organizations reduce diagnosis turnaround time by 60%, improve critical finding detection rates, ensure consistent reporting standards, and enable radiologists to focus on complex cases requiring expert judgment."
      },
      "typeVersion": 1
    },
    {
      "id": "65d298b8-0f5a-4c1f-85af-d9d91b7549d9",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -2992,
        -32
      ],
      "parameters": {
        "color": 7,
        "width": 592,
        "height": 752,
        "content": "## AI Quality Validation\n**What**: Validation Agent assesses image quality, completeness, and technical adequacy for diagnostic interpretation  \n**Why**: Quality checks prevent misdiagnosis from poor images and trigger automatic re-acquisition "
      },
      "typeVersion": 1
    },
    {
      "id": "04213bfc-7be2-4915-af3b-12b691c9389d",
      "name": "Sticky Note4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -3888,
        -32
      ],
      "parameters": {
        "color": 7,
        "width": 864,
        "height": 608,
        "content": "\n## Automated Image Acquisition\n**What**: Trigger captures new imaging studies, fetches DICOM data and patient metadata from PACS systems  \n**Why**: Immediate processing upon study completion eliminates delays"
      },
      "typeVersion": 1
    },
    {
      "id": "ee58bb95-f1ce-4e67-8562-51d0d596dae5",
      "name": "Sticky Note5",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -2368,
        -32
      ],
      "parameters": {
        "color": 7,
        "width": 912,
        "height": 688,
        "content": "\n## Risk-Based Prioritization\n**What**: Calculates clinical risk scores, routes by validation status and urgency through multi-path workflows  \n**Why**: Priority queuing ensures critical cases (stroke, trauma, cancer) receive immediate radiologist attention"
      },
      "typeVersion": 1
    },
    {
      "id": "808a21d8-92e6-48ae-9ebb-2a8da10dd841",
      "name": "Sticky Note6",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1424,
        -64
      ],
      "parameters": {
        "color": 7,
        "width": 1824,
        "height": 800,
        "content": "## Multi-Agent Diagnostic Coordination\n**What**: Orchestration Agent coordinates specialized agents for scheduling, communication, compliance, and report generation  \n**Why**: Parallel workflows manage complex diagnostic processes while maintaining regulatory compliance and care coordination"
      },
      "typeVersion": 1
    }
  ],
  "active": false,
  "settings": {
    "availableInMCP": false,
    "executionOrder": "v1"
  },
  "versionId": "b7beb7bf-ebaf-40ed-a6c5-9219e9b50d52",
  "connections": {
    "Calculate Risk Scores": {
      "main": [
        [
          {
            "node": "Store Validation Results",
            "type": "main",
            "index": 0
          },
          {
            "node": "Route by Validation Status",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Combine Property Data": {
      "main": [
        [
          {
            "node": "Property Validation Agent",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Workflow Configuration": {
      "main": [
        [
          {
            "node": "Fetch Property Sensor Data",
            "type": "main",
            "index": 0
          },
          {
            "node": "Fetch Compliance Database",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Consolidate All Actions": {
      "main": [
        [
          {
            "node": "Format Audit Report",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Check Critical Threshold": {
      "main": [
        [
          {
            "node": "Store Orchestration Decisions",
            "type": "main",
            "index": 0
          },
          {
            "node": "Consolidate All Actions",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Consolidate All Actions",
            "type": "main",
            "index": 1
          }
        ]
      ]
    },
    "Slack Tool - Alert Teams": {
      "ai_tool": [
        [
          {
            "node": "Governance Orchestration Agent",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "Validation Output Parser": {
      "ai_outputParser": [
        [
          {
            "node": "Property Validation Agent",
            "type": "ai_outputParser",
            "index": 0
          }
        ]
      ]
    },
    "Fetch Compliance Database": {
      "main": [
        [
          {
            "node": "Combine Property Data",
            "type": "main",
            "index": 1
          }
        ]
      ]
    },
    "Lease Agent Output Parser": {
      "ai_outputParser": [
        [
          {
            "node": "Lease Management Agent Tool",
            "type": "ai_outputParser",
            "index": 0
          }
        ]
      ]
    },
    "Property Validation Agent": {
      "main": [
        [
          {
            "node": "Calculate Risk Scores",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Fetch Property Sensor Data": {
      "main": [
        [
          {
            "node": "Combine Property Data",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "OpenAI Model - Lease Agent": {
      "ai_languageModel": [
        [
          {
            "node": "Lease Management Agent Tool",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Repair Agent Output Parser": {
      "ai_outputParser": [
        [
          {
            "node": "Repair Scheduling Agent Tool",
            "type": "ai_outputParser",
            "index": 0
          }
        ]
      ]
    },
    "Route by Validation Status": {
      "main": [
        [
          {
            "node": "Governance Orchestration Agent",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Lease Management Agent Tool": {
      "ai_tool": [
        [
          {
            "node": "Governance Orchestration Agent",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "OpenAI Model - Repair Agent": {
      "ai_languageModel": [
        [
          {
            "node": "Repair Scheduling Agent Tool",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Orchestration Output Parser": {
      "ai_outputParser": [
        [
          {
            "node": "Governance Orchestration Agent",
            "type": "ai_outputParser",
            "index": 0
          }
        ]
      ]
    },
    "Repair Scheduling Agent Tool": {
      "ai_tool": [
        [
          {
            "node": "Governance Orchestration Agent",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "Schedule Property Monitoring": {
      "main": [
        [
          {
            "node": "Workflow Configuration",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Compliance Agent Output Parser": {
      "ai_outputParser": [
        [
          {
            "node": "Compliance Inspection Agent Tool",
            "type": "ai_outputParser",
            "index": 0
          }
        ]
      ]
    },
    "Governance Orchestration Agent": {
      "main": [
        [
          {
            "node": "Check Critical Threshold",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Gmail Tool - Send Notifications": {
      "ai_tool": [
        [
          {
            "node": "Governance Orchestration Agent",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "OpenAI Model - Compliance Agent": {
      "ai_languageModel": [
        [
          {
            "node": "Compliance Inspection Agent Tool",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "OpenAI Model - Validation Agent": {
      "ai_languageModel": [
        [
          {
            "node": "Property Validation Agent",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Compliance Inspection Agent Tool": {
      "ai_tool": [
        [
          {
            "node": "Governance Orchestration Agent",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "Google Sheets Tool - Log Actions": {
      "ai_tool": [
        [
          {
            "node": "Governance Orchestration Agent",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "OpenAI Model - Orchestration Agent": {
      "ai_languageModel": [
        [
          {
            "node": "Governance Orchestration Agent",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Google Calendar Tool - Schedule Repairs": {
      "ai_tool": [
        [
          {
            "node": "Governance Orchestration Agent",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    }
  }
}

Credentials you'll need

Each integration node will prompt for credentials when you import. We strip credential IDs before publishing — you'll add your own.

Pro

For the full experience including quality scoring and batch install features for each workflow upgrade to Pro

About this workflow

This workflow automates medical imaging analysis and diagnostic reporting for radiology departments, imaging centers, and hospital networks managing high patient volumes. Designed for radiologists, medical imaging technicians, and diagnostic coordinators, it solves the challenge…

Source: https://n8n.io/workflows/13338/ — original creator credit. Request a take-down →

More AI & RAG workflows → · Browse all categories →

Related workflows

Workflows that share integrations, category, or trigger type with this one. All free to copy and import.

AI & RAG

This workflow automates end-to-end sustainability lifecycle management for corporate sustainability teams, ESG governance officers, and circular economy programme leads. It addresses the challenge of

Form Trigger, Agent, OpenAI Chat +11
AI & RAG

Template Name: AI Personal Assistant - Task & Email Management Price: $27 Category: Productivity & Automation Difficulty: Intermediate Use Case: Personal productivity automation for busy professionals

Telegram, HTTP Request, OpenAI +8
AI & RAG

This workflow automates end-to-end ESG (Environmental, Social, and Governance) sustainability reporting for enterprise sustainability teams, compliance officers, and green governance leads. It solves

Agent, OpenAI Chat, Output Parser Structured +12
AI & RAG

This workflow automates semiconductor board-level reliability monitoring using AI agents. It targets reliability engineers, manufacturing teams, and quality analysts. The system collects capacity, his

Google Sheets, Agent, OpenAI Chat +10
AI & RAG

This workflow automates procurement fraud detection and supplier compliance monitoring for organizations managing complex purchasing operations. Designed for procurement teams, audit departments, and

OpenAI Chat, Output Parser Structured, Agent +6