{
  "name": "Strip secrets from JSON file via AI Formatter + Merge node&send mail report",
  "nodes": [
    {
      "id": "d0303f81-dfca-456c-8990-71d14d2da439",
      "name": "Upload Workflow Json",
      "type": "n8n-nodes-base.formTrigger",
      "position": [
        608,
        384
      ]
    },
    {
      "id": "a33e42f3-cc09-4752-9746-b144cc7d3925",
      "name": "Extract JSON content",
      "type": "n8n-nodes-base.extractFromFile",
      "position": [
        832,
        464
      ]
    },
    {
      "id": "c40fbf1e-6796-4e9d-a4ce-7c167acf8e72",
      "name": "Prepare Original Workflow Structure",
      "type": "n8n-nodes-base.set",
      "position": [
        992,
        464
      ]
    },
    {
      "id": "b99dd6eb-3bd2-4952-8afb-63fe48ee2546",
      "name": "Format Original Workflow(JS)",
      "type": "n8n-nodes-base.code",
      "position": [
        1168,
        464
      ]
    },
    {
      "id": "c6c2b911-c74e-450a-856f-aeb5f4236844",
      "name": "AI Sanitize Workflow JSON",
      "type": "@n8n/n8n-nodes-langchain.openAi",
      "position": [
        1376,
        336
      ]
    },
    {
      "id": "ddbf4a83-92b9-41a1-9631-a674ff968a03",
      "name": "Format Sanitized Workflow (JS)",
      "type": "n8n-nodes-base.code",
      "position": [
        1712,
        320
      ]
    },
    {
      "id": "b53e5930-b0b2-44e9-b3b6-bde233add0c8",
      "name": "Combine Original  & Sanitized JSON",
      "type": "n8n-nodes-base.merge",
      "position": [
        1952,
        448
      ]
    },
    {
      "id": "e798efb9-1b3a-49bd-8910-dd0dc7070938",
      "name": "Generate Workflow Change log (AI)",
      "type": "@n8n/n8n-nodes-langchain.openAi",
      "position": [
        2176,
        384
      ]
    },
    {
      "id": "d62264be-8ad5-4072-b075-70b8cf525328",
      "name": "Assemble Email Content & Attachment",
      "type": "n8n-nodes-base.merge",
      "position": [
        2592,
        496
      ]
    },
    {
      "id": "98e5bb45-4442-4312-8855-bbebbc68e76b",
      "name": "Create Sanitized JSON File",
      "type": "n8n-nodes-base.convertToFile",
      "position": [
        2240,
        688
      ]
    },
    {
      "id": "cbf01f93-b29c-4564-8549-1cb9f552df5f",
      "name": "Email Sanitized Workflow + Report",
      "type": "n8n-nodes-base.gmail",
      "position": [
        2800,
        496
      ]
    },
    {
      "id": "c2b1ee94-da1f-4174-946c-d8ade6539903",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        528,
        224
      ],
      "parameters": {
        "width": 256,
        "height": 432,
        "content": "## Input Collection\n\nForm node collects MailId and uploaded JSON."
      }
    },
    {
      "id": "594882b1-dd4a-4b5b-a0c5-97cc5a25d360",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        800,
        224
      ],
      "parameters": {
        "width": 528,
        "height": 432,
        "content": "## Extract + Prepare Original Workflow\n\nExtracts uploaded file into structured JSON.\nWraps parsed JSON into originalWorkflowJson.\nStringifies and prepares payload for sanitization."
      }
    },
    {
      "id": "ba023e6d-c16f-4e75-8a4f-a4ed43ebc4ff",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1344,
        240
      ],
      "parameters": {
        "width": 544,
        "height": 416,
        "content": "## AI Sanitization Engine\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nRemoves secrets & metadata while preserving structure. Outputs valid JSON.\nParses sanitized JSON into sanitizedWorkflowJson"
      }
    },
    {
      "id": "a776b7ec-b5e5-4151-9620-4c8b653ff743",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1904,
        224
      ],
      "parameters": {
        "width": 592,
        "height": 416,
        "content": "## Comparison Engine (Original vs Sanitized)\n\nMerge node pairs both versions for comparison.\nProduces Markdown/HTML-ready diff report.\n"
      }
    },
    {
      "id": "d70b3d7f-7fed-47ca-a306-b2be3a73d844",
      "name": "Sticky Note4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1904,
        656
      ],
      "parameters": {
        "width": 592,
        "height": 256,
        "content": "## Create Sanitized JSON File\n\nConverts sanitized JSON string into \nsanitized_workflow.json."
      }
    },
    {
      "id": "98dce538-0752-4d24-8448-eb5a6698a45c",
      "name": "Sticky Note5",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        2512,
        224
      ],
      "parameters": {
        "width": 480,
        "height": 688,
        "content": "## Assemble Email & Send\n\nMerges report and file.\nGmail node sends HTML email and attachment."
      }
    },
    {
      "id": "1d9f976d-4a6c-4d6d-93c4-af112343cfe7",
      "name": "Sticky Note6",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1120,
        80
      ],
      "parameters": {
        "width": 1056,
        "height": 96,
        "content": "\n\n ##  Generate Sanitized workflow JSON  file using AI Formatter + Merge nodes and email report"
      }
    },
    {
      "id": "8cd41002-88ec-485f-baf9-aba81808fb3b",
      "name": "Sticky Note7",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        0,
        0
      ],
      "parameters": {
        "width": 512,
        "height": 944,
        "content": "# Try Out\n\n## Overview\n\nThis workflow sanitizes any uploaded n8n workflow JSON by removing credentials, webhook IDs, tokens, and sensitive metadata. It generates a clean, secure version, produces a de"
      }
    }
  ],
  "connections": {
    "Extract JSON content": {
      "main": [
        [
          {
            "node": "Prepare Original Workflow Structure",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Upload Workflow Json": {
      "main": [
        [
          {
            "node": "Extract JSON content",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "AI Sanitize Workflow JSON": {
      "main": [
        [
          {
            "node": "Format Sanitized Workflow (JS)",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Create Sanitized JSON File": {
      "main": [
        [
          {
            "node": "Assemble Email Content & Attachment",
            "type": "main",
            "index": 1
          }
        ]
      ]
    },
    "Format Original Workflow(JS)": {
      "main": [
        [
          {
            "node": "AI Sanitize Workflow JSON",
            "type": "main",
            "index": 0
          },
          {
            "node": "Combine Original  & Sanitized JSON",
            "type": "main",
            "index": 1
          }
        ]
      ]
    },
    "Format Sanitized Workflow (JS)": {
      "main": [
        [
          {
            "node": "Combine Original  & Sanitized JSON",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Generate Workflow Change log (AI)": {
      "main": [
        [
          {
            "node": "Assemble Email Content & Attachment",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Combine Original  & Sanitized JSON": {
      "main": [
        [
          {
            "node": "Generate Workflow Change log (AI)",
            "type": "main",
            "index": 0
          },
          {
            "node": "Create Sanitized JSON File",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Assemble Email Content & Attachment": {
      "main": [
        [
          {
            "node": "Email Sanitized Workflow + Report",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Prepare Original Workflow Structure": {
      "main": [
        [
          {
            "node": "Format Original Workflow(JS)",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}