{
  "name": "Automated server log cleanup via email alerts with SSH - Nginx, Docker, System",
  "nodes": [
    {
      "id": "8c1aac94-9e6a-4b14-a177-3a00644ea232",
      "name": "Check Disk Alert Emails\t",
      "type": "n8n-nodes-base.emailReadImap",
      "position": [
        0,
        0
      ]
    },
    {
      "id": "025c2c15-f693-4b53-8433-4d641526d11a",
      "name": "Extract Server IP from Email\t",
      "type": "n8n-nodes-base.code",
      "position": [
        220,
        0
      ]
    },
    {
      "id": "723c7067-fe88-4b8b-b1ff-38c9eb662641",
      "name": "Prepare SSH Variables\t",
      "type": "n8n-nodes-base.set",
      "position": [
        440,
        0
      ]
    },
    {
      "id": "7ef2b2b6-5880-4fc1-93fa-b76c3c75effa",
      "name": "Run Log Cleanup Commands via SSH\t",
      "type": "n8n-nodes-base.ssh",
      "position": [
        660,
        0
      ]
    },
    {
      "id": "0935c618-237c-4630-9087-80b757a78a9c",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -20,
        -140
      ],
      "parameters": {
        "width": 160,
        "height": 300,
        "content": "Triggers when an alert email about disk usage is received.\n"
      }
    },
    {
      "id": "d4efc5ab-9003-4d42-a49c-6ac4c376c9cb",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        180,
        -140
      ],
      "parameters": {
        "width": 170,
        "height": 300,
        "content": "Parses the email body to extract the target server's IP address.\n"
      }
    },
    {
      "id": "adf3341f-4319-40cc-bf97-8917a2bb5c44",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        400,
        -140
      ],
      "parameters": {
        "width": 170,
        "height": 300,
        "content": "Manually set or map credentials, paths, or other config values.\n"
      }
    },
    {
      "id": "4c933879-5907-4616-8902-42cfb2d73edc",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        620,
        -140
      ],
      "parameters": {
        "width": 170,
        "height": 300,
        "content": "Executes cleanup commands (Nginx, PM2, Docker, system logs).\n\n"
      }
    }
  ],
  "connections": {
    "Prepare SSH Variables\t": {
      "main": [
        [
          {
            "node": "Run Log Cleanup Commands via SSH\t",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Check Disk Alert Emails\t": {
      "main": [
        [
          {
            "node": "Extract Server IP from Email\t",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Extract Server IP from Email\t": {
      "main": [
        [
          {
            "node": "Prepare SSH Variables\t",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}