8
n8n 한국어amn8n.com

n8n API와 표单 트리거를 사용하여 Google Drive에 작업 흐름을 백업하고 삭제

중급

이것은DevOps분야의자동화 워크플로우로, 13개의 노드를 포함합니다.주로 N8n, Code, Telegram, FormTrigger, GoogleDrive 등의 노드를 사용하며. n8n API와 표单 트리거를 사용하여 Google Drive에 작업 흐름을 백업하고 삭제

사전 요구사항
  • Telegram Bot Token
  • Google Drive API 인증 정보

카테고리

워크플로우 미리보기
노드 연결 관계를 시각적으로 표시하며, 확대/축소 및 이동을 지원합니다
워크플로우 내보내기
다음 JSON 구성을 복사하여 n8n에 가져오면 이 워크플로우를 사용할 수 있습니다
{
  "meta": {
    "instanceId": "0a82a9d5784b67ad963ceff89283b2e40cb771be10fe58ba2682f3598a37c6e1",
    "templateCredsSetupCompleted": true
  },
  "nodes": [
    {
      "id": "76cdbf3e-e25b-4998-bf56-6cd13140e166",
      "name": "양식 제출 시",
      "type": "n8n-nodes-base.formTrigger",
      "position": [
        0,
        80
      ],
      "webhookId": "350d8518-e91c-4fd0-af83-b6649e7965bd",
      "parameters": {
        "options": {
          "buttonLabel": "Backup & Delete",
          "appendAttribution": false
        },
        "formTitle": "🧾 Backup & Delete Workflow",
        "formFields": {
          "values": [
            {
              "fieldLabel": "Paste the full workflow URL below.",
              "placeholder": " https://n8n-miinstancia.com/workflow/abc123",
              "requiredField": true
            }
          ]
        },
        "formDescription": "This tool backs up the full JSON file of a workflow to a Google Drive folder before safely deleting it from your n8n instance."
      },
      "typeVersion": 2.2
    },
    {
      "id": "10ef7ab2-86ca-4e62-b94f-77a6e18f920d",
      "name": "문자 메시지 보내기",
      "type": "n8n-nodes-base.telegram",
      "position": [
        1936,
        80
      ],
      "webhookId": "192a1c25-6efc-465a-b77d-c250fee9a57b",
      "parameters": {
        "text": "=✅ Workflow Backup Successful\n\nThe workflow titled: {{ $json.name }} \nwith ID: {{ $json.id }} \nhas been successfully backed up to your selected Google Drive Folder.\n\n📄 You can view the backup at the following link:\n(USE YOUR GOOGLE DRIVE FOLDER LINK HERE)\n\n📅 Backup Date: {{ $now }}\n",
        "chatId": "8019473661",
        "additionalFields": {}
      },
      "credentials": {
        "telegramApi": {
          "id": "BjU1NgO9AIM86N5W",
          "name": "EMPTY"
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "b038653e-afd6-4c59-b291-7caddf8cca7a",
      "name": "스티커 메모",
      "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 organized — no more clutter slowing you down. This workflow is ideal for users managing large self-hosted n8n setups, or anyone who wants to maintain optimal performance while preserving full workflow backups.\n\n## ✅ What it does:\n* Accepts a full n8n Workflow URL via a form\n* Retrieves workflow info automatically\n* Converts the workflow’s full JSON definition into a file\n* Uploads that file to Google Drive\n* Deletes the workflow safely using the official n8n API\n* Sends a Telegram notification confirming backup and deletion\n\n## ⚙️ How it works:\n📝 Form – Collects the full workflow URL from the user\n🔍 n8n Node (Get Workflow) – Uses the URL to fetch workflow details\n📦 Code Node (\"JSON to File\") – Converts the workflow JSON into a properly formatted .json file with UTF-8 encoding, ready to be uploaded to Google Drive.\n☁️ Google Drive Upload – Uploads the .json backup file to your selected Drive folder\n🗑️ n8n Node (Delete Workflow) – Deletes the workflow from your instance using its ID\n📬 Telegram Notification – Notifies you that the workflow was backed up and deleted, showing title, ID, and date\n\n## 📋 Requirements:\n* Google Drive connected to your n8n account\n* Telegram Bot connected to n8n\n* An n8n instance with API access (self-hosted or Cloud)\n* Your n8n API Key (Create one in the settings)\n\n## 🛠️ How to Set Up:\n✅ Add your Google Drive credentials\n✅ Add your Telegram Bot credentials\n\n🧾 In the “JSON to File” Code node, no additional setup is required — it automatically converts the workflow JSON into a downloadable .json file using the correct encoding and filename format.\n\n☁️ In the Google Drive node:\nBinary Property: data\nFolder ID: your target folder in Google Drive\n\n🔑 Create a new credential for the n8n node using:\nAPI Key: your personal n8n API key\nBase URL: your full n8n instance API path (e.g. https://your-n8n-instance.com/api/v1)\n⚙️ Use this credential in both the Get Workflow and Delete Workflow n8n nodes\n\n📬 In the Telegram node, use this message template:\n🗑️ Workflow \"{{ $json.name }}\" (ID: {{ $json.id }}) was backed up to Google Drive and deleted from n8n.\n📅 {{ $now }}\n\n🔒 Important: This workflow backs up the entire workflow data to Google Drive. Please be careful with the permissions of your Google Drive folder and avoid sharing it publicly, as the backups may contain sensitive information. Ensuring proper security and access control is essential to protect your data.\n\n🚀 Activate the workflow and you're ready to safely back up and remove workflows from your n8n instance\n\n"
      },
      "typeVersion": 1
    },
    {
      "id": "9da23a3f-d899-4eab-a12e-17ff8fa3c816",
      "name": "스티커 메모1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -112,
        -560
      ],
      "parameters": {
        "color": 7,
        "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://your-n8n-instance/workflow/abcd1234\n\n* [See the Form Submission node documentation.](https://docs.n8n.io/integrations/builtin/core-nodes/n8n-nodes-base.formtrigger/?utm_source=n8n_app&utm_medium=node_settings_modal-credential_link&utm_campaign=n8n-nodes-base.formTrigger)\n\n"
      },
      "typeVersion": 1
    },
    {
      "id": "2ed52c3b-1898-4c06-adc2-d81708ae3679",
      "name": "스티커 메모2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        272,
        -560
      ],
      "parameters": {
        "color": 7,
        "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 credentials configured with your API Key and Base URL (e.g., https://your-n8n-instance/api/v1).\n\n* [See the n8n node documentation.](https://docs.n8n.io/integrations/builtin/core-nodes/n8n-nodes-base.n8n/?utm_source=n8n_app&utm_medium=node_settings_modal-credential_link&utm_campaign=n8n-nodes-base.n8n)"
      },
      "typeVersion": 1
    },
    {
      "id": "775f86f7-2daf-45ae-9ab6-0bf6a1ab56ef",
      "name": "스티커 메모4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1040,
        -560
      ],
      "parameters": {
        "color": 7,
        "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 dynamically if needed.\n\n* [See the Google Drive node documentation.](https://docs.n8n.io/integrations/builtin/app-nodes/n8n-nodes-base.googledrive/file-operations/#upload-a-file)"
      },
      "typeVersion": 1
    },
    {
      "id": "fc18f562-569a-48fa-9faa-14b0dc6349db",
      "name": "스티커 메모5",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1424,
        -560
      ],
      "parameters": {
        "color": 7,
        "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://docs.n8n.io/integrations/builtin/core-nodes/n8n-nodes-base.n8n/?utm_source=n8n_app&utm_medium=node_settings_modal-credential_link&utm_campaign=n8n-nodes-base.n8n)"
      },
      "typeVersion": 1
    },
    {
      "id": "e19ae6be-61e2-414b-af70-2069dc3925a5",
      "name": "스티커 메모6",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1808,
        -560
      ],
      "parameters": {
        "color": 7,
        "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 the backup in Google Sheets.\n\n* [See the Telegram node documentation.](https://docs.n8n.io/integrations/builtin/app-nodes/n8n-nodes-base.telegram/?utm_source=n8n_app&utm_medium=node_settings_modal-credential_link&utm_campaign=n8n-nodes-base.telegram)"
      },
      "typeVersion": 1
    },
    {
      "id": "cbef6523-6186-4a83-b70c-5b3c4a619615",
      "name": "워크플로우 업로드",
      "type": "n8n-nodes-base.googleDrive",
      "position": [
        1168,
        80
      ],
      "parameters": {
        "name": "={{ $('Get a Workflow').item.json.name }}",
        "driveId": {
          "__rl": true,
          "mode": "list",
          "value": "My Drive",
          "cachedResultUrl": "https://drive.google.com/drive/my-drive",
          "cachedResultName": "My Drive"
        },
        "options": {},
        "folderId": {
          "__rl": true,
          "mode": "list",
          "value": "1Wv8HI8jUu-XbpC4mRJH78WNMAD_xM8f8",
          "cachedResultUrl": "https://drive.google.com/drive/folders/1Wv8HI8jUu-XbpC4mRJH78WNMAD_xM8f8",
          "cachedResultName": "N8N - Deleted Workflows Backup"
        },
        "authentication": "serviceAccount"
      },
      "credentials": {
        "googleApi": {
          "id": "Ru2YSsIPYQIOlnvD",
          "name": "EMPTY"
        }
      },
      "typeVersion": 3
    },
    {
      "id": "e31a574e-a952-43f0-89cc-e385e46f6075",
      "name": "스티커 메모7",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        656,
        -560
      ],
      "parameters": {
        "color": 7,
        "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 filename and sets the correct MIME type.\n\n* [See the Code node documentation.](https://docs.n8n.io/integrations/builtin/core-nodes/n8n-nodes-base.code/?utm_source=n8n_app&utm_medium=node_settings_modal-credential_link&utm_campaign=n8n-nodes-base.code)"
      },
      "typeVersion": 1
    },
    {
      "id": "1b9ef445-9385-4b2c-a0c0-391bb5799887",
      "name": "워크플로우 삭제",
      "type": "n8n-nodes-base.n8n",
      "position": [
        1568,
        80
      ],
      "parameters": {
        "operation": "delete",
        "workflowId": {
          "__rl": true,
          "mode": "id",
          "value": "={{ $('Get a Workflow').item.json.id }}"
        },
        "requestOptions": {}
      },
      "credentials": {
        "n8nApi": {
          "id": "VSxAuLMW3kDlXjYA",
          "name": "EMPTY"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "5d540bb7-99f0-4202-8eb7-d37200468163",
      "name": "워크플로우 가져오기",
      "type": "n8n-nodes-base.n8n",
      "position": [
        400,
        80
      ],
      "parameters": {
        "operation": "get",
        "workflowId": {
          "__rl": true,
          "mode": "url",
          "value": "={{ $json['Paste the full workflow URL below.'] }}"
        },
        "requestOptions": {}
      },
      "credentials": {
        "n8nApi": {
          "id": "VSxAuLMW3kDlXjYA",
          "name": "EMPTY"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "2da4e84a-20f3-4d3c-905e-eb884218e3b1",
      "name": "JSON to File",
      "type": "n8n-nodes-base.code",
      "position": [
        784,
        80
      ],
      "parameters": {
        "jsCode": "const fileName = `${$json.name.replace(/[^a-z0-9_-]/gi, \"_\") || \"workflow\"}.json`;\nconst jsonContent = JSON.stringify($json, null, 2);\n\nreturn [\n  {\n    binary: {\n      data: await this.helpers.prepareBinaryData(Buffer.from(jsonContent), fileName, 'application/json'),\n    },\n    json: {\n      fileName,\n    },\n  },\n];\n"
      },
      "typeVersion": 2
    }
  ],
  "pinData": {},
  "connections": {
    "2da4e84a-20f3-4d3c-905e-eb884218e3b1": {
      "main": [
        [
          {
            "node": "cbef6523-6186-4a83-b70c-5b3c4a619615",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "5d540bb7-99f0-4202-8eb7-d37200468163": {
      "main": [
        [
          {
            "node": "2da4e84a-20f3-4d3c-905e-eb884218e3b1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "cbef6523-6186-4a83-b70c-5b3c4a619615": {
      "main": [
        [
          {
            "node": "1b9ef445-9385-4b2c-a0c0-391bb5799887",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "1b9ef445-9385-4b2c-a0c0-391bb5799887": {
      "main": [
        [
          {
            "node": "10ef7ab2-86ca-4e62-b94f-77a6e18f920d",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "76cdbf3e-e25b-4998-bf56-6cd13140e166": {
      "main": [
        [
          {
            "node": "5d540bb7-99f0-4202-8eb7-d37200468163",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}
자주 묻는 질문

이 워크플로우를 어떻게 사용하나요?

위의 JSON 구성 코드를 복사하여 n8n 인스턴스에서 새 워크플로우를 생성하고 "JSON에서 가져오기"를 선택한 후, 구성을 붙여넣고 필요에 따라 인증 설정을 수정하세요.

이 워크플로우는 어떤 시나리오에 적합한가요?

중급 - 데브옵스

유료인가요?

이 워크플로우는 완전히 무료이며 직접 가져와 사용할 수 있습니다. 다만, 워크플로우에서 사용하는 타사 서비스(예: OpenAI API)는 사용자 직접 비용을 지불해야 할 수 있습니다.

워크플로우 정보
난이도
중급
노드 수13
카테고리1
노드 유형6
난이도 설명

일정 경험을 가진 사용자를 위한 6-15개 노드의 중간 복잡도 워크플로우

저자
Arlin Perez

Arlin Perez

@arlindeveloper

👋 Hi! I'm Arlin - a QA Engineer with 2 years of experience and a background in Dart & Flutter for mobile app development. ⚙️ I'm passionate about automation and love building efficient workflows using n8n. 📬 Reach out for any help with custom workflows

외부 링크
n8n.io에서 보기

이 워크플로우 공유

카테고리

카테고리: 34