{
  "name": "Backup and delete workflows to Google Drive with n8n API and form trigger",
  "nodes": [
    {
      "id": "76cdbf3e-e25b-4998-bf56-6cd13140e166",
      "name": "On form submission",
      "type": "n8n-nodes-base.formTrigger",
      "position": [
        0,
        80
      ]
    },
    {
      "id": "10ef7ab2-86ca-4e62-b94f-77a6e18f920d",
      "name": "Send a text message",
      "type": "n8n-nodes-base.telegram",
      "position": [
        1936,
        80
      ]
    },
    {
      "id": "b038653e-afd6-4c59-b291-7caddf8cca7a",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -768,
        -560
      ],
      "parameters": {
        "width": 624,
        "height": 1360,
        "content": "## 🔍 Description:\nEffortlessly delete unused or inactive workflows from your n8n instance while automatically backing them up as .json files into your Google Drive. Keep your instance clean, fast, and"
      }
    },
    {
      "id": "9da23a3f-d899-4eab-a12e-17ff8fa3c816",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -112,
        -560
      ],
      "parameters": {
        "width": 352,
        "height": 1360,
        "content": "## 📝 1. Form Node: \"Get Workflow URL\"\n\n* Instruction: Ask the user to paste the full workflow URL they want to delete. This URL will be passed to the next node for processing.\n\n* Example input: https:"
      }
    },
    {
      "id": "2ed52c3b-1898-4c06-adc2-d81708ae3679",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        272,
        -560
      ],
      "parameters": {
        "width": 352,
        "height": 1360,
        "content": "## 🔍 2. n8n Node: \"Get Workflow\"\n\n* Instruction: Use the official n8n node with API Key authentication to fetch full workflow details using the ID extracted from the URL.\n\n* Requirement: API Key Auth "
      }
    },
    {
      "id": "775f86f7-2daf-45ae-9ab6-0bf6a1ab56ef",
      "name": "Sticky Note4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1040,
        -560
      ],
      "parameters": {
        "width": 352,
        "height": 1360,
        "content": "## 📁 Google Drive Node: \"Upload Workflow Backup\"\n\nInstruction: Upload the binary file containing the workflow JSON backup to a specified folder in Google Drive. Configure folder ID and file name dynam"
      }
    },
    {
      "id": "fc18f562-569a-48fa-9faa-14b0dc6349db",
      "name": "Sticky Note5",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1424,
        -560
      ],
      "parameters": {
        "width": 352,
        "height": 1360,
        "content": "## 🗑️ 5. n8n Node: \"Delete Workflow\"\n\n* Instruction: Delete the workflow from your instance using its ID. Use the same API Key Auth credentials as in step 2.\n\n* [See the n8n node documentation.](https"
      }
    },
    {
      "id": "e19ae6be-61e2-414b-af70-2069dc3925a5",
      "name": "Sticky Note6",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1808,
        -560
      ],
      "parameters": {
        "width": 352,
        "height": 1360,
        "content": "## 📬 6. Telegram Node: \"Send Notification\"\n\n* Instruction: Send a Telegram message confirming the workflow was backed up and deleted successfully. Include the workflow name, ID, date, and a link to th"
      }
    },
    {
      "id": "cbef6523-6186-4a83-b70c-5b3c4a619615",
      "name": "Upload Workflow",
      "type": "n8n-nodes-base.googleDrive",
      "position": [
        1168,
        80
      ]
    },
    {
      "id": "e31a574e-a952-43f0-89cc-e385e46f6075",
      "name": "Sticky Note7",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        656,
        -560
      ],
      "parameters": {
        "width": 352,
        "height": 1360,
        "content": "## 📦 5. Code Node: \"Generate .json File\"\n\nInstruction: This node converts the workflow JSON into a properly formatted binary file (.json) to upload to Google Drive. It uses the workflow name for the f"
      }
    },
    {
      "id": "1b9ef445-9385-4b2c-a0c0-391bb5799887",
      "name": "Delete a Workflow",
      "type": "n8n-nodes-base.n8n",
      "position": [
        1568,
        80
      ]
    },
    {
      "id": "5d540bb7-99f0-4202-8eb7-d37200468163",
      "name": "Get a Workflow",
      "type": "n8n-nodes-base.n8n",
      "position": [
        400,
        80
      ]
    },
    {
      "id": "2da4e84a-20f3-4d3c-905e-eb884218e3b1",
      "name": "JSON to File",
      "type": "n8n-nodes-base.code",
      "position": [
        784,
        80
      ]
    }
  ],
  "connections": {
    "JSON to File": {
      "main": [
        [
          {
            "node": "Upload Workflow",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get a Workflow": {
      "main": [
        [
          {
            "node": "JSON to File",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Upload Workflow": {
      "main": [
        [
          {
            "node": "Delete a Workflow",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Delete a Workflow": {
      "main": [
        [
          {
            "node": "Send a text message",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "On form submission": {
      "main": [
        [
          {
            "node": "Get a Workflow",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}