Google Drive에 자동화된 워크플로우 백업 및 스마트 정리
고급
이것은DevOps, Multimodal AI분야의자동화 워크플로우로, 17개의 노드를 포함합니다.주로 N8n, Set, Code, GoogleDrive, ConvertToFile 등의 노드를 사용하며. Google Drive에 대한 자동화 워크플로우 백업 및 지능형 정리
사전 요구사항
- •Google Drive API 인증 정보
워크플로우 미리보기
노드 연결 관계를 시각적으로 표시하며, 확대/축소 및 이동을 지원합니다
워크플로우 내보내기
다음 JSON 구성을 복사하여 n8n에 가져오면 이 워크플로우를 사용할 수 있습니다
{
"meta": {
"instanceId": "c582d54231d7262c638a00ee408faa972b8030c20ecfa02b3d445f84745245ff",
"templateCredsSetupCompleted": true
},
"nodes": [
{
"id": "b7a4ebea-711b-473d-b18a-7bf84a888a17",
"name": "일정 트리거",
"type": "n8n-nodes-base.scheduleTrigger",
"position": [
-1456,
-72
],
"parameters": {
"rule": {
"interval": [
{
"triggerAtHour": 3
}
]
}
},
"typeVersion": 1.2
},
{
"id": "c7d51e5b-0add-4c66-8d85-e98d3a09f72e",
"name": "Manual trigger",
"type": "n8n-nodes-base.manualTrigger",
"position": [
-1456,
-264
],
"parameters": {},
"typeVersion": 1
},
{
"id": "73b8a7f5-d038-4366-b30b-a92195db3a35",
"name": "파일 및 폴더 검색",
"type": "n8n-nodes-base.googleDrive",
"position": [
-16,
-480
],
"parameters": {
"filter": {
"folderId": {
"__rl": true,
"mode": "id",
"value": "={{ $('CONFIG - Set your variables here').item.json.parentFolderId }}"
}
},
"options": {},
"resource": "fileFolder",
"returnAll": true,
"queryString": "Workflows backup - "
},
"credentials": {
"googleDriveOAuth2Api": {
"id": "ardYGrL3hsVqtoGo",
"name": "Google Drive"
}
},
"typeVersion": 3
},
{
"id": "adc967fc-746c-462c-9de8-f823100d833d",
"name": "시작 cleanup (run once)",
"type": "n8n-nodes-base.set",
"position": [
-240,
-480
],
"parameters": {
"options": {}
},
"executeOnce": true,
"typeVersion": 3.4
},
{
"id": "1f4ad497-fbf8-4053-80fc-f22c9200370c",
"name": "정렬 and isolate old folders",
"type": "n8n-nodes-base.code",
"position": [
208,
-480
],
"parameters": {
"jsCode": "// Get the number of backups to keep from the config node\nconst backupsToKeep = $json.backupsToKeep;\n\n// 'items' contains the list of folders from the previous node\nconst folders = $input.all(); \nconst sortedFolders = folders.map(item => item.json);\n\n// 1. Sort the folders from newest to oldest\nsortedFolders.sort((a, b) => new Date(b.createdTime) - new Date(a.createdTime));\n\n// 2. Get only the excess folders to delete\nconst foldersToDelete = sortedFolders.slice(backupsToKeep);\n\n// 3. Return the final list to be passed to the loop\nreturn foldersToDelete;"
},
"typeVersion": 2
},
{
"id": "ff6c6c87-2751-4429-a196-edc65f898e43",
"name": "Loop over folders to delete",
"type": "n8n-nodes-base.splitInBatches",
"position": [
432,
-480
],
"parameters": {
"options": {}
},
"typeVersion": 3
},
{
"id": "7669d1df-6225-47aa-841b-c14f48cbd2e3",
"name": "Loop over each workflow",
"type": "n8n-nodes-base.splitInBatches",
"position": [
-560,
-144
],
"parameters": {
"options": {}
},
"typeVersion": 3
},
{
"id": "c7a911aa-e8a2-42a3-a64b-5c2c4318720a",
"name": "Get all n8n workflows",
"type": "n8n-nodes-base.n8n",
"position": [
-784,
-144
],
"parameters": {
"filters": {},
"requestOptions": {}
},
"credentials": {
"n8nApi": {
"id": "iV99kO3Ts0Yartt4",
"name": "N8n"
}
},
"executeOnce": false,
"retryOnFail": false,
"typeVersion": 1,
"alwaysOutputData": false
},
{
"id": "20acb740-7157-4e30-bd4d-04b8663a8f8d",
"name": "Create new backup folder",
"type": "n8n-nodes-base.googleDrive",
"position": [
-1008,
-144
],
"parameters": {
"name": "=Workflows backup - {{ $now.format('yyyy-MM-dd') }}",
"driveId": {
"__rl": true,
"mode": "list",
"value": "My Drive"
},
"options": {},
"folderId": {
"__rl": true,
"mode": "id",
"value": "={{ $('CONFIG - Set your variables here').item.json.parentFolderId }}"
},
"resource": "folder"
},
"credentials": {
"googleDriveOAuth2Api": {
"id": "ardYGrL3hsVqtoGo",
"name": "Google Drive"
}
},
"typeVersion": 3
},
{
"id": "82b9a618-2765-4c53-baa7-66a025808c2d",
"name": "Convert workflow to file",
"type": "n8n-nodes-base.convertToFile",
"position": [
-240,
16
],
"parameters": {
"options": {
"format": true,
"fileName": "={{ $json.name + \".json\" }} "
},
"operation": "toJson"
},
"typeVersion": 1.1
},
{
"id": "1f14d31c-9ab6-4b4f-b054-a02f1b75336f",
"name": "Upload workflow to Google 드라이브",
"type": "n8n-nodes-base.googleDrive",
"position": [
-16,
16
],
"parameters": {
"name": "={{ $('Loop over each workflow').item.json.name + \".json\" }}",
"driveId": {
"__rl": true,
"mode": "list",
"value": "My Drive",
"cachedResultUrl": "https://drive.google.com/drive/my-drive",
"cachedResultName": "My Drive"
},
"options": {},
"folderId": {
"__rl": true,
"mode": "id",
"value": "={{ $('Create new backup folder').item.json.id }}"
}
},
"credentials": {
"googleDriveOAuth2Api": {
"id": "ardYGrL3hsVqtoGo",
"name": "Google Drive"
}
},
"typeVersion": 3
},
{
"id": "db4893e5-8a63-4d3d-9067-6a6d68ed3119",
"name": "Delete old folder",
"type": "n8n-nodes-base.googleDrive",
"position": [
656,
-480
],
"parameters": {
"options": {},
"resource": "folder",
"operation": "deleteFolder",
"folderNoRootId": {
"__rl": true,
"mode": "id",
"value": "={{ $json.id }}"
}
},
"credentials": {
"googleDriveOAuth2Api": {
"id": "ardYGrL3hsVqtoGo",
"name": "Google Drive"
}
},
"typeVersion": 3
},
{
"id": "d6769f88-ffc4-4c1d-b8be-082109b12dde",
"name": "CONFIG - 설정 your variables here",
"type": "n8n-nodes-base.set",
"position": [
-1232,
-144
],
"parameters": {
"options": {},
"assignments": {
"assignments": [
{
"id": "5da1b756-88b7-4ba2-bc87-0ea4298b78ce",
"name": "parentFolderId",
"type": "string",
"value": "PASTE_YOUR_GOOGLE_DRIVE_PARENT_FOLDER_ID_HERE"
},
{
"id": "79da4836-d768-4b7d-b64f-bc820583613a",
"name": "backupsToKeep",
"type": "number",
"value": 30
}
]
}
},
"typeVersion": 3.4
},
{
"id": "06268a9d-854e-47ee-b6f5-38c8dd57ee20",
"name": "메모",
"type": "n8n-nodes-base.stickyNote",
"position": [
-2112,
-336
],
"parameters": {
"width": 560,
"height": 432,
"content": "## How to find your Google Drive Folder ID\nTo tell the workflow where to save your backups, you need to provide the ID of a parent folder in your Google Drive.\n\n1. Go to [Google Drive](https://drive.google.com) and navigate to the folder you want to use. You can also create a new one (e.g., a folder named \"n8n Backups\").\n2. Click on the folder to open it.\n3. Look at the URL in your browser's address bar. The Folder ID is the long string of characters at the end of the URL.\n\n**Example:**\nIf your browser URL is:\n`https://drive.google.com/drive/folders/`**`1Fs3gg7pSVhbvODJQLcgAfP-V0rCGC_Oc`**\n\nThen your Folder ID is:\n**`1Fs3gg7pSVhbvODJQLcgAfP-V0rCGC_Oc`**\n\nCopy this ID and paste it into the `parentFolderId` field in the **\"CONFIG - Set your variables here\"** node."
},
"typeVersion": 1
},
{
"id": "1907cd86-02d6-473a-a605-4518d83c2b1b",
"name": "메모1",
"type": "n8n-nodes-base.stickyNote",
"position": [
-336,
-608
],
"parameters": {
"color": 7,
"width": 1168,
"height": 336,
"content": "## Cleanup Logic: Finds and deletes old backup folders\nThis first part of the workflow handles automatic maintenance. It searches for all existing backup folders in your Google Drive, sorts them by creation date, and keeps only the most recent ones (the number is configurable). All older folders are then automatically deleted to save space.\n\n"
},
"typeVersion": 1
},
{
"id": "dcad82b1-69e9-484f-8d06-cadc311a5ac7",
"name": "메모2",
"type": "n8n-nodes-base.stickyNote",
"position": [
-336,
-208
],
"parameters": {
"color": 7,
"width": 544,
"height": 432,
"content": "## Backup Logic: Fetches all workflows and uploads them to a new daily folder\nThis is the core backup process. It begins by creating a new, dated folder for the current day's backup. It then fetches a complete list of all your n8n workflows, converts each one into a .json file, and uploads them to the new folder, creating a complete and organized daily snapshot."
},
"typeVersion": 1
},
{
"id": "fb976047-3811-437a-b19c-de8def3fe06c",
"name": "메모3",
"type": "n8n-nodes-base.stickyNote",
"position": [
-2736,
-560
],
"parameters": {
"width": 560,
"height": 848,
"content": "## Backup n8n workflows to Google Drive with automatic cleanup\n\nThis template automates the process of backing up all your n8n workflows to Google Drive, ensuring you always have a safe copy of your automations. It also includes a smart cleanup mechanism to automatically delete old backups, keeping your Drive organized and saving space.\n\n## Who’s it for\nThis workflow is ideal for any n8n user, from solo developers to teams, who want a reliable and automated \"set-it-and-forget-it\" backup solution for their critical workflows.\n\n## What it does\n* **Daily Execution**: The workflow runs automatically every night (or can be triggered manually).\n* **Automated Cleanup**: After running a new backup, it searches for all previous backup folders. It keeps the most recent ones (you can define how many) and deletes all the older folders.\n* **Creates Daily Folders**: It creates a new, neatly named folder in your Google Drive for each day's backup (e.g., `Workflows backup - 2025-08-17`).\n* **Fetches and Saves**: It connects to your n8n instance via API, fetches all your workflows, and saves each one as a `.json` file inside the daily folder.\n\n## How to set up\n1. **Configure Credentials**: Make sure you have valid credentials for:\n * **n8n API**: To allow the workflow to access its own list of workflows.\n * **Google Drive**: To allow the workflow to create folders and upload files.\n2. **Set Your Variables**: In the first `Set` node named **\"CONFIG - Set your variables here\"**:\n * `parentFolderId`: Paste the ID of the main Google Drive folder where you want all your daily backup folders to be stored.\n * `backupsToKeep`: Set the number of recent backups you wish to keep (e.g., 30 for a month's worth).\n\nActivate the workflow, and you're all set!"
},
"typeVersion": 1
}
],
"pinData": {},
"connections": {
"c7d51e5b-0add-4c66-8d85-e98d3a09f72e": {
"main": [
[
{
"node": "CONFIG - Set your variables here",
"type": "main",
"index": 0
}
]
]
},
"Schedule Trigger": {
"main": [
[
{
"node": "CONFIG - Set your variables here",
"type": "main",
"index": 0
}
]
]
},
"db4893e5-8a63-4d3d-9067-6a6d68ed3119": {
"main": [
[
{
"node": "ff6c6c87-2751-4429-a196-edc65f898e43",
"type": "main",
"index": 0
}
]
]
},
"c7a911aa-e8a2-42a3-a64b-5c2c4318720a": {
"main": [
[
{
"node": "7669d1df-6225-47aa-841b-c14f48cbd2e3",
"type": "main",
"index": 0
}
]
]
},
"7669d1df-6225-47aa-841b-c14f48cbd2e3": {
"main": [
[
{
"node": "Start cleanup (run once)",
"type": "main",
"index": 0
}
],
[
{
"node": "82b9a618-2765-4c53-baa7-66a025808c2d",
"type": "main",
"index": 0
}
]
]
},
"82b9a618-2765-4c53-baa7-66a025808c2d": {
"main": [
[
{
"node": "Upload workflow to Google Drive",
"type": "main",
"index": 0
}
]
]
},
"20acb740-7157-4e30-bd4d-04b8663a8f8d": {
"main": [
[
{
"node": "c7a911aa-e8a2-42a3-a64b-5c2c4318720a",
"type": "main",
"index": 0
}
]
]
},
"Search files and folders": {
"main": [
[
{
"node": "Sort and isolate old folders",
"type": "main",
"index": 0
}
]
]
},
"Start cleanup (run once)": {
"main": [
[
{
"node": "Search files and folders",
"type": "main",
"index": 0
}
]
]
},
"ff6c6c87-2751-4429-a196-edc65f898e43": {
"main": [
[],
[
{
"node": "db4893e5-8a63-4d3d-9067-6a6d68ed3119",
"type": "main",
"index": 0
}
]
]
},
"Sort and isolate old folders": {
"main": [
[
{
"node": "ff6c6c87-2751-4429-a196-edc65f898e43",
"type": "main",
"index": 0
}
]
]
},
"Upload workflow to Google Drive": {
"main": [
[
{
"node": "7669d1df-6225-47aa-841b-c14f48cbd2e3",
"type": "main",
"index": 0
}
]
]
},
"CONFIG - Set your variables here": {
"main": [
[
{
"node": "20acb740-7157-4e30-bd4d-04b8663a8f8d",
"type": "main",
"index": 0
}
]
]
}
}
}자주 묻는 질문
이 워크플로우를 어떻게 사용하나요?
위의 JSON 구성 코드를 복사하여 n8n 인스턴스에서 새 워크플로우를 생성하고 "JSON에서 가져오기"를 선택한 후, 구성을 붙여넣고 필요에 따라 인증 설정을 수정하세요.
이 워크플로우는 어떤 시나리오에 적합한가요?
고급 - 데브옵스, 멀티모달 AI
유료인가요?
이 워크플로우는 완전히 무료이며 직접 가져와 사용할 수 있습니다. 다만, 워크플로우에서 사용하는 타사 서비스(예: OpenAI API)는 사용자 직접 비용을 지불해야 할 수 있습니다.
관련 워크플로우 추천
Google Drive, GitHub 및 메시지 알림을 사용한 자동화된 워크플로우 백업 시스템
Google Drive, GitHub, 메시지 알림을 활용한 자동화 워크플로우 백업 시스템
If
N8n
Set
+
If
N8n
Set
20 노드Khairul Muhtadin
콘텐츠 제작
4시간마다 모든 n8n 워크플로우를 Google Drive에 백업
Google Drive에 대한 자동화 워크플로우 백업 및 Slack 알림 발송
N8n
Set
Code
+
N8n
Set
Code
12 노드Muhammad Omer Fayyaz
데브옵스
고급 n8n 워크플로우와 GitHub 동기화
GitHub를 활용한 지능형 변경 감지 자동화 워크플로우 백업
If
N8n
Set
+
If
N8n
Set
38 노드Maksym Brashenko
데브옵스
GitHub 동기화 대시보드 - V2
提交 기록과 롤백 기능을 갖춘 GitHub 워크플로우 버전 관리 대시보드
If
N8n
Set
+
If
N8n
Set
94 노드Eduard
데브옵스
지능형 워크플로우 유지보수 시스템
지능형 AI 필터링과 Google Workspace 통합을 지원하는 지능형 워크플로우 유지보수 시스템
If
N8n
Code
+
If
N8n
Code
42 노드Jimmy Gay
데브옵스
✨😃 자동 워크플로우 백업 Google Drive로
✨😃 자동 워크플로우 백업 구글 드라이브로
N8n
Set
Code
+
N8n
Set
Code
22 노드Joseph LePage
기타