4時間ごとにすべてのn8nワークフローをGoogle Driveにバックアップする
中級
これはDevOps, Multimodal AI分野の自動化ワークフローで、12個のノードを含みます。主にN8n, Set, Code, Merge, Slackなどのノードを使用。 Google Drive への自動化ワークフロー バックアップおよび Slack 通知送信
前提条件
- •Slack Bot Token または Webhook URL
- •Google Drive API認証情報
ワークフロープレビュー
ノード接続関係を可視化、ズームとパンをサポート
ワークフローをエクスポート
以下のJSON設定をn8nにインポートして、このワークフローを使用できます
{
"id": "vnlmgDq8SZlzMcfi",
"meta": {
"instanceId": "50631c03cbd88440965b74e5a58aada5437cbc43e90372b516e36154908ad374",
"templateId": "2886"
},
"name": "Backup all n8n workflows to Google Drive every 4 hours",
"tags": [],
"nodes": [
{
"id": "26b6a8ca-cf9e-4eab-9f2a-841f975a4741",
"name": "「実行」クリック時",
"type": "n8n-nodes-base.manualTrigger",
"position": [
240,
448
],
"parameters": {},
"typeVersion": 1
},
{
"id": "c42307c1-0d95-4500-85e8-a89234a7e2e7",
"name": "新規フォルダ作成",
"type": "n8n-nodes-base.googleDrive",
"onError": "continueErrorOutput",
"position": [
464,
560
],
"parameters": {
"name": "=Workflow Backups {{ $now.format('cccc t dd-MM-yyyy') }}",
"driveId": {
"__rl": true,
"mode": "list",
"value": "My Drive"
},
"options": {},
"folderId": {
"__rl": true,
"mode": "list",
"value": "14Mui2em5keVRWaoq3dlrvaX8KNRxw2h2",
"cachedResultUrl": "https://drive.google.com/drive/folders/14Mui2em5keVRWaoq3dlrvaX8KNRxw2h2",
"cachedResultName": "N8N Backups"
},
"resource": "folder"
},
"credentials": {
"googleDriveOAuth2Api": {
"id": "q0ULpbFEGZLCh5Hf",
"name": "Google Drive account"
}
},
"typeVersion": 3
},
{
"id": "139487f6-1ef0-4835-bdef-a896dbbdf942",
"name": "スケジュールトリガー",
"type": "n8n-nodes-base.scheduleTrigger",
"position": [
240,
640
],
"parameters": {
"rule": {
"interval": [
{
"field": "hours",
"hoursInterval": 4
}
]
}
},
"typeVersion": 1.2
},
{
"id": "724c83f9-9e07-4a87-9f25-d1631a8ef403",
"name": "完了通知",
"type": "n8n-nodes-base.slack",
"position": [
1808,
192
],
"webhookId": "0a1c0309-0a0b-4e37-972d-b229684c2d52",
"parameters": {
"text": "=✅ Backup has completed - {{ $('Get many workflows').all().length }} workflows have been processed.",
"select": "channel",
"channelId": {
"__rl": true,
"mode": "id",
"value": "C099YS0V3M2"
},
"otherOptions": {}
},
"credentials": {
"slackApi": {
"id": "VI4wP9VPIS3KDiow",
"name": "Slack account"
}
},
"executeOnce": true,
"typeVersion": 2.2
},
{
"id": "939d7dc3-2080-4ac7-9609-ef598b018eb2",
"name": "失敗通知",
"type": "n8n-nodes-base.slack",
"position": [
1808,
752
],
"webhookId": "8e3c13d8-3bcc-4832-b511-30fc816350c8",
"parameters": {
"text": "=❌ Error in the N8N Backup Workflow",
"select": "channel",
"channelId": {
"__rl": true,
"mode": "id",
"value": "C099YS0V3M2"
},
"otherOptions": {}
},
"credentials": {
"slackApi": {
"id": "VI4wP9VPIS3KDiow",
"name": "Slack account"
}
},
"executeOnce": true,
"typeVersion": 2.2
},
{
"id": "53a6e217-05cb-4d9d-93ba-686cfec5e7b7",
"name": "Convert to File1",
"type": "n8n-nodes-base.convertToFile",
"position": [
848,
240
],
"parameters": {
"mode": "each",
"options": {
"fileName": "={{ $json.name + '.json' }}"
},
"operation": "toJson"
},
"typeVersion": 1.1
},
{
"id": "80cdeba1-1d1c-4b20-994b-09d1791cf534",
"name": "Compression",
"type": "n8n-nodes-base.compression",
"position": [
1200,
384
],
"parameters": {
"fileName": "={{ 'workflows_backup_' + new Date().toISOString().slice(0,10) + '.zip' }}",
"operation": "compress",
"outputFormat": "=zip",
"binaryPropertyName": "={{ Object.keys($binary).join(',') }}"
},
"typeVersion": 1.1
},
{
"id": "96167a67-bc95-4414-bf61-52d225ffc43d",
"name": "Code",
"type": "n8n-nodes-base.code",
"position": [
1024,
320
],
"parameters": {
"jsCode": "let binaries = {}, binary_keys = [];\n\nfor (const [index, inputItem] of Object.entries($input.all())) {\n binaries[`data_${index}`] = inputItem.binary.data;\n binary_keys.push(`data_${index}`);\n}\n\nreturn [{\n json: {\n binary_keys: binary_keys.join(',')\n },\n binary: binaries\n}];\n"
},
"typeVersion": 2
},
{
"id": "502b946e-2543-486a-aaa6-f3a11bdfde80",
"name": "ファイルをアップロード",
"type": "n8n-nodes-base.googleDrive",
"onError": "continueErrorOutput",
"position": [
1568,
464
],
"parameters": {
"name": "={{ 'workflows_backup_' + new Date().toISOString().slice(0,10) + '.zip' }}",
"driveId": {
"__rl": true,
"mode": "list",
"value": "My Drive"
},
"options": {},
"folderId": {
"__rl": true,
"mode": "id",
"value": "={{ $json.folderId }}"
},
"inputDataFieldName": "=data"
},
"credentials": {
"googleDriveOAuth2Api": {
"id": "q0ULpbFEGZLCh5Hf",
"name": "Google Drive account"
}
},
"typeVersion": 3
},
{
"id": "e4cfa753-d0c7-452f-9f10-0cd22d57d2ec",
"name": "Get many workflows",
"type": "n8n-nodes-base.n8n",
"position": [
688,
192
],
"parameters": {
"filters": {},
"returnAll": "=1",
"requestOptions": {}
},
"credentials": {
"n8nApi": {
"id": "d5L8dGBpYmfBaLlT",
"name": "n8n account"
}
},
"retryOnFail": true,
"typeVersion": 1,
"alwaysOutputData": true
},
{
"id": "261700eb-b41d-4eb4-883a-87c10b6600e3",
"name": "新規フォルダID設定",
"type": "n8n-nodes-base.set",
"position": [
1200,
544
],
"parameters": {
"options": {},
"assignments": {
"assignments": [
{
"id": "d76278da-3d66-4776-893f-d7b7cd8bdd04",
"name": "folderId",
"type": "string",
"value": "={{ $json.id }}"
}
]
}
},
"typeVersion": 3.4
},
{
"id": "e5ae88c5-5246-409f-acae-087c8de30a08",
"name": "Merge",
"type": "n8n-nodes-base.merge",
"position": [
1392,
464
],
"parameters": {
"mode": "combine",
"options": {},
"combineBy": "combineByPosition"
},
"typeVersion": 3.2
}
],
"active": true,
"pinData": {},
"settings": {},
"versionId": "c7acf018-a4f5-437b-9ae3-0d9298408c3b",
"connections": {
"96167a67-bc95-4414-bf61-52d225ffc43d": {
"main": [
[
{
"node": "80cdeba1-1d1c-4b20-994b-09d1791cf534",
"type": "main",
"index": 0
}
]
]
},
"e5ae88c5-5246-409f-acae-087c8de30a08": {
"main": [
[
{
"node": "502b946e-2543-486a-aaa6-f3a11bdfde80",
"type": "main",
"index": 0
}
]
]
},
"80cdeba1-1d1c-4b20-994b-09d1791cf534": {
"main": [
[
{
"node": "e5ae88c5-5246-409f-acae-087c8de30a08",
"type": "main",
"index": 0
}
]
]
},
"502b946e-2543-486a-aaa6-f3a11bdfde80": {
"main": [
[
{
"node": "724c83f9-9e07-4a87-9f25-d1631a8ef403",
"type": "main",
"index": 0
}
],
[
{
"node": "939d7dc3-2080-4ac7-9609-ef598b018eb2",
"type": "main",
"index": 0
}
]
]
},
"53a6e217-05cb-4d9d-93ba-686cfec5e7b7": {
"main": [
[
{
"node": "96167a67-bc95-4414-bf61-52d225ffc43d",
"type": "main",
"index": 0
}
]
]
},
"139487f6-1ef0-4835-bdef-a896dbbdf942": {
"main": [
[
{
"node": "c42307c1-0d95-4500-85e8-a89234a7e2e7",
"type": "main",
"index": 0
}
]
]
},
"261700eb-b41d-4eb4-883a-87c10b6600e3": {
"main": [
[
{
"node": "e5ae88c5-5246-409f-acae-087c8de30a08",
"type": "main",
"index": 1
}
]
]
},
"c42307c1-0d95-4500-85e8-a89234a7e2e7": {
"main": [
[
{
"node": "261700eb-b41d-4eb4-883a-87c10b6600e3",
"type": "main",
"index": 0
},
{
"node": "e4cfa753-d0c7-452f-9f10-0cd22d57d2ec",
"type": "main",
"index": 0
}
],
[
{
"node": "939d7dc3-2080-4ac7-9609-ef598b018eb2",
"type": "main",
"index": 0
}
]
]
},
"e4cfa753-d0c7-452f-9f10-0cd22d57d2ec": {
"main": [
[
{
"node": "53a6e217-05cb-4d9d-93ba-686cfec5e7b7",
"type": "main",
"index": 0
}
]
]
},
"26b6a8ca-cf9e-4eab-9f2a-841f975a4741": {
"main": [
[
{
"node": "c42307c1-0d95-4500-85e8-a89234a7e2e7",
"type": "main",
"index": 0
}
]
]
}
}
}よくある質問
このワークフローの使い方は?
上記のJSON設定コードをコピーし、n8nインスタンスで新しいワークフローを作成して「JSONからインポート」を選択、設定を貼り付けて認証情報を必要に応じて変更してください。
このワークフローはどんな場面に適していますか?
中級 - DevOps, マルチモーダルAI
有料ですか?
このワークフローは完全無料です。ただし、ワークフローで使用するサードパーティサービス(OpenAI APIなど)は別途料金が発生する場合があります。
関連ワークフロー
Google Drive へのワークフロー備份とスマートクリーンアップ
Google Drive へのワークフロー バックアップの自動化と スマートなクリーンアップ
N8n
Set
Code
+
N8n
Set
Code
17 ノードLuca Olovrap
DevOps
Google Drive、GitHub、メッセージ アラートを使用した自動作業フロー バックアップシステム
Google Drive、GitHub、そしてメッセージアラートを使用した自動化ワークフローバックアップシステム
If
N8n
Set
+
If
N8n
Set
20 ノードKhairul Muhtadin
コンテンツ作成
イベント管理工作フロー
Jira、Slack、Google Sheets、Drive を使ったインシデント対応の自動化
If
Set
Code
+
If
Set
Code
23 ノードRahul Joshi
DevOps
高度な n8n ワークフローと GitHub の同期
GitHub による スマートな変更検出を使った ワークフロー バックアップの自動化
If
N8n
Set
+
If
N8n
Set
38 ノードMaksym Brashenko
DevOps
GitHub 同期ダッシュボード - V2
コミット履歴とロールバック機能を備えた GitHub ワークフロー バージョン管理ダッシュボード
If
N8n
Set
+
If
N8n
Set
94 ノードEduard
DevOps
スマートGmailメール自動整理ツール(Google Sheetsルール付き)
Gmailメール自動整理ツール、Google Sheetsルールを含む
If
Code
Gmail
+
If
Code
Gmail
17 ノードOmer Fayyaz
チケット管理