Files
SurfersIsland/n8n/SurfersIsland_Backup.json
2026-03-25 06:41:14 +01:00

544 lines
13 KiB
JSON

{
"name": "SurfersIsland_Backup",
"nodes": [
{
"parameters": {
"rule": {
"interval": [
{
"field": "hours",
"hoursInterval": 2,
"triggerAtMinute": 20
}
]
}
},
"type": "n8n-nodes-base.scheduleTrigger",
"typeVersion": 1.3,
"position": [
-224,
-96
],
"id": "7d2ac02a-226b-4406-acc8-2c2aca0e99c7",
"name": "Schedule Trigger"
},
{
"parameters": {
"operation": "deleteFile",
"fileId": {
"__rl": true,
"value": "={{ $json.Sheet_ID }}",
"mode": "id"
},
"options": {
"deletePermanently": true
}
},
"type": "n8n-nodes-base.googleDrive",
"typeVersion": 3,
"position": [
896,
-96
],
"id": "6bcb247d-d9ae-48fb-a5e6-07de03e227e3",
"name": "Delete a file",
"credentials": {
"googleDriveOAuth2Api": {
"id": "q1Y0vLmcVt97EzJG",
"name": "Google Drive"
}
}
},
{
"parameters": {
"dataTableId": {
"__rl": true,
"value": "HxvQaeNWHKwIDWEG",
"mode": "list",
"cachedResultName": "SurfersIsland_Backup-Surf",
"cachedResultUrl": "/projects/GfQo4CYkUbKCxUG4/datatables/HxvQaeNWHKwIDWEG"
},
"columns": {
"mappingMode": "defineBelow",
"value": {
"Sheet_ID": "={{ $json.id }}"
},
"matchingColumns": [
"Sheet_ID"
],
"schema": [
{
"id": "Sheet_ID",
"displayName": "Sheet_ID",
"required": false,
"defaultMatch": false,
"display": true,
"type": "string",
"readOnly": false,
"removed": false
}
],
"attemptToConvertTypes": false,
"convertFieldsToString": false
},
"options": {}
},
"type": "n8n-nodes-base.dataTable",
"typeVersion": 1.1,
"position": [
224,
-208
],
"id": "04668eff-d56c-4ce0-8ef1-f4fd4e834818",
"name": "Insert row"
},
{
"parameters": {
"operation": "get",
"dataTableId": {
"__rl": true,
"value": "HxvQaeNWHKwIDWEG",
"mode": "list",
"cachedResultName": "SurfersIsland_Backup-Surf",
"cachedResultUrl": "/projects/GfQo4CYkUbKCxUG4/datatables/HxvQaeNWHKwIDWEG"
},
"matchType": "allConditions",
"filters": {
"conditions": [
{
"condition": "lte",
"keyValue": "={{ $json.id -10}}"
}
]
}
},
"type": "n8n-nodes-base.dataTable",
"typeVersion": 1.1,
"position": [
448,
-208
],
"id": "32604c8f-e3a3-47da-b128-3bc0a6327090",
"name": "Get row(s)"
},
{
"parameters": {
"operation": "copy",
"fileId": {
"__rl": true,
"value": "1F03s3WszBiT4aF1u9EkbQUjqd5j0hV6eB_yI_AGq-cA",
"mode": "list",
"cachedResultName": "Surf 24/25",
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/1F03s3WszBiT4aF1u9EkbQUjqd5j0hV6eB_yI_AGq-cA/edit?usp=drivesdk"
},
"name": "=Surf_Backup-{{ $json['Day of month'] }}.{{ $json.Month }}-{{ $json.Hour }}:{{ $json.Minute }}",
"sameFolder": false,
"driveId": {
"__rl": true,
"mode": "list",
"value": "My Drive"
},
"folderId": {
"__rl": true,
"value": "1pfiabhw_n8hMf2z15iKy041Wwu959GcT",
"mode": "list",
"cachedResultName": "SurfersIsland_Backup",
"cachedResultUrl": "https://drive.google.com/drive/folders/1pfiabhw_n8hMf2z15iKy041Wwu959GcT"
},
"options": {}
},
"type": "n8n-nodes-base.googleDrive",
"typeVersion": 3,
"position": [
0,
-208
],
"id": "bc3008f2-94cc-4569-9a0b-d6ceb4fe7042",
"name": "BackupSurf",
"credentials": {
"googleDriveOAuth2Api": {
"id": "q1Y0vLmcVt97EzJG",
"name": "Google Drive"
}
}
},
{
"parameters": {
"operation": "copy",
"fileId": {
"__rl": true,
"value": "1n4ZUKdv5qrMDK4Dag_dSIh745M--NYeOFra0GQB0iyM",
"mode": "list",
"cachedResultName": "Kite 24/25",
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/1n4ZUKdv5qrMDK4Dag_dSIh745M--NYeOFra0GQB0iyM/edit?usp=drivesdk"
},
"name": "=Kite_Backup-{{ $json['Day of month'] }}.{{ $json.Month }}-{{ $json.Hour }}:{{ $json.Minute }}",
"sameFolder": false,
"driveId": {
"__rl": true,
"mode": "list",
"value": "My Drive"
},
"folderId": {
"__rl": true,
"value": "1pfiabhw_n8hMf2z15iKy041Wwu959GcT",
"mode": "list",
"cachedResultName": "SurfersIsland_Backup",
"cachedResultUrl": "https://drive.google.com/drive/folders/1pfiabhw_n8hMf2z15iKy041Wwu959GcT"
},
"options": {}
},
"type": "n8n-nodes-base.googleDrive",
"typeVersion": 3,
"position": [
0,
32
],
"id": "be860313-a316-4757-bc58-7984832b56ce",
"name": "BackupKite",
"credentials": {
"googleDriveOAuth2Api": {
"id": "q1Y0vLmcVt97EzJG",
"name": "Google Drive"
}
}
},
{
"parameters": {},
"type": "n8n-nodes-base.merge",
"typeVersion": 3.2,
"position": [
672,
-96
],
"id": "758b532c-b488-47e6-bcb6-572073f35811",
"name": "Merge"
},
{
"parameters": {
"dataTableId": {
"__rl": true,
"value": "qe1qrSuM4swEvBW5",
"mode": "list",
"cachedResultName": "SurfersIsland_Backup-Kite",
"cachedResultUrl": "/projects/GfQo4CYkUbKCxUG4/datatables/qe1qrSuM4swEvBW5"
},
"columns": {
"mappingMode": "defineBelow",
"value": {
"Sheet_ID": "={{ $json.id }}"
},
"matchingColumns": [
"Sheet_ID"
],
"schema": [
{
"id": "Sheet_ID",
"displayName": "Sheet_ID",
"required": false,
"defaultMatch": false,
"display": true,
"type": "string",
"readOnly": false,
"removed": false
}
],
"attemptToConvertTypes": false,
"convertFieldsToString": false
},
"options": {}
},
"type": "n8n-nodes-base.dataTable",
"typeVersion": 1.1,
"position": [
224,
32
],
"id": "7b3f4a8a-e81d-4463-91e0-2f9dc68bff1e",
"name": "Insert row1"
},
{
"parameters": {
"operation": "get",
"dataTableId": {
"__rl": true,
"value": "qe1qrSuM4swEvBW5",
"mode": "list",
"cachedResultName": "SurfersIsland_Backup-Kite",
"cachedResultUrl": "/projects/GfQo4CYkUbKCxUG4/datatables/qe1qrSuM4swEvBW5"
},
"matchType": "allConditions",
"filters": {
"conditions": [
{
"condition": "lte",
"keyValue": "={{ $json.id -10}}"
}
]
}
},
"type": "n8n-nodes-base.dataTable",
"typeVersion": 1.1,
"position": [
448,
32
],
"id": "5fdc0884-c03d-4ae7-88a3-2c0de7936960",
"name": "Get row(s)1"
},
{
"parameters": {
"operation": "deleteRows",
"dataTableId": {
"__rl": true,
"value": "HxvQaeNWHKwIDWEG",
"mode": "list",
"cachedResultName": "SurfersIsland_Backup-Surf",
"cachedResultUrl": "/projects/GfQo4CYkUbKCxUG4/datatables/HxvQaeNWHKwIDWEG"
},
"filters": {
"conditions": [
{
"keyValue": "={{ $json.id }}"
}
]
},
"options": {}
},
"type": "n8n-nodes-base.dataTable",
"typeVersion": 1.1,
"position": [
1344,
-208
],
"id": "a9ff5457-f29c-408f-a748-baecd836fde6",
"name": "Delete row(s)"
},
{
"parameters": {
"operation": "deleteRows",
"dataTableId": {
"__rl": true,
"value": "qe1qrSuM4swEvBW5",
"mode": "list",
"cachedResultName": "SurfersIsland_Backup-Kite",
"cachedResultUrl": "/projects/GfQo4CYkUbKCxUG4/datatables/qe1qrSuM4swEvBW5"
},
"filters": {
"conditions": [
{
"keyValue": "={{ $json.id }}"
}
]
},
"options": {}
},
"type": "n8n-nodes-base.dataTable",
"typeVersion": 1.1,
"position": [
1344,
32
],
"id": "4bd97e2c-9833-4e36-9da4-5c307e28cdfe",
"name": "Delete row(s)1"
},
{
"parameters": {
"mode": "chooseBranch"
},
"type": "n8n-nodes-base.merge",
"typeVersion": 3.2,
"position": [
1120,
-208
],
"id": "36cd50d0-59e4-414f-a0cb-d2c079615281",
"name": "Merge1"
},
{
"parameters": {
"mode": "chooseBranch",
"useDataOfInput": 2
},
"type": "n8n-nodes-base.merge",
"typeVersion": 3.2,
"position": [
1120,
32
],
"id": "0f2e57fd-be06-4817-8e9a-0c46f8c3404c",
"name": "Merge2"
}
],
"pinData": {},
"connections": {
"Schedule Trigger": {
"main": [
[
{
"node": "BackupSurf",
"type": "main",
"index": 0
},
{
"node": "BackupKite",
"type": "main",
"index": 0
}
]
]
},
"Delete a file": {
"main": [
[
{
"node": "Merge1",
"type": "main",
"index": 1
},
{
"node": "Merge2",
"type": "main",
"index": 0
}
]
]
},
"Insert row": {
"main": [
[
{
"node": "Get row(s)",
"type": "main",
"index": 0
}
]
]
},
"Get row(s)": {
"main": [
[
{
"node": "Merge",
"type": "main",
"index": 0
},
{
"node": "Merge1",
"type": "main",
"index": 0
}
]
]
},
"BackupSurf": {
"main": [
[
{
"node": "Insert row",
"type": "main",
"index": 0
}
]
]
},
"Merge": {
"main": [
[
{
"node": "Delete a file",
"type": "main",
"index": 0
}
]
]
},
"BackupKite": {
"main": [
[
{
"node": "Insert row1",
"type": "main",
"index": 0
}
]
]
},
"Insert row1": {
"main": [
[
{
"node": "Get row(s)1",
"type": "main",
"index": 0
}
]
]
},
"Get row(s)1": {
"main": [
[
{
"node": "Merge",
"type": "main",
"index": 1
},
{
"node": "Merge2",
"type": "main",
"index": 1
}
]
]
},
"Delete row(s)": {
"main": [
[]
]
},
"Delete row(s)1": {
"main": [
[]
]
},
"Merge1": {
"main": [
[
{
"node": "Delete row(s)",
"type": "main",
"index": 0
}
]
]
},
"Merge2": {
"main": [
[
{
"node": "Delete row(s)1",
"type": "main",
"index": 0
}
]
]
}
},
"active": true,
"settings": {
"executionOrder": "v1",
"binaryMode": "separate",
"availableInMCP": false,
"timeSavedMode": "fixed",
"errorWorkflow": "pfSHjq1uOYG4frx8",
"callerPolicy": "workflowsFromSameOwner",
"timezone": "Atlantic/Canary"
},
"versionId": "993b4dd9-77d8-46ce-bca0-c228864dd039",
"meta": {
"templateCredsSetupCompleted": true,
"instanceId": "4674f284e85213f04baf0419e3407e986c2c4a3d3e335730c4a2482ed0ab860a"
},
"id": "Bq7UD4wzrUEzqfux",
"tags": []
}