{
  "name": "Automated AWS IAM key compromise response with Slack & Claude AI",
  "nodes": [
    {
      "id": "d5fa0dbd-41d5-402c-1234-1234567890",
      "name": "🔑 Fetch User Access Keys",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        -1480,
        380
      ]
    },
    {
      "id": "02461671-e2a2-4424-bfe8-fd74afc460c5",
      "name": "📊 Parse Access Key Response",
      "type": "n8n-nodes-base.code",
      "position": [
        -1260,
        380
      ]
    },
    {
      "id": "83640bea-3b16-4173-a486-bcbfe9cffddd",
      "name": "🚫 Deactivate Compromised Key",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        -180,
        900
      ]
    },
    {
      "id": "d671f4f7-759f-4bd6-abc1-abc1234567",
      "name": "📜 Audit Inline Policies",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        -160,
        1320
      ]
    },
    {
      "id": "6e6a912f-d043-44c0-abc1-abc123456789",
      "name": "🔍 Audit Attached Policies",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        -160,
        1680
      ]
    },
    {
      "id": "9fc7c861-a714-4b24-b19d-7d163c8e6a4d",
      "name": "🛡️ Generate Invalidation Policy",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        -200,
        480
      ]
    },
    {
      "id": "df0f64b3-95cf-48ef-b2a9-fe035d3e14ad",
      "name": "🔗 Apply Security Policy",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        340,
        60
      ]
    },
    {
      "id": "c4ec2ef4-7db8-4189-877b-abc1234567890",
      "name": "📤 Extract Inline Policy Names",
      "type": "n8n-nodes-base.splitOut",
      "position": [
        60,
        1320
      ]
    },
    {
      "id": "07ab67a9-146d-4576-8afa-a128cf62974f",
      "name": "🔄 Batch Process Inline Policies",
      "type": "n8n-nodes-base.splitInBatches",
      "position": [
        280,
        1320
      ]
    },
    {
      "id": "ff91b356-3771-463f-8593-82a0396c6514",
      "name": "🔄 Batch Process Attached Policies",
      "type": "n8n-nodes-base.splitInBatches",
      "position": [
        280,
        1700
      ]
    },
    {
      "id": "e1344921-481a-467b-9240-72b80e8f8ef9",
      "name": "📤 Extract Attached Policy List",
      "type": "n8n-nodes-base.splitOut",
      "position": [
        60,
        1680
      ]
    },
    {
      "id": "c884daa9-f96f-40c7-8fd0-3a00612bf431",
      "name": "🤖 AI Security Analysis",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        2400,
        980
      ]
    },
    {
      "id": "3eae5e83-a978-44eb-814e-ca97d32bcde0",
      "name": "🔀 Merge Response Data",
      "type": "n8n-nodes-base.merge",
      "position": [
        1940,
        920
      ]
    },
    {
      "id": "45f1ed8f-e1cd-45ff-a70b-96e4ffa5dbb4",
      "name": "📦 Aggregate Final Results",
      "type": "n8n-nodes-base.aggregate",
      "position": [
        2180,
        980
      ]
    },
    {
      "id": "9880aa6e-5475-467f-9281-64c42b3d7898",
      "name": "📋 Fetch Policy Metadata",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        500,
        1760
      ]
    },
    {
      "id": "fa82af49-be87-4579-a6fc-68b14e16b1aa",
      "name": "📄 Retrieve Policy Document",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        720,
        1760
      ]
    },
    {
      "id": "b1abafca-5443-4dc5-992e-7210296b27ca",
      "name": "📜 Retrieve Inline Policy Details",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        520,
        1360
      ]
    },
    {
      "id": "68ad6474-1a28-4c1d-9708-911e3475da7d",
      "name": "🔓 Parse Inline Policy JSON",
      "type": "n8n-nodes-base.code",
      "position": [
        720,
        1360
      ]
    },
    {
      "id": "d3cf69d7-15ba-4ec9-b463-6223ed3959eb",
      "name": "🔓 Parse Attached Policy JSON",
      "type": "n8n-nodes-base.code",
      "position": [
        900,
        1760
      ]
    },
    {
      "id": "9b3a898c-70be-4fb1-905d-e29a92e89772",
      "name": "⚡ Inline Policy Router",
      "type": "n8n-nodes-base.noOp",
      "position": [
        920,
        1360
      ]
    },
    {
      "id": "9402330b-7f94-4fbc-ba49-38e668e59abe",
      "name": "⚡ Attached Policy Router",
      "type": "n8n-nodes-base.noOp",
      "position": [
        1100,
        1760
      ]
    },
    {
      "id": "0d40fba1-568e-41db-8d58-170df5f0a927",
      "name": "💬 Notify Security Team",
      "type": "n8n-nodes-base.slack",
      "position": [
        2760,
        980
      ]
    },
    {
      "id": "89b5bf1b-081c-46e9-b634-eb4e95a6e2a9",
      "name": "🧠 Claude AI Engine",
      "type": "@n8n/n8n-nodes-langchain.lmChatAnthropic",
      "position": [
        2420,
        1200
      ]
    },
    {
      "id": "bec15d6b-2869-4784-b55d-c1cb8a1644d9",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -420,
        1600
      ],
      "parameters": {
        "width": 1840,
        "height": 400,
        "content": "## 🔄 Process Each Attached Policy"
      }
    },
    {
      "id": "06904eef-ed07-4b84-a4b9-c5f9defb384d",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -420,
        1180
      ],
      "parameters": {
        "width": 1840,
        "height": 400,
        "content": "## 🔄 Process Each Inline Policy"
      }
    },
    {
      "id": "ca8a044a-211a-4548-86e6-f2ae758b97f1",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -420,
        760
      ],
      "parameters": {
        "width": 1840,
        "height": 400,
        "content": "## 🚫 Disable Compromised Key"
      }
    },
    {
      "id": "22145ce8-1fcb-4e7d-977a-5e3758a4b635",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -420,
        340
      ],
      "parameters": {
        "width": 1840,
        "height": 400,
        "content": "## 🛠 Create Security Policy [Invalidating-Temporary-Security-Credentials]"
      }
    },
    {
      "id": "f4100d07-40db-41da-a60c-3770fc8dbba3",
      "name": "Sticky Note4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -420,
        -80
      ],
      "parameters": {
        "width": 1840,
        "height": 400,
        "content": "## 🔗 Attach Security Policy [Invalidating-Temporary-Security-Credentials]]"
      }
    },
    {
      "id": "b0bac576-f2ab-4d58-b1f6-1fb70a620649",
      "name": "Sticky Note5",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1700,
        700
      ],
      "parameters": {
        "width": 1320,
        "height": 740,
        "content": "## 🤖 Generate Security Report"
      }
    },
    {
      "id": "489444dd-c8ab-444e-ac11-aef48061650b",
      "name": "Sticky Note6",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -2260,
        780
      ],
      "parameters": {
        "width": 720,
        "height": 400,
        "content": "# ✏️ Manual Entry: UserName & AccessKeyId"
      }
    },
    {
      "id": "3f524117-9a16-4e3c-9c9b-b365af4d51c7",
      "name": "Sticky Note7",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -2080,
        240
      ],
      "parameters": {
        "width": 1360,
        "height": 400,
        "content": "## 🔍 Retrieve IAM Key Info"
      }
    },
    {
      "id": "e3bf53dd-84dd-48aa-af4a-0352e30ea4ba",
      "name": "🔍 AWS IAM Service",
      "type": "n8n-nodes-base.awsIam",
      "position": [
        -1700,
        380
      ]
    },
    {
      "id": "4be7829d-c736-4125-aaa6-f75118e98c17",
      "name": "🔔 Request Human Approval",
      "type": "n8n-nodes-base.slack",
      "position": [
        -1320,
        940
      ]
    },
    {
      "id": "1db4a332-df13-494b-87e6-1226f8d89b3f",
      "name": "Sticky Note8",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1480,
        780
      ],
      "parameters": {
        "width": 420,
        "height": 400,
        "content": "# ✏️ Human in the loop\n## Wait for approval or human input before continuing"
      }
    },
    {
      "id": "296666c1-c6dd-451e-b9d6-a799634ac9ae",
      "name": "✅ Approved Compromise Data",
      "type": "n8n-nodes-base.set",
      "position": [
        -880,
        940
      ]
    },
    {
      "id": "95eb48d4-ef3f-410b-b2d8-815e9083e5e4",
      "name": "Sticky Note9",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1020,
        780
      ],
      "parameters": {
        "width": 420,
        "height": 400,
        "content": "# ✏️ Selected UserName & AccessKeyId"
      }
    },
    {
      "id": "2b792970-ebae-4e60-86b3-1780c45948e5",
      "name": "🔧 Process Form Submission",
      "type": "n8n-nodes-base.set",
      "position": [
        -1820,
        940
      ]
    },
    {
      "id": "987b3736-c325-4fe5-8d70-f14b9f5955d8",
      "name": "🔍 Manual Key Lookup Trigger",
      "type": "n8n-nodes-base.manualTrigger",
      "position": [
        -1920,
        380
      ]
    },
    {
      "id": "97bb3007-1143-4a13-9adf-811e1268db4f",
      "name": "📝 Secure Form: Key Compromise Input",
      "type": "n8n-nodes-base.formTrigger",
      "position": [
        -2100,
        940
      ]
    },
    {
      "id": "33cd00aa-6027-4b3b-b373-c802ac6bf17d",
      "name": "⚡ No Operation, do nothing",
      "type": "n8n-nodes-base.noOp",
      "position": [
        -1040,
        380
      ]
    }
  ],
  "connections": {
    "🔍 AWS IAM Service": {
      "main": [
        [
          {
            "node": "🔑 Fetch User Access Keys",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "🧠 Claude AI Engine": {
      "ai_languageModel": [
        [
          {
            "node": "🤖 AI Security Analysis",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "⚡ Inline Policy Router": {
      "main": [
        [
          {
            "node": "🔄 Batch Process Inline Policies",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "🔀 Merge Response Data": {
      "main": [
        [
          {
            "node": "📦 Aggregate Final Results",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "🤖 AI Security Analysis": {
      "main": [
        [
          {
            "node": "💬 Notify Security Team",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "⚡ Attached Policy Router": {
      "main": [
        [
          {
            "node": "🔄 Batch Process Attached Policies",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "📋 Fetch Policy Metadata": {
      "main": [
        [
          {
            "node": "📄 Retrieve Policy Document",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "📜 Audit Inline Policies": {
      "main": [
        [
          {
            "node": "📤 Extract Inline Policy Names",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "🔗 Apply Security Policy": {
      "main": [
        [
          {
            "node": "🔀 Merge Response Data",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "🔑 Fetch User Access Keys": {
      "main": [
        [
          {
            "node": "📊 Parse Access Key Response",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "🔔 Request Human Approval": {
      "main": [
        [
          {
            "node": "✅ Approved Compromise Data",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "✅ Approved Compromise Data": {
      "main": [
        [
          {
            "node": "🛡️ Generate Invalidation Policy",
            "type": "main",
            "index": 0
          },
          {
            "node": "🚫 Deactivate Compromised Key",
            "type": "main",
            "index": 0
          },
          {
            "node": "🔀 Merge Response Data",
            "type": "main",
            "index": 3
          },
          {
            "node": "📜 Audit Inline Policies",
            "type": "main",
            "index": 0
          },
          {
            "node": "🔍 Audit Attached Policies",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "📦 Aggregate Final Results": {
      "main": [
        [
          {
            "node": "🤖 AI Security Analysis",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "🔍 Audit Attached Policies": {
      "main": [
        [
          {
            "node": "📤 Extract Attached Policy List",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "🔧 Process Form Submission": {
      "main": [
        [
          {
            "node": "🔔 Request Human Approval",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "📄 Retrieve Policy Document": {
      "main": [
        [
          {
            "node": "🔓 Parse Attached Policy JSON",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "🔓 Parse Inline Policy JSON": {
      "main": [
        [
          {
            "node": "⚡ Inline Policy Router",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "📊 Parse Access Key Response": {
      "main": [
        [
          {
            "node": "⚡ No Operation, do nothing",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "🔍 Manual Key Lookup Trigger": {
      "main": [
        [
          {
            "node": "🔍 AWS IAM Service",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "🔓 Parse Attached Policy JSON": {
      "main": [
        [
          {
            "node": "⚡ Attached Policy Router",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "🚫 Deactivate Compromised Key": {
      "main": [
        [
          {
            "node": "🔀 Merge Response Data",
            "type": "main",
            "index": 2
          }
        ]
      ]
    },
    "📤 Extract Inline Policy Names": {
      "main": [
        [
          {
            "node": "🔄 Batch Process Inline Policies",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "📤 Extract Attached Policy List": {
      "main": [
        [
          {
            "node": "🔄 Batch Process Attached Policies",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "🔄 Batch Process Inline Policies": {
      "main": [
        [
          {
            "node": "🔀 Merge Response Data",
            "type": "main",
            "index": 4
          }
        ],
        [
          {
            "node": "📜 Retrieve Inline Policy Details",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "📜 Retrieve Inline Policy Details": {
      "main": [
        [
          {
            "node": "🔓 Parse Inline Policy JSON",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "🔄 Batch Process Attached Policies": {
      "main": [
        [
          {
            "node": "🔀 Merge Response Data",
            "type": "main",
            "index": 5
          }
        ],
        [
          {
            "node": "📋 Fetch Policy Metadata",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "🛡️ Generate Invalidation Policy": {
      "main": [
        [
          {
            "node": "🔗 Apply Security Policy",
            "type": "main",
            "index": 0
          },
          {
            "node": "🔀 Merge Response Data",
            "type": "main",
            "index": 1
          }
        ]
      ]
    },
    "📝 Secure Form: Key Compromise Input": {
      "main": [
        [
          {
            "node": "🔧 Process Form Submission",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}