{
  "name": "Decrypt legacy PDF archives with HTML to PDF, PostgreSQL and Google Drive",
  "nodes": [
    {
      "id": "6030c13d-17ff-4f71-9ce2-0edb90eefe70",
      "name": "Sticky_Quarantine",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        544,
        2000
      ],
      "parameters": {
        "width": 578,
        "height": 412,
        "content": "## ⚠️ ERROR HANDLING\nQuarantine zone for failed decryptions, invalid keys, and corrupted files. All failures logged for manual review."
      }
    },
    {
      "id": "21d5bd3f-de38-42a3-935b-9f0a8851db27",
      "name": "IF: File Validator",
      "type": "n8n-nodes-base.if",
      "position": [
        -64,
        1632
      ]
    },
    {
      "id": "7adf83f8-48ab-421e-aac3-1f2fe3c42c2c",
      "name": "IF: Key Found",
      "type": "n8n-nodes-base.if",
      "position": [
        416,
        1632
      ]
    },
    {
      "id": "326cdef0-edee-44b2-a7ef-19e77d116c4c",
      "name": "Postgres: Audit Logger",
      "type": "n8n-nodes-base.postgres",
      "position": [
        976,
        1584
      ]
    },
    {
      "id": "4ae38931-c4f9-43eb-872f-5c8e4bff6704",
      "name": "Postgres: Quarantine Log",
      "type": "n8n-nodes-base.postgres",
      "position": [
        592,
        2128
      ]
    },
    {
      "id": "4e043139-b7eb-4084-90d6-f18e1b9f395b",
      "name": "Slack: Quarantine Alert",
      "type": "n8n-nodes-base.slack",
      "position": [
        752,
        2192
      ]
    },
    {
      "id": "93291786-5874-46e1-98bf-d604ed8ed951",
      "name": "Google Drive: Quarantine Vault",
      "type": "n8n-nodes-base.googleDrive",
      "position": [
        944,
        2128
      ]
    },
    {
      "id": "d884a84e-3c81-434f-9d34-e49a1b3d511e",
      "name": "Postgres: Validation Failure",
      "type": "n8n-nodes-base.postgres",
      "position": [
        48,
        1776
      ]
    },
    {
      "id": "861fe3de-d59a-40e3-8815-19e1510b49ef",
      "name": "Sticky_Intake1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -288,
        1312
      ],
      "parameters": {
        "width": 450,
        "height": 650,
        "content": "## 🛡️ PHASE 1: Intake & Custody\nFetches encrypted files. Generates an initial SHA-256 hash to track the original state of the legacy data before any modification. Validates file types and sizes."
      }
    },
    {
      "id": "35459a7b-b829-429e-bf79-0fbc5b36aab8",
      "name": "Sticky_Unlock1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        192,
        1312
      ],
      "parameters": {
        "width": 600,
        "height": 650,
        "content": "## 🔐 PHASE 2: Key Vault & Unlock\nMatches file metadata with the SQL Key Vault. **Unlock Node** strips protection. Parallel branch handles 'Key Failure' quarantine logic with retry mechanism."
      }
    },
    {
      "id": "b23463f3-f25a-491b-98f7-ae4ce6824d12",
      "name": "Sticky_Audit1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        832,
        1312
      ],
      "parameters": {
        "width": 646,
        "height": 650,
        "content": "## ⚖️ PHASE 3: Audit & Archival\nLogs forensic metadata to Postgres. Moves decrypted assets to the Secure Audit Vault. Notifies Legal of the processed batch with comprehensive reports."
      }
    },
    {
      "id": "2f5a4d50-dcf1-42aa-99c1-9d9dfcc145b9",
      "name": "Code: Forensic Intake1",
      "type": "n8n-nodes-base.code",
      "position": [
        -224,
        1632
      ]
    },
    {
      "id": "c51e84c6-2485-4439-9246-60179d39b7aa",
      "name": "Postgres: Key Vault1",
      "type": "n8n-nodes-base.postgres",
      "position": [
        256,
        1632
      ]
    },
    {
      "id": "7592e1f2-15c6-4bb0-a498-37e72068d58d",
      "name": "HTML to PDF: Unlock Engine1",
      "type": "n8n-nodes-htmlcsstopdf.htmlcsstopdf",
      "position": [
        608,
        1520
      ]
    },
    {
      "id": "867b0eda-793b-4c74-9876-048eec7dbf78",
      "name": "Code: Integrity Guard1",
      "type": "n8n-nodes-base.code",
      "position": [
        816,
        1552
      ]
    },
    {
      "id": "db664b16-1a47-45fc-bacd-c790c2ecea41",
      "name": "Google Drive: Audit Vault1",
      "type": "n8n-nodes-base.googleDrive",
      "position": [
        1136,
        1520
      ]
    },
    {
      "id": "4e4d3ab8-ee2c-470b-92ce-fd51f8f5f8b2",
      "name": "Slack: Compliance Log1",
      "type": "n8n-nodes-base.slack",
      "position": [
        1312,
        1456
      ]
    },
    {
      "id": "518a0b1d-c397-4332-b694-c33b3a0310d2",
      "name": "Gmail: Legal Summary1",
      "type": "n8n-nodes-base.gmail",
      "position": [
        1312,
        1648
      ]
    },
    {
      "id": "4c0674f1-b0cb-4aef-bf43-401b686e66bd",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -864,
        656
      ],
      "parameters": {
        "width": 464,
        "height": 624,
        "content": "## ⚖️ Sovereign Decryption & Compliance Gateway v10.0\n\nIndustrial-grade pipeline for the bulk unlocking, indexing, and forensic archival of legacy protected assets.\n\n### ⚙️ Core Sovereign Logic\n* **PH"
      }
    }
  ],
  "connections": {
    "IF: Key Found": {
      "main": [
        [
          {
            "node": "HTML to PDF: Unlock Engine1",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Postgres: Quarantine Log",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "IF: File Validator": {
      "main": [
        [
          {
            "node": "Postgres: Key Vault1",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Postgres: Validation Failure",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Postgres: Key Vault1": {
      "main": [
        [
          {
            "node": "IF: Key Found",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Code: Forensic Intake1": {
      "main": [
        [
          {
            "node": "IF: File Validator",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Code: Integrity Guard1": {
      "main": [
        [
          {
            "node": "Postgres: Audit Logger",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Postgres: Audit Logger": {
      "main": [
        [
          {
            "node": "Google Drive: Audit Vault1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Slack: Quarantine Alert": {
      "main": [
        [
          {
            "node": "Google Drive: Quarantine Vault",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Postgres: Quarantine Log": {
      "main": [
        [
          {
            "node": "Slack: Quarantine Alert",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Google Drive: Audit Vault1": {
      "main": [
        [
          {
            "node": "Slack: Compliance Log1",
            "type": "main",
            "index": 0
          },
          {
            "node": "Gmail: Legal Summary1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "HTML to PDF: Unlock Engine1": {
      "main": [
        [
          {
            "node": "Code: Integrity Guard1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}