{
  "id": "69bJiVuXYBkhkMUv",
  "name": "Clinical Trial Data Integration and Regulatory Compliance Automation",
  "tags": [],
  "nodes": [
    {
      "id": "33dfb332-7cda-45f3-8e42-9d38afcb4209",
      "name": "Schedule Data Ingestion",
      "type": "n8n-nodes-base.scheduleTrigger",
      "position": [
        0,
        232
      ],
      "parameters": {
        "rule": {
          "interval": [
            {}
          ]
        }
      },
      "typeVersion": 1.3
    },
    {
      "id": "137d91c5-52a9-480a-a43f-2795718ea94e",
      "name": "Event Webhook Trigger",
      "type": "n8n-nodes-base.webhook",
      "position": [
        0,
        424
      ],
      "parameters": {
        "path": "6fb7d5bf-62a1-4fa6-b25f-3cadfeacd1e7",
        "options": {}
      },
      "typeVersion": 2.1
    },
    {
      "id": "06abca80-c89a-4404-8f1a-0017b1f4383b",
      "name": "Workflow Configuration",
      "type": "n8n-nodes-base.set",
      "position": [
        448,
        328
      ],
      "parameters": {
        "options": {}
      },
      "typeVersion": 3.4
    },
    {
      "id": "71ae8c18-cedd-4281-80e8-55caf068acad",
      "name": "Merge Trigger Sources",
      "type": "n8n-nodes-base.merge",
      "position": [
        224,
        328
      ],
      "parameters": {},
      "typeVersion": 3.2
    },
    {
      "id": "e8795705-094e-41d7-816f-91952978b4c7",
      "name": "Fetch EDC Clinical Data",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        672,
        328
      ],
      "parameters": {
        "options": {}
      },
      "typeVersion": 4.3
    },
    {
      "id": "a8ff2c49-bcd3-4c98-af65-b0cc997aac63",
      "name": "Parse and Normalize Clinical Data",
      "type": "n8n-nodes-base.code",
      "position": [
        896,
        328
      ],
      "parameters": {},
      "typeVersion": 2
    },
    {
      "id": "835aa63d-1d7d-4d60-b03b-23a0dfa13038",
      "name": "Validate Against Study Protocols",
      "type": "n8n-nodes-base.code",
      "position": [
        1120,
        328
      ],
      "parameters": {},
      "typeVersion": 2
    },
    {
      "id": "89117eb8-92a9-4a24-a323-8bcf59660aa4",
      "name": "Adverse Event Detection Agent",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        1344,
        328
      ],
      "parameters": {
        "options": {},
        "hasOutputParser": true
      },
      "typeVersion": 3.1
    },
    {
      "id": "da8b5274-4e4e-4e46-a8a4-14445de3f042",
      "name": "OpenAI GPT-4 Model",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "position": [
        1352,
        552
      ],
      "parameters": {
        "model": {
          "__rl": true,
          "mode": "list",
          "value": "gpt-4.1-mini"
        },
        "options": {},
        "builtInTools": {}
      },
      "credentials": {
        "openAiApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1.3
    },
    {
      "id": "eab9a6ae-f15f-4fd4-84a9-bf269b4a2b7f",
      "name": "Structured AE Output Parser",
      "type": "@n8n/n8n-nodes-langchain.outputParserStructured",
      "position": [
        1480,
        552
      ],
      "parameters": {},
      "typeVersion": 1.3
    },
    {
      "id": "f00d4c5c-faac-4abe-b68d-7c2b2ff57ed2",
      "name": "Route by Severity",
      "type": "n8n-nodes-base.switch",
      "position": [
        1696,
        328
      ],
      "parameters": {
        "rules": {
          "values": [
            {
              "conditions": {
                "options": {
                  "leftValue": "",
                  "caseSensitive": true,
                  "typeValidation": "strict"
                },
                "combinator": "and",
                "conditions": [
                  {
                    "operator": {
                      "type": "string",
                      "operation": "equals"
                    },
                    "leftValue": "",
                    "rightValue": ""
                  }
                ]
              }
            }
          ]
        },
        "options": {}
      },
      "typeVersion": 3.4
    },
    {
      "id": "26238a8e-da76-420e-b409-cdcd4e91b2b8",
      "name": "Enrich SAE Data",
      "type": "n8n-nodes-base.set",
      "position": [
        1920,
        328
      ],
      "parameters": {
        "options": {}
      },
      "typeVersion": 3.4
    },
    {
      "id": "ea8b5fe4-e38e-47a4-82aa-e62d9ed6e1d5",
      "name": "Store SAE in Validated DB",
      "type": "n8n-nodes-base.postgres",
      "position": [
        2144,
        328
      ],
      "parameters": {
        "table": {
          "__rl": true,
          "mode": "list",
          "value": ""
        },
        "schema": {
          "__rl": true,
          "mode": "list",
          "value": "public"
        }
      },
      "typeVersion": 2.6
    },
    {
      "id": "0798d9b6-e2ef-429e-a24d-a73df4f849c7",
      "name": "Generate SUSAR Report",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        2368,
        328
      ],
      "parameters": {
        "options": {},
        "hasOutputParser": true
      },
      "typeVersion": 3.1
    },
    {
      "id": "dd16f17e-981f-4355-b388-6307c7881db5",
      "name": "OpenAI GPT-4 Model for Reports",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "position": [
        2376,
        552
      ],
      "parameters": {
        "model": {
          "__rl": true,
          "mode": "list",
          "value": "gpt-4.1-mini"
        },
        "options": {},
        "builtInTools": {}
      },
      "credentials": {
        "openAiApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1.3
    },
    {
      "id": "93bde8e6-7fe8-4255-93fb-9f92abc23b97",
      "name": "Structured Report Output Parser",
      "type": "@n8n/n8n-nodes-langchain.outputParserStructured",
      "position": [
        2504,
        552
      ],
      "parameters": {},
      "typeVersion": 1.3
    },
    {
      "id": "0fa72f7e-d623-4dca-80f3-a25c57178509",
      "name": "Store Report in Document Repository",
      "type": "n8n-nodes-base.postgres",
      "position": [
        2720,
        328
      ],
      "parameters": {
        "table": {
          "__rl": true,
          "mode": "list",
          "value": ""
        },
        "schema": {
          "__rl": true,
          "mode": "list",
          "value": "public"
        }
      },
      "typeVersion": 2.6
    },
    {
      "id": "d2e85387-792c-4a4b-8410-376079a472db",
      "name": "Notify Safety Team via Slack",
      "type": "n8n-nodes-base.slack",
      "position": [
        2992,
        336
      ],
      "parameters": {
        "otherOptions": {},
        "authentication": "oAuth2"
      },
      "credentials": {
        "slackOAuth2Api": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 2.4
    },
    {
      "id": "aa2177ed-07e5-4685-9249-77c64e783bc9",
      "name": "Email QA Team",
      "type": "n8n-nodes-base.emailSend",
      "position": [
        3200,
        336
      ],
      "parameters": {
        "options": {}
      },
      "typeVersion": 2.1
    },
    {
      "id": "6b4353fe-c195-4b92-8808-e6be3cae5f92",
      "name": "Check if Authority Submission Required",
      "type": "n8n-nodes-base.if",
      "position": [
        3392,
        328
      ],
      "parameters": {
        "options": {}
      },
      "typeVersion": 2.3
    },
    {
      "id": "76cc4989-84e2-4453-af53-b6048441d416",
      "name": "Prepare Authority Submission Package",
      "type": "n8n-nodes-base.code",
      "position": [
        3616,
        328
      ],
      "parameters": {},
      "typeVersion": 2
    },
    {
      "id": "341b6ebd-616c-47f7-9c05-0cb244e3ebd9",
      "name": "Log Audit Trail",
      "type": "n8n-nodes-base.postgres",
      "position": [
        3840,
        328
      ],
      "parameters": {
        "table": {
          "__rl": true,
          "mode": "list",
          "value": ""
        },
        "schema": {
          "__rl": true,
          "mode": "list",
          "value": "public"
        }
      },
      "typeVersion": 2.6
    },
    {
      "id": "30ea847f-f8f2-4e76-a9d2-16ae89b84d04",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1712,
        -304
      ],
      "parameters": {
        "color": 4,
        "width": 480,
        "height": 352,
        "content": "## Prerequisites\nActive satellite data API access (ECC, NASA, ESA) with authentication credentials. \n## Use Cases\nAutomated climate monitoring with monthly regulatory submissions.\n## Customization\nModify AI analysis prompts for specific environmental parameters. \n## Benefits\nReduces satellite data processing time by 85% through end-to-end automation."
      },
      "typeVersion": 1
    },
    {
      "id": "ccecc2bf-fc89-45c5-92cb-e42f5ab349f9",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1056,
        -176
      ],
      "parameters": {
        "width": 592,
        "height": 224,
        "content": "## Setup Steps\n1. Configure ECC/climate API credentials for satellite data access\n2. Set up webhook endpoints for event-driven data ingestion triggers\n3. Add OpenAI API key for geospatial analysis and anomaly detection\n4. Configure NVIDIA NIM API for specialized environmental modeling\n5. Set Google Sheets credentials for audit logging and tracking\n6. Connect Slack workspace and specify notification channels for submission updates\n7. Configure Gmail OAuth for automated stakeholder notifications"
      },
      "typeVersion": 1
    },
    {
      "id": "799501c2-549f-49d1-b1d7-671dcbffa384",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -32,
        -192
      ],
      "parameters": {
        "width": 1040,
        "height": 240,
        "content": "## How It Works\nThis workflow automates satellite data processing by ingesting raw geospatial data, applying AI analysis, and submitting formatted reports to regulatory authorities. Designed for environmental agencies, research institutions, and compliance teams, it solves the challenge of manually processing large satellite datasets and preparing standardized submissions for government agencies. The system triggers on scheduled intervals or event webhooks, fetching satellite imagery and sensor data from ECC/climate APIs. Raw data flows through parsing and normalization stages, then routes to AI models for analysis\u2014detecting environmental changes, calculating metrics, and identifying anomalies. Processed results are validated against agency specifications, formatted into SDQAR reports, and automatically stored in designated repositories. The workflow generates submission packages with required metadata, notifies stakeholders via Slack and email, and logs all activities to Google Sheets for audit trails. This eliminates hours of manual data processing, ensures compliance with submission standards, and accelerates environmental monitoring workflows."
      },
      "typeVersion": 1
    },
    {
      "id": "3000524a-6f84-45ed-9495-b3b529101e7e",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        2320,
        80
      ],
      "parameters": {
        "color": 7,
        "width": 576,
        "height": 704,
        "content": "## Validation & Formatting \nValidates processed data against regulatory specifications and formats into SDQAR-compliant report structures.\n**Why** - Ensures submissions meet authority requirements, preventing rejections and compliance delays from formatting errors."
      },
      "typeVersion": 1
    },
    {
      "id": "f2948992-baee-4ba0-9e3d-5c6d6d47104a",
      "name": "Sticky Note4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1264,
        80
      ],
      "parameters": {
        "color": 7,
        "width": 1040,
        "height": 720,
        "content": "## AI Analysis \nRoutes geospatial data through specialized models for environmental change detection and metric calculation.\n**Why** - Extracts actionable insights from raw satellite data that manual analysis would miss or delay significantly."
      },
      "typeVersion": 1
    },
    {
      "id": "3b8e1586-781b-4522-9739-e622612fd4c7",
      "name": "Sticky Note5",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -96,
        80
      ],
      "parameters": {
        "color": 7,
        "width": 1344,
        "height": 704,
        "content": "## Data Ingestion \nFetches satellite imagery and climate sensor data from ECC APIs and external data sources using scheduled triggers.\n**Why** - Automates continuous data collection from multiple satellite systems, eliminating manual downloads and API management."
      },
      "typeVersion": 1
    },
    {
      "id": "c1953bb8-ec63-4954-930b-27b5a046446f",
      "name": "Sticky Note6",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        2928,
        64
      ],
      "parameters": {
        "color": 7,
        "width": 1136,
        "height": 704,
        "content": "## Authority Submission \nGenerates submission packages, stores reports in designated repositories, and notifies relevant stakeholders automatically.\n**Why** - Streamlines regulatory reporting by eliminating manual file preparation and submission tracking workflows.\n"
      },
      "typeVersion": 1
    }
  ],
  "active": false,
  "settings": {
    "availableInMCP": false,
    "executionOrder": "v1"
  },
  "versionId": "3c573785-ebc7-4cef-8898-ae7d92158acd",
  "connections": {
    "Email QA Team": {
      "main": [
        [
          {
            "node": "Check if Authority Submission Required",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Enrich SAE Data": {
      "main": [
        [
          {
            "node": "Store SAE in Validated DB",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Route by Severity": {
      "main": [
        [
          {
            "node": "Enrich SAE Data",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "OpenAI GPT-4 Model": {
      "ai_languageModel": [
        [
          {
            "node": "Adverse Event Detection Agent",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Event Webhook Trigger": {
      "main": [
        [
          {
            "node": "Merge Trigger Sources",
            "type": "main",
            "index": 1
          }
        ]
      ]
    },
    "Generate SUSAR Report": {
      "main": [
        [
          {
            "node": "Store Report in Document Repository",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Merge Trigger Sources": {
      "main": [
        [
          {
            "node": "Workflow Configuration",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Workflow Configuration": {
      "main": [
        [
          {
            "node": "Fetch EDC Clinical Data",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Fetch EDC Clinical Data": {
      "main": [
        [
          {
            "node": "Parse and Normalize Clinical Data",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Schedule Data Ingestion": {
      "main": [
        [
          {
            "node": "Merge Trigger Sources",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Store SAE in Validated DB": {
      "main": [
        [
          {
            "node": "Generate SUSAR Report",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Structured AE Output Parser": {
      "ai_outputParser": [
        [
          {
            "node": "Adverse Event Detection Agent",
            "type": "ai_outputParser",
            "index": 0
          }
        ]
      ]
    },
    "Notify Safety Team via Slack": {
      "main": [
        [
          {
            "node": "Email QA Team",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Adverse Event Detection Agent": {
      "main": [
        [
          {
            "node": "Route by Severity",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "OpenAI GPT-4 Model for Reports": {
      "ai_languageModel": [
        [
          {
            "node": "Generate SUSAR Report",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Structured Report Output Parser": {
      "ai_outputParser": [
        [
          {
            "node": "Generate SUSAR Report",
            "type": "ai_outputParser",
            "index": 0
          }
        ]
      ]
    },
    "Validate Against Study Protocols": {
      "main": [
        [
          {
            "node": "Adverse Event Detection Agent",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Parse and Normalize Clinical Data": {
      "main": [
        [
          {
            "node": "Validate Against Study Protocols",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Store Report in Document Repository": {
      "main": [
        [
          {
            "node": "Notify Safety Team via Slack",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Prepare Authority Submission Package": {
      "main": [
        [
          {
            "node": "Log Audit Trail",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Check if Authority Submission Required": {
      "main": [
        [
          {
            "node": "Prepare Authority Submission Package",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}