{
  "name": "Automate PostgreSQL & MySQL database management on Linux servers",
  "nodes": [
    {
      "id": "f024ece1-0378-4dbb-a1b7-06bf598a04de",
      "name": "Start",
      "type": "n8n-nodes-base.manualTrigger",
      "position": [
        -760,
        480
      ]
    },
    {
      "id": "4bd36d6f-a312-4ff2-8b6f-86a6769f2588",
      "name": "Set Parameters",
      "type": "n8n-nodes-base.set",
      "position": [
        -540,
        480
      ]
    },
    {
      "id": "8d23250e-4538-4b64-8fa4-a5cdabadc6ac",
      "name": "Database Type Check",
      "type": "n8n-nodes-base.if",
      "position": [
        -320,
        480
      ]
    },
    {
      "id": "f49751e8-cc9c-45bc-b677-c11919054be2",
      "name": "PostgreSQL Action Check",
      "type": "n8n-nodes-base.if",
      "position": [
        -100,
        180
      ]
    },
    {
      "id": "bad68834-e9b1-406e-8a25-4a82d845b9eb",
      "name": "MySQL Action Check",
      "type": "n8n-nodes-base.if",
      "position": [
        -100,
        780
      ]
    },
    {
      "id": "b4d41f1b-8d44-4725-87d6-72dd5d48d81a",
      "name": "Install PostgreSQL",
      "type": "n8n-nodes-base.ssh",
      "position": [
        340,
        -20
      ]
    },
    {
      "id": "43acaf1f-beec-4d5d-9292-139626d04b05",
      "name": "Install MySQL",
      "type": "n8n-nodes-base.ssh",
      "position": [
        340,
        580
      ]
    },
    {
      "id": "5315c681-2677-441b-8010-f7a742849b83",
      "name": "PostgreSQL Create Check",
      "type": "n8n-nodes-base.if",
      "position": [
        120,
        280
      ]
    },
    {
      "id": "1fe28fb8-1dd9-488d-a7cf-bc47658d745e",
      "name": "MySQL Create Check",
      "type": "n8n-nodes-base.if",
      "position": [
        120,
        880
      ]
    },
    {
      "id": "b65b1c99-ec5b-486c-8513-0b20ad54186e",
      "name": "Create PostgreSQL DB",
      "type": "n8n-nodes-base.ssh",
      "position": [
        340,
        180
      ]
    },
    {
      "id": "aada1dd3-d236-4fe9-8ced-02d1ea20ef46",
      "name": "Create MySQL DB",
      "type": "n8n-nodes-base.ssh",
      "position": [
        340,
        780
      ]
    },
    {
      "id": "a77b9367-1eec-40c9-b636-9bd7535ecf7a",
      "name": "Delete PostgreSQL DB",
      "type": "n8n-nodes-base.ssh",
      "position": [
        340,
        380
      ]
    },
    {
      "id": "37b5c6e2-94f6-440f-b32d-6454e5178bfc",
      "name": "Delete MySQL DB",
      "type": "n8n-nodes-base.ssh",
      "position": [
        340,
        980
      ]
    },
    {
      "id": "e23dbe7f-2bb3-4ba2-848a-e85688a05124",
      "name": "Format Output",
      "type": "n8n-nodes-base.set",
      "position": [
        560,
        480
      ]
    },
    {
      "id": "30cb203f-a298-41c9-b897-fc5c33178aa4",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1120,
        -20
      ],
      "parameters": {
        "width": 620,
        "height": 360,
        "content": "## Core Elements\n- **Set Parameters** - Defines server details, database type, action, and credentials\n- **Type Check** - Confirms the selected database type\n- **PostgreSQL Action Check** - Identifies"
      }
    }
  ],
  "connections": {
    "Start": {
      "main": [
        [
          {
            "node": "Set Parameters",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Install MySQL": {
      "main": [
        [
          {
            "node": "Format Output",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Set Parameters": {
      "main": [
        [
          {
            "node": "Database Type Check",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Create MySQL DB": {
      "main": [
        [
          {
            "node": "Format Output",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Delete MySQL DB": {
      "main": [
        [
          {
            "node": "Format Output",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Install PostgreSQL": {
      "main": [
        [
          {
            "node": "Format Output",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "MySQL Action Check": {
      "main": [
        [
          {
            "node": "Install MySQL",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "MySQL Create Check",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "MySQL Create Check": {
      "main": [
        [
          {
            "node": "Create MySQL DB",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Delete MySQL DB",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Database Type Check": {
      "main": [
        [
          {
            "node": "PostgreSQL Action Check",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "MySQL Action Check",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Create PostgreSQL DB": {
      "main": [
        [
          {
            "node": "Format Output",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Delete PostgreSQL DB": {
      "main": [
        [
          {
            "node": "Format Output",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "PostgreSQL Action Check": {
      "main": [
        [
          {
            "node": "Install PostgreSQL",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "PostgreSQL Create Check",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "PostgreSQL Create Check": {
      "main": [
        [
          {
            "node": "Create PostgreSQL DB",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Delete PostgreSQL DB",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}