This workflow corresponds to n8n.io template #13153 — we link there as the canonical source.
This workflow follows the Agent → Datatable 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 →
{
"id": "-AUrAb2BWH0T5B8r5euti",
"name": "Intelligent Clinical Signal Validation and Regulatory Governance Orchestration",
"tags": [],
"nodes": [
{
"id": "1e4ed022-6987-4eae-aafc-93d7efb4adda",
"name": "Schedule Trigger",
"type": "n8n-nodes-base.scheduleTrigger",
"position": [
-448,
272
],
"parameters": {
"rule": {
"interval": [
{}
]
}
},
"typeVersion": 1.3
},
{
"id": "c49c62c3-310d-4a47-a0c3-6195f3aad8c9",
"name": "Workflow Configuration",
"type": "n8n-nodes-base.set",
"position": [
-224,
272
],
"parameters": {
"options": {},
"assignments": {
"assignments": [
{
"id": "id-1",
"name": "clinicalTrialApiUrl",
"type": "string",
"value": "<__PLACEHOLDER_VALUE__Clinical Trial Signals API URL__>"
},
{
"id": "id-2",
"name": "labProductionApiUrl",
"type": "string",
"value": "<__PLACEHOLDER_VALUE__Lab & Production Signals API URL__>"
},
{
"id": "id-3",
"name": "qualityTeamEmail",
"type": "string",
"value": "<__PLACEHOLDER_VALUE__Quality Team Email Address__>"
},
{
"id": "id-4",
"name": "riskThreshold",
"type": "number",
"value": 0.7
}
]
},
"includeOtherFields": true
},
"typeVersion": 3.4
},
{
"id": "11573ff8-e1d2-468d-9d58-15385cb7c21a",
"name": "Fetch Clinical Trial Signals",
"type": "n8n-nodes-base.httpRequest",
"position": [
0,
176
],
"parameters": {
"url": "={{ $('Workflow Configuration').first().json.clinicalTrialApiUrl }}",
"options": {}
},
"typeVersion": 4.3
},
{
"id": "1252e96d-d5ff-4aaf-904b-c25b4c361ed1",
"name": "Fetch Lab & Production Signals",
"type": "n8n-nodes-base.httpRequest",
"position": [
0,
368
],
"parameters": {
"url": "={{ $('Workflow Configuration').first().json.labProductionApiUrl }}",
"options": {}
},
"typeVersion": 4.3
},
{
"id": "f0f43124-629a-4da1-887c-f2ca84032ce0",
"name": "Merge Signal Sources",
"type": "n8n-nodes-base.merge",
"position": [
224,
272
],
"parameters": {},
"typeVersion": 3.2
},
{
"id": "5e014cc7-6966-49c0-b21f-f7ae295757ea",
"name": "OpenAI Model - Clinical Signal Agent",
"type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
"position": [
456,
416
],
"parameters": {
"model": {
"__rl": true,
"mode": "list",
"value": "gpt-4.1-mini"
},
"options": {},
"builtInTools": {}
},
"credentials": {
"openAiApi": {
"name": "<your credential>"
}
},
"typeVersion": 1.3
},
{
"id": "85d39f61-d32a-4abb-b648-6eb6a1d5e6f8",
"name": "Clinical Signal Output Parser",
"type": "@n8n/n8n-nodes-langchain.outputParserStructured",
"position": [
584,
416
],
"parameters": {
"schemaType": "manual",
"inputSchema": "{\n \"type\": \"object\",\n \"properties\": {\n \"signalId\": {\n \"type\": \"string\"\n },\n \"signalType\": {\n \"type\": \"string\",\n \"enum\": [\"clinical_trial\", \"lab\", \"production\"]\n },\n \"validationStatus\": {\n \"type\": \"string\",\n \"enum\": [\"valid\", \"invalid\", \"requires_review\"]\n },\n \"riskScore\": {\n \"type\": \"number\",\n \"minimum\": 0,\n \"maximum\": 1\n },\n \"patientSafetyImpact\": {\n \"type\": \"string\",\n \"enum\": [\"none\", \"low\", \"medium\", \"high\", \"critical\"]\n },\n \"hipaaCompliant\": {\n \"type\": \"boolean\"\n },\n \"findings\": {\n \"type\": \"array\",\n \"items\": {\n \"type\": \"string\"\n }\n },\n \"recommendations\": {\n \"type\": \"array\",\n \"items\": {\n \"type\": \"string\"\n }\n }\n }\n}"
},
"typeVersion": 1.3
},
{
"id": "b706a2cb-f964-4e28-8e6f-5ab367cd58ec",
"name": "Clinical Signal Validation Agent",
"type": "@n8n/n8n-nodes-langchain.agent",
"position": [
448,
192
],
"parameters": {
"text": "={{ JSON.stringify($json) }}",
"options": {
"systemMessage": "You are a Clinical Signal Validation Agent specialized in pharmaceutical quality control and patient safety.\n\nYour role is to validate clinical trial, laboratory, and production signals for:\n- Data integrity and completeness\n- HIPAA compliance (PHI handling, de-identification)\n- Patient safety risk assessment\n- Regulatory compliance (FDA 21 CFR Part 11, GxP)\n- Signal quality and reliability\n\nFor each signal, you must:\n1. Verify data structure and required fields\n2. Assess HIPAA compliance - check for proper PHI handling\n3. Calculate risk score (0-1) based on signal severity and patient impact\n4. Determine patient safety impact level\n5. Identify validation status (valid/invalid/requires_review)\n6. Document findings and recommendations\n\nReturn structured validation results with complete traceability for audit purposes."
},
"promptType": "define",
"hasOutputParser": true
},
"typeVersion": 3.1
},
{
"id": "2bf39ff7-352b-44bd-91dc-4ea809eb3873",
"name": "OpenAI Model - Governance Agent",
"type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
"position": [
808,
416
],
"parameters": {
"model": {
"__rl": true,
"mode": "list",
"value": "gpt-4.1-mini"
},
"options": {},
"builtInTools": {}
},
"credentials": {
"openAiApi": {
"name": "<your credential>"
}
},
"typeVersion": 1.3
},
{
"id": "0be3d670-4146-490a-ab54-2d8adb767a5b",
"name": "Governance Output Parser",
"type": "@n8n/n8n-nodes-langchain.outputParserStructured",
"position": [
936,
416
],
"parameters": {
"schemaType": "manual",
"inputSchema": "{\n \"type\": \"object\",\n \"properties\": {\n \"governanceAction\": {\n \"type\": \"string\",\n \"enum\": [\"regulatory_report\", \"batch_release\", \"post_market_surveillance\"]\n },\n \"requiresQualityEscalation\": {\n \"type\": \"boolean\"\n },\n \"escalationReason\": {\n \"type\": \"string\"\n },\n \"reportingDeadline\": {\n \"type\": \"string\"\n },\n \"complianceStatus\": {\n \"type\": \"string\"\n },\n \"auditNotes\": {\n \"type\": \"string\"\n }\n }\n}"
},
"typeVersion": 1.3
},
{
"id": "e6eaefa4-bc76-4e2d-9077-013c4163be9d",
"name": "Regulatory Governance Agent",
"type": "@n8n/n8n-nodes-langchain.agent",
"position": [
800,
192
],
"parameters": {
"text": "={{ JSON.stringify($json.output) }}",
"options": {
"systemMessage": "You are a Regulatory Governance Agent responsible for pharmaceutical compliance and quality orchestration.\n\nYour role is to determine appropriate regulatory actions based on validated clinical signals:\n\n1. REGULATORY REPORTING: For signals requiring FDA/EMA notification\n - Adverse events with patient safety impact\n - Protocol deviations in clinical trials\n - Manufacturing quality issues\n\n2. BATCH RELEASE COORDINATION: For production batch decisions\n - Quality control test results\n - Manufacturing compliance verification\n - Release or hold determinations\n\n3. POST-MARKET SURVEILLANCE: For ongoing safety monitoring\n - Trend analysis of adverse events\n - Product performance tracking\n - Risk-benefit assessments\n\nFor each validated signal, determine:\n- Appropriate governance action (regulatory_report, batch_release, post_market_surveillance)\n- Whether quality team escalation is required\n- Compliance status and reporting deadlines\n- Detailed audit notes for regulatory inspection readiness\n\nEnsure all decisions maintain patient safety, HIPAA compliance, and full auditability."
},
"promptType": "define",
"hasOutputParser": true
},
"typeVersion": 3.1
},
{
"id": "63fc7eb9-4cbc-47a4-84a0-6a2e64fa8af3",
"name": "Route by Governance Action",
"type": "n8n-nodes-base.switch",
"position": [
1216,
320
],
"parameters": {
"rules": {
"values": [
{
"outputKey": "Regulatory Report",
"conditions": {
"options": {
"leftValue": "",
"caseSensitive": true,
"typeValidation": "strict"
},
"combinator": "and",
"conditions": [
{
"operator": {
"type": "string",
"operation": "equals"
},
"leftValue": "={{ $json.output.governanceAction }}",
"rightValue": "regulatory_report"
}
]
},
"renameOutput": true
},
{
"outputKey": "Batch Release",
"conditions": {
"options": {
"leftValue": "",
"caseSensitive": true,
"typeValidation": "strict"
},
"combinator": "and",
"conditions": [
{
"operator": {
"type": "string",
"operation": "equals"
},
"leftValue": "={{ $json.output.governanceAction }}",
"rightValue": "batch_release"
}
]
},
"renameOutput": true
},
{
"outputKey": "Post-Market Surveillance",
"conditions": {
"options": {
"leftValue": "",
"caseSensitive": true,
"typeValidation": "strict"
},
"combinator": "and",
"conditions": [
{
"operator": {
"type": "string",
"operation": "equals"
},
"leftValue": "={{ $json.output.governanceAction }}",
"rightValue": "post_market_surveillance"
}
]
},
"renameOutput": true
}
]
},
"options": {}
},
"typeVersion": 3.4
},
{
"id": "5050efb5-a8a3-46be-877b-e4372cf47ba6",
"name": "Log Regulatory Report",
"type": "n8n-nodes-base.dataTable",
"position": [
1440,
144
],
"parameters": {
"options": {},
"dataTableId": {
"__rl": true,
"mode": "list",
"value": ""
}
},
"typeVersion": 1.1
},
{
"id": "68fc4ec6-fc12-484d-bf95-dda7bf461acd",
"name": "Log Batch Release",
"type": "n8n-nodes-base.dataTable",
"position": [
1440,
336
],
"parameters": {
"options": {},
"dataTableId": {
"__rl": true,
"mode": "list",
"value": ""
}
},
"typeVersion": 1.1
},
{
"id": "04a62849-a93b-4144-b4f3-7bb0911d0606",
"name": "Log Post-Market Surveillance",
"type": "n8n-nodes-base.dataTable",
"position": [
1440,
528
],
"parameters": {
"options": {},
"dataTableId": {
"__rl": true,
"mode": "list",
"value": ""
}
},
"typeVersion": 1.1
},
{
"id": "d1c6c582-79d1-4bae-b001-41f56dcb0bd5",
"name": "Check Quality Escalation Required",
"type": "n8n-nodes-base.if",
"position": [
1664,
288
],
"parameters": {
"options": {},
"conditions": {
"options": {
"version": 3,
"leftValue": "",
"caseSensitive": true,
"typeValidation": "strict"
},
"combinator": "and",
"conditions": [
{
"id": "id-1",
"operator": {
"type": "boolean",
"operation": "equals"
},
"leftValue": "={{ $json.output.requiresQualityEscalation }}",
"rightValue": true
}
]
}
},
"typeVersion": 2.3
},
{
"id": "ab1395d3-2296-4ff6-8611-55880a0f0dab",
"name": "Escalate to Quality Team",
"type": "n8n-nodes-base.emailSend",
"position": [
1888,
208
],
"parameters": {
"html": "=<h2>Quality Team Escalation Required</h2><p><strong>Governance Action:</strong> {{ $json.output.governanceAction }}</p><p><strong>Escalation Reason:</strong> {{ $json.output.escalationReason }}</p><p><strong>Compliance Status:</strong> {{ $json.output.complianceStatus }}</p><p><strong>Reporting Deadline:</strong> {{ $json.output.reportingDeadline }}</p><h3>Audit Notes:</h3><p>{{ $json.output.auditNotes }}</p><p>This is an automated notification from the Clinical Signal Validation and Regulatory Governance system.</p>",
"options": {},
"subject": "=Quality Escalation Required: {{ $json.output.governanceAction }}",
"toEmail": "={{ $('Workflow Configuration').first().json.qualityTeamEmail }}",
"fromEmail": "<__PLACEHOLDER_VALUE__Sender Email Address__>"
},
"typeVersion": 2.1
},
{
"id": "4b66f861-78b3-45b5-b0b7-74df06859694",
"name": "Audit Trail - All Actions",
"type": "n8n-nodes-base.dataTable",
"position": [
2144,
384
],
"parameters": {
"options": {},
"dataTableId": {
"__rl": true,
"mode": "list",
"value": ""
}
},
"typeVersion": 1.1
},
{
"id": "8291accb-a69b-43ed-8db2-0570ecf3aa47",
"name": "Sticky Note",
"type": "n8n-nodes-base.stickyNote",
"position": [
-464,
-320
],
"parameters": {
"width": 736,
"height": 288,
"content": "\n## How It Works\nThis workflow automates clinical trial signal validation and regulatory governance through intelligent AI-driven oversight. Designed for clinical research organizations, pharmaceutical companies, and regulatory affairs teams, it solves the critical challenge of ensuring trial compliance while managing post-market surveillance obligations across multiple regulatory frameworks.The system operates on scheduled intervals, fetching data from clinical trial databases and laboratory production signals, then merging these sources for comprehensive analysis. It employs dual AI agents for clinical signal validation and governance assessment, detecting protocol deviations, safety signals, and compliance violations. The workflow intelligently routes findings based on governance action requirements, orchestrating parallel processes for regulatory reporting, batch result documentation, and post-market surveillance logging. By maintaining synchronized audit trails across regulatory reports, batch records, post-market surveillance, and comprehensive action logs, it ensures complete traceability while automating escalation to quality teams when intervention is required."
},
"typeVersion": 1
},
{
"id": "44d85554-fcb5-4010-a20a-6ac8c331e3d5",
"name": "Sticky Note1",
"type": "n8n-nodes-base.stickyNote",
"position": [
320,
-400
],
"parameters": {
"width": 432,
"height": 368,
"content": "## Setup Steps\n1. Configure Schedule Trigger with monitoring frequency for trial oversight\n2. Connect Workflow Configuration node with trial parameters and compliance rules\n3. Set up Fetch Clinical Trial Data and Fetch Lab & Production Signals nodes \n4. Configure Merge Signal Sources node for data consolidation logic\n5. Connect Clinical Signal Validation Agent with OpenAI/Nvidia API credentials\n6. Set up parallel AI processing \n7. Configure Regulatory Governance Agent with AI API credentials for compliance assessment\n8. Connect Route by Governance Action node with classification logic"
},
"typeVersion": 1
},
{
"id": "db4c6572-a8e9-4b0c-8ff2-a131c48f0b04",
"name": "Sticky Note2",
"type": "n8n-nodes-base.stickyNote",
"position": [
800,
-400
],
"parameters": {
"color": 6,
"width": 480,
"height": 368,
"content": "## Prerequisites\nOpenAI or Nvidia API credentials for AI validation agents, clinical trial database API access\n## Use Cases\nPharmaceutical companies managing Phase III trial monitoring, CROs overseeing multi-site clinical studies\n## Customization\nAdjust signal validation criteria for therapeutic area-specific protocols\n## Benefits\nReduces regulatory review cycles by 70%, eliminates manual signal triage"
},
"typeVersion": 1
},
{
"id": "38146c6d-1607-47ed-8e6f-57d030477221",
"name": "Sticky Note3",
"type": "n8n-nodes-base.stickyNote",
"position": [
1152,
16
],
"parameters": {
"color": 7,
"width": 1136,
"height": 672,
"content": "## Governance-Driven Action Routing\n**What:** Routes validated findings through governance-specific workflows with parallel logging streams and quality team escalation\n**Why:** Ensures regulatory-mandated actions receive proper documentation while critical issues trigger immediate quality intervention\n"
},
"typeVersion": 1
},
{
"id": "173e2dea-339b-4cbb-9575-d58bc07c57af",
"name": "Sticky Note4",
"type": "n8n-nodes-base.stickyNote",
"position": [
400,
32
],
"parameters": {
"color": 7,
"width": 720,
"height": 608,
"content": "## Dual-Agent Validation Framework\n**What:** Processes merged data through parallel AI agents for clinical signal validation and governance compliance assessment\n**Why:** Separates clinical safety evaluation from regulatory governance to ensure specialized analysis of distinct compliance dimensions"
},
"typeVersion": 1
},
{
"id": "a719c280-57d0-4bd0-b2af-c1550ccfe541",
"name": "Sticky Note5",
"type": "n8n-nodes-base.stickyNote",
"position": [
-480,
32
],
"parameters": {
"color": 7,
"width": 848,
"height": 624,
"content": "## Multi-Source Clinical Data Integration\n**What:** Fetches and merges clinical trial data with laboratory production signals on scheduled intervals for unified compliance monitoring\n**Why:** Ensures comprehensive oversight by correlating patient safety signals with manufacturing quality data for complete regulatory visibility"
},
"typeVersion": 1
}
],
"active": false,
"settings": {
"availableInMCP": false,
"executionOrder": "v1"
},
"versionId": "c3bfdb10-1e40-49c0-9b5f-1f68ad742197",
"connections": {
"Schedule Trigger": {
"main": [
[
{
"node": "Workflow Configuration",
"type": "main",
"index": 0
}
]
]
},
"Log Batch Release": {
"main": [
[
{
"node": "Check Quality Escalation Required",
"type": "main",
"index": 0
}
]
]
},
"Merge Signal Sources": {
"main": [
[
{
"node": "Clinical Signal Validation Agent",
"type": "main",
"index": 0
}
]
]
},
"Log Regulatory Report": {
"main": [
[
{
"node": "Check Quality Escalation Required",
"type": "main",
"index": 0
}
]
]
},
"Workflow Configuration": {
"main": [
[
{
"node": "Fetch Clinical Trial Signals",
"type": "main",
"index": 0
},
{
"node": "Fetch Lab & Production Signals",
"type": "main",
"index": 0
}
]
]
},
"Escalate to Quality Team": {
"main": [
[
{
"node": "Audit Trail - All Actions",
"type": "main",
"index": 0
}
]
]
},
"Governance Output Parser": {
"ai_outputParser": [
[
{
"node": "Regulatory Governance Agent",
"type": "ai_outputParser",
"index": 0
}
]
]
},
"Route by Governance Action": {
"main": [
[
{
"node": "Log Regulatory Report",
"type": "main",
"index": 0
}
],
[
{
"node": "Log Batch Release",
"type": "main",
"index": 0
}
],
[
{
"node": "Log Post-Market Surveillance",
"type": "main",
"index": 0
}
]
]
},
"Regulatory Governance Agent": {
"main": [
[
{
"node": "Route by Governance Action",
"type": "main",
"index": 0
}
]
]
},
"Fetch Clinical Trial Signals": {
"main": [
[
{
"node": "Merge Signal Sources",
"type": "main",
"index": 0
}
]
]
},
"Log Post-Market Surveillance": {
"main": [
[
{
"node": "Check Quality Escalation Required",
"type": "main",
"index": 0
}
]
]
},
"Clinical Signal Output Parser": {
"ai_outputParser": [
[
{
"node": "Clinical Signal Validation Agent",
"type": "ai_outputParser",
"index": 0
}
]
]
},
"Fetch Lab & Production Signals": {
"main": [
[
{
"node": "Merge Signal Sources",
"type": "main",
"index": 1
}
]
]
},
"OpenAI Model - Governance Agent": {
"ai_languageModel": [
[
{
"node": "Regulatory Governance Agent",
"type": "ai_languageModel",
"index": 0
}
]
]
},
"Clinical Signal Validation Agent": {
"main": [
[
{
"node": "Regulatory Governance Agent",
"type": "main",
"index": 0
}
]
]
},
"Check Quality Escalation Required": {
"main": [
[
{
"node": "Escalate to Quality Team",
"type": "main",
"index": 0
}
],
[
{
"node": "Audit Trail - All Actions",
"type": "main",
"index": 0
}
]
]
},
"OpenAI Model - Clinical Signal Agent": {
"ai_languageModel": [
[
{
"node": "Clinical Signal Validation Agent",
"type": "ai_languageModel",
"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.
openAiApi
For the full experience including quality scoring and batch install features for each workflow upgrade to Pro
About this workflow
This workflow automates clinical trial signal validation and regulatory governance through intelligent AI-driven oversight. Designed for clinical research organizations, pharmaceutical companies, and regulatory affairs teams, it solves the critical challenge of ensuring trial…
Source: https://n8n.io/workflows/13153/ — original creator credit. Request a take-down →
Related workflows
Workflows that share integrations, category, or trigger type with this one. All free to copy and import.
This workflow automates performance governance and policy compliance monitoring for HR leaders, talent managers, and organizational development teams across enterprises. It solves the challenge of mai
This workflow automates policy compliance validation and approval orchestration through intelligent AI-driven assessment. Designed for compliance departments, legal teams, and governance officers, it
This workflow transforms natural language queries into research reports through a five-stage AI pipeline. When triggered via webhook (typically from Google Sheets using the companion [](https://gist.g
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
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