{
  "meta": {
    "templateCredsSetupCompleted": true
  },
  "nodes": [
    {
      "id": "f15465bd-4e59-41cc-af98-bef0be10ae91",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1520,
        0
      ],
      "parameters": {
        "color": 4,
        "width": 919,
        "height": 298,
        "content": "MOVE CURRENT BACKUPS TO OLD FOLDER\n\n* GET CURRENT BACKUPS: Retrieves a list of current backups in the n8n_backups folder.\n* Loop Over Items: Iterates over files and moves them to the n8n_old folder.\n* MOVE INTO OLD FOLDER: Moves files from the current backups folder to the old backups folder (n8n_old)."
      },
      "typeVersion": 1
    },
    {
      "id": "64aa8582-e23a-4a1c-81b0-c79dd330b81f",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1024,
        576
      ],
      "parameters": {
        "width": 1417.9765108650786,
        "height": 203.50281832188898,
        "content": "PURGE BACKUPS OLDER THEN 30 DAYS\nIdentifies backups that are more than 30 days old and deletes them (code)."
      },
      "typeVersion": 1
    },
    {
      "id": "3a04bbfd-7acb-44d8-b192-e0189873ae09",
      "name": "Move Binary Data",
      "type": "n8n-nodes-base.moveBinaryData",
      "position": [
        1792,
        416
      ],
      "parameters": {
        "mode": "jsonToBinary",
        "options": {
          "fileName": "={{ $json.name }}-{{ $json.active === false ? 'inactive' : $json.active === true ? 'active' : 'unknown' }}",
          "useRawData": true
        }
      },
      "typeVersion": 1
    },
    {
      "id": "da789082-c7f0-4fc2-bf92-aa4eb61bf274",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        0,
        0
      ],
      "parameters": {
        "color": 2,
        "width": 1003.460056384994,
        "height": 781.8511818911037,
        "content": "## GET GOOGLE DRIVE FOLDERS\n"
      },
      "typeVersion": 1
    },
    {
      "id": "589b84c5-af3c-4619-a9db-0ecc18bd9924",
      "name": "Sticky Note4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1024,
        0
      ],
      "parameters": {
        "color": 6,
        "width": 475,
        "height": 179,
        "content": "## Ignore any other folders other than: n8n_backups\n\n\n\n(it is important that you created this folder)"
      },
      "typeVersion": 1
    },
    {
      "id": "5ff923b3-fbe5-4e5a-a4df-2b3275a6db0b",
      "name": "IGNORE FILES",
      "type": "n8n-nodes-base.filter",
      "position": [
        1376,
        48
      ],
      "parameters": {
        "options": {},
        "conditions": {
          "options": {
            "version": 2,
            "leftValue": "",
            "caseSensitive": true,
            "typeValidation": "strict"
          },
          "combinator": "and",
          "conditions": [
            {
              "id": "98415e9e-5354-4223-9107-ef3ade30c2f0",
              "operator": {
                "name": "filter.operator.equals",
                "type": "string",
                "operation": "equals"
              },
              "leftValue": "={{ $json.name }}",
              "rightValue": "n8n_backups"
            }
          ]
        }
      },
      "typeVersion": 2.2
    },
    {
      "id": "6a688597-a447-481f-a108-963bdd941f31",
      "name": "Create n8n_backups",
      "type": "n8n-nodes-base.googleDrive",
      "position": [
        752,
        416
      ],
      "parameters": {
        "name": "n8n_backups",
        "driveId": {
          "__rl": true,
          "mode": "list",
          "value": "My Drive"
        },
        "options": {},
        "folderId": {
          "__rl": true,
          "mode": "list",
          "value": "root",
          "cachedResultName": "/ (Root folder)"
        },
        "resource": "folder"
      },
      "credentials": {
        "googleDriveOAuth2Api": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 3
    },
    {
      "id": "ba0246cd-b9fa-4765-8105-64cd6591f64f",
      "name": "Create n8n_old",
      "type": "n8n-nodes-base.googleDrive",
      "position": [
        752,
        576
      ],
      "parameters": {
        "name": "n8n_old",
        "driveId": {
          "__rl": true,
          "mode": "list",
          "value": "My Drive"
        },
        "options": {},
        "folderId": {
          "__rl": true,
          "mode": "list",
          "value": "root",
          "cachedResultName": "/ (Root folder)"
        },
        "resource": "folder"
      },
      "credentials": {
        "googleDriveOAuth2Api": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 3
    },
    {
      "id": "9f01a57e-9cf1-401f-af6b-c98de95ad4ff",
      "name": "Sticky Note10",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        640,
        304
      ],
      "parameters": {
        "color": 5,
        "width": 327.6965514381564,
        "height": 451.756147757587,
        "content": "### Since the n8n backups and n8n old folders are missing, they are created automatically."
      },
      "typeVersion": 1
    },
    {
      "id": "c97d8957-2d61-4db8-9c7f-ad246ddf98a5",
      "name": "GET CURRENT FOLDER",
      "type": "n8n-nodes-base.googleDrive",
      "onError": "continueRegularOutput",
      "position": [
        64,
        272
      ],
      "parameters": {
        "filter": {
          "whatToSearch": "folders"
        },
        "options": {},
        "resource": "fileFolder",
        "queryString": "n8n_"
      },
      "credentials": {
        "googleDriveOAuth2Api": {
          "name": "<your credential>"
        }
      },
      "executeOnce": false,
      "notesInFlow": true,
      "retryOnFail": true,
      "typeVersion": 3,
      "alwaysOutputData": true
    },
    {
      "id": "0d09ed07-6d1e-4ead-afc6-9f6e3788b90f",
      "name": "Code",
      "type": "n8n-nodes-base.code",
      "position": [
        240,
        272
      ],
      "parameters": {
        "jsCode": "const items = $input.all();\nconst requiredNames = [\"n8n_old\", \"n8n_backups\"];\n\n// Creamos un mapa de lo que ya existe\nconst existingFolders = {};\nitems.forEach(item => {\n  existingFolders[item.json.name] = item.json.id;\n});\n\n// Verificamos qu\u00e9 falta\nconst missingNames = requiredNames.filter(name => !existingFolders[name]);\n\nreturn [{\n  json: {\n    message: missingNames.length === 0 ? \"ok\" : `Faltan: ${missingNames.join(', ')}`,\n    ids: existingFolders, // Guardamos los IDs aqu\u00ed\n    missing: missingNames\n  }\n}];"
      },
      "typeVersion": 2
    },
    {
      "id": "c6bc139e-4f89-4b80-9d2d-3fc38befd9aa",
      "name": "If n8n_old",
      "type": "n8n-nodes-base.if",
      "position": [
        432,
        336
      ],
      "parameters": {
        "options": {},
        "conditions": {
          "options": {
            "version": 2,
            "leftValue": "",
            "caseSensitive": true,
            "typeValidation": "strict"
          },
          "combinator": "and",
          "conditions": [
            {
              "id": "43bd468e-1018-4b45-9448-c51835ed65bc",
              "operator": {
                "type": "string",
                "operation": "contains"
              },
              "leftValue": "={{ $json.message }}",
              "rightValue": "n8n_old"
            }
          ]
        }
      },
      "typeVersion": 2.2
    },
    {
      "id": "41f874f2-f068-4bf9-8f64-102cff9e7d0a",
      "name": "If1 n8n_backups",
      "type": "n8n-nodes-base.if",
      "position": [
        432,
        192
      ],
      "parameters": {
        "options": {},
        "conditions": {
          "options": {
            "version": 2,
            "leftValue": "",
            "caseSensitive": true,
            "typeValidation": "strict"
          },
          "combinator": "and",
          "conditions": [
            {
              "id": "43bd468e-1018-4b45-9448-c51835ed65bc",
              "operator": {
                "type": "string",
                "operation": "contains"
              },
              "leftValue": "={{ $json.message }}",
              "rightValue": "n8n_backups"
            }
          ]
        }
      },
      "typeVersion": 2.2
    },
    {
      "id": "e70ef45f-0846-46b8-bc07-00bb3d5513e9",
      "name": "GET CURRENT FOLDER CREATES",
      "type": "n8n-nodes-base.googleDrive",
      "onError": "continueRegularOutput",
      "position": [
        848,
        48
      ],
      "parameters": {
        "filter": {
          "whatToSearch": "folders"
        },
        "options": {},
        "resource": "fileFolder",
        "queryString": "n8n_backups"
      },
      "credentials": {
        "googleDriveOAuth2Api": {
          "name": "<your credential>"
        }
      },
      "executeOnce": true,
      "notesInFlow": true,
      "retryOnFail": true,
      "typeVersion": 3,
      "alwaysOutputData": true
    },
    {
      "id": "e5551b95-053a-4602-8a69-ab65311b0ac2",
      "name": "Merge mensage",
      "type": "n8n-nodes-base.merge",
      "position": [
        672,
        112
      ],
      "parameters": {
        "mode": "combine",
        "options": {},
        "combinationMode": "mergeByPosition"
      },
      "typeVersion": 2.1
    },
    {
      "id": "f90814d5-b255-40ab-b687-3d896e17e27e",
      "name": "GET CURRENT BACKUPS1",
      "type": "n8n-nodes-base.googleDrive",
      "position": [
        1600,
        112
      ],
      "parameters": {
        "filter": {
          "folderId": {
            "__rl": true,
            "mode": "id",
            "value": "={{ $json.id }}"
          }
        },
        "options": {
          "fields": [
            "name",
            "id"
          ]
        },
        "resource": "fileFolder",
        "returnAll": true,
        "queryString": ".json"
      },
      "credentials": {
        "googleDriveOAuth2Api": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 3
    },
    {
      "id": "c99cfde8-8f91-4621-a5b0-37e3da5d1014",
      "name": "Sticky Note5",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        240,
        144
      ],
      "parameters": {
        "color": 7,
        "width": 344.6035366824252,
        "height": 320.16281145907226,
        "content": "### The system automatically creates the folders n8n_backups and n8n_old if they do not already exist."
      },
      "typeVersion": 1
    },
    {
      "id": "0a8bbaec-bb59-4f09-b7fd-c025c62e8791",
      "name": "MOVE INTO OLD FOLDER",
      "type": "n8n-nodes-base.googleDrive",
      "onError": "continueRegularOutput",
      "position": [
        2272,
        112
      ],
      "parameters": {
        "fileId": {
          "__rl": true,
          "mode": "id",
          "value": "={{ $json.id }}"
        },
        "driveId": {
          "__rl": true,
          "mode": "list",
          "value": "My Drive",
          "cachedResultUrl": "https://drive.google.com/drive/my-drive",
          "cachedResultName": "My Drive"
        },
        "folderId": {
          "__rl": true,
          "mode": "id",
          "value": "={{ $node[\"Code\"].json.ids.n8n_old || $node[\"Create n8n_old\"].json.id }}"
        },
        "operation": "move"
      },
      "credentials": {
        "googleDriveOAuth2Api": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 3,
      "alwaysOutputData": true
    },
    {
      "id": "30c3dbf6-c941-4115-aba9-431400836d39",
      "name": "UPLOAD WORKFLOWS",
      "type": "n8n-nodes-base.googleDrive",
      "position": [
        2272,
        384
      ],
      "parameters": {
        "name": "={{ $('Loop Over Items current').item.binary.data.fileName }}-{{ $now.toISO() }}.json",
        "options": {},
        "parents": [
          "={{ $('IGNORE FILES').item.json.id }}"
        ],
        "binaryData": true,
        "authentication": "oAuth2"
      },
      "credentials": {
        "googleDriveOAuth2Api": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "42fd608f-3bc2-41a7-9ae4-8eac32939686",
      "name": "Item Lists",
      "type": "n8n-nodes-base.itemLists",
      "position": [
        1792,
        112
      ],
      "parameters": {
        "options": {},
        "fieldToSplitOut": "id"
      },
      "typeVersion": 3
    },
    {
      "id": "29e6a7b3-cf77-4bea-afdb-3fe22f3f7b0f",
      "name": "LIST OLD BACKUPS",
      "type": "n8n-nodes-base.googleDrive",
      "position": [
        1488,
        640
      ],
      "parameters": {
        "filter": {
          "folderId": {
            "__rl": true,
            "mode": "id",
            "value": "={{ $json.id }}"
          }
        },
        "options": {
          "fields": [
            "name",
            "id"
          ]
        },
        "resource": "fileFolder",
        "returnAll": true,
        "queryString": ".json"
      },
      "credentials": {
        "googleDriveOAuth2Api": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 3
    },
    {
      "id": "af5bfced-4322-40da-a8ba-7c5fa08d8e5c",
      "name": "DELETE OLD BACKUP",
      "type": "n8n-nodes-base.googleDrive",
      "onError": "continueRegularOutput",
      "position": [
        2288,
        592
      ],
      "parameters": {
        "fileId": {
          "__rl": true,
          "mode": "id",
          "value": "={{ $json.id }}"
        },
        "options": {
          "deletePermanently": true
        },
        "operation": "deleteFile"
      },
      "credentials": {
        "googleDriveOAuth2Api": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 3,
      "alwaysOutputData": true
    },
    {
      "id": "e7f76f8b-1b97-4b53-806b-8d823febb862",
      "name": "Item Lists old",
      "type": "n8n-nodes-base.itemLists",
      "position": [
        1872,
        640
      ],
      "parameters": {
        "options": {},
        "fieldToSplitOut": "id"
      },
      "typeVersion": 3
    },
    {
      "id": "88d5e7d2-5ed6-4024-9713-3d9204005aff",
      "name": "Sticky Note9",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1024,
        208
      ],
      "parameters": {
        "color": 3,
        "width": 477,
        "height": 359,
        "content": "### Bug Fixes & Improvements v5\n* **Purge Folder Verification:** Fixed the way files are retrieved from the purge folder. Now, it first checks if the folder exists before attempting to delete it.\n> *Please ensure that only one folder with the name `n8n_old` exists.*\n\n\n* **Smart Date Filtering:** Updated file filtering in the purge process to delete **only files older than 30 days**. This functionality is configurable via the **Code** node and can be removed if you prefer the schedule to run and delete everything regardless of file age.\n* **Modernized Loops:** In this new version, the legacy \"Split In Batches\" node has been replaced with the modern **\"Loop Over Items\"** node.\n* **Localization:** Added a documentation section in Spanish.\n* **Enhanced Targeting:** Implemented a \"Get Current Folder\" node to strictly filter files by folder during the purge process."
      },
      "typeVersion": 1
    },
    {
      "id": "48d4773d-eaf3-47f9-9f07-eba0ef843f68",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1520,
        320
      ],
      "parameters": {
        "color": 5,
        "width": 921,
        "height": 240,
        "content": "BACKUP ALL CURRENT WORKFLOWS limit 100 (Change)\n\n* Move Binary Data: Converts data to JSON format for processing.\n* UPLOAD WORKFLOWS: Uploads up to 100 workflows to storage as a backup."
      },
      "typeVersion": 1
    },
    {
      "id": "8834bd53-b442-414e-ba82-f99666c543c7",
      "name": "Loop Over Items",
      "type": "n8n-nodes-base.splitInBatches",
      "position": [
        2032,
        112
      ],
      "parameters": {
        "options": {}
      },
      "typeVersion": 3
    },
    {
      "id": "6eeb993b-9edf-4875-99aa-03700706379e",
      "name": "Loop Over Items current",
      "type": "n8n-nodes-base.splitInBatches",
      "position": [
        2048,
        352
      ],
      "parameters": {
        "options": {}
      },
      "typeVersion": 3
    },
    {
      "id": "cc6b1faf-258c-4a55-bc6b-fccb272f7baa",
      "name": "Loop Over Items purge",
      "type": "n8n-nodes-base.splitInBatches",
      "position": [
        2048,
        592
      ],
      "parameters": {
        "options": {}
      },
      "typeVersion": 3
    },
    {
      "id": "db105a20-fc7b-4595-bfd5-f02cd3be2bb5",
      "name": "GET CURRENT FOLDER CREATES1",
      "type": "n8n-nodes-base.googleDrive",
      "onError": "continueRegularOutput",
      "position": [
        1264,
        640
      ],
      "parameters": {
        "filter": {
          "whatToSearch": "folders"
        },
        "options": {},
        "resource": "fileFolder",
        "returnAll": true,
        "queryString": "n8n_old"
      },
      "credentials": {
        "googleDriveOAuth2Api": {
          "name": "<your credential>"
        }
      },
      "executeOnce": true,
      "notesInFlow": true,
      "retryOnFail": true,
      "typeVersion": 3,
      "alwaysOutputData": true
    },
    {
      "id": "83f4ee0b-b480-49e7-809f-4fc320b2f749",
      "name": "Schedule Trigger",
      "type": "n8n-nodes-base.scheduleTrigger",
      "position": [
        64,
        80
      ],
      "parameters": {
        "rule": {
          "interval": [
            {}
          ]
        }
      },
      "typeVersion": 1.1
    },
    {
      "id": "bba95c0e-2927-46b5-bd4d-649f42fbf302",
      "name": "you can delete",
      "type": "n8n-nodes-base.code",
      "position": [
        1680,
        640
      ],
      "parameters": {
        "jsCode": "const THIRTY_DAYS_IN_MS = 30 * 24 * 60 * 60 * 1000;\nconst now = Date.now();\n\nreturn items.filter(item => {\n    // Regex para extraer la fecha del nombre del archivo\n    const match = item.json.name.match(/\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}/);\n    if (match) {\n        const fileDate = new Date(match[0]).getTime();\n        return now - fileDate > THIRTY_DAYS_IN_MS;\n    }\n    return false;\n});\n"
      },
      "typeVersion": 2
    },
    {
      "id": "cf765220-193d-4c0a-ba28-cc49b0190717",
      "name": "PURGE DAYS",
      "type": "n8n-nodes-base.scheduleTrigger",
      "position": [
        1072,
        640
      ],
      "parameters": {
        "rule": {
          "interval": [
            {
              "daysInterval": 30
            }
          ]
        }
      },
      "typeVersion": 1.1
    },
    {
      "id": "0acd9c0e-047b-4194-ad36-00249d044006",
      "name": "Sticky Note12",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        640,
        32
      ],
      "parameters": {
        "width": 150,
        "height": 210.7148610748136,
        "content": "Combines detected folder lists for processing."
      },
      "typeVersion": 1
    },
    {
      "id": "69c11b7f-58e5-45ce-9617-55718ac187e0",
      "name": "Get many workflows",
      "type": "n8n-nodes-base.n8n",
      "position": [
        1600,
        416
      ],
      "parameters": {
        "filters": {},
        "requestOptions": {}
      },
      "credentials": {
        "n8nApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "3b1ffc79-709a-4be8-bd7c-cad163fbb353",
      "name": "Sticky Note6",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -480,
        0
      ],
      "parameters": {
        "color": 3,
        "width": 461,
        "height": 775,
        "content": "### Description\nThis template creates a nightly backup of all n8n workflows and saves them to a **Google Drive** folder. Each night, the previous night's backups are moved to an \u201cn8n_old\u201d folder and renamed with the corresponding date.\n\nBackups older than a specified age are automatically deleted (this feature is active for 30 days by default, but you can remove or configure it via code if you don't want the backups to be deleted).\n\n### Prerequisites\n* **Google Drive Account:** You need OAuth2 credentials. **Get** them from the following link: [Link](https://console.cloud.google.com/apis/credentials/oauthclient/)\n* **n8n Version:** Recommended **v1.70.1** to **v2.1.4** or higher (required for the modern \"Loop Over Items\" node).\n* **n8n API Key:** **Guide** from the following link: [Link](https://witmovil.com/where-to-create-the-api-key-in-n8n/)\n* **Destination Folders:**\n* `n8n_old`\n* `n8n_backups`\n*(Note: If these don't exist, the workflow is designed to create them automatically).*\n\n### Configuration\n1. **Credentials:** Update all Google Drive nodes and the \"Get many workflows\" node with your valid credentials.\n2. **Schedule:** Edit the **Schedule Trigger** node with the desired time to run the backup.\n\n**If you want to automatically purge old backups:**\n\n1. **Set Days:** Edit the **\"you can delete\"** (Code) node to specify the age of the backups you want to delete (default is 30 days).\n2. **Activate:** Enable the **\"PURGE DAYS\"** trigger node and the 3 subsequent nodes.\n3. **Run:** Enable the workflow to run on the specified schedule."
      },
      "typeVersion": 1
    },
    {
      "id": "f48622b1-4a18-4274-84e2-b3206886dc51",
      "name": "Sticky Note11",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        32,
        432
      ],
      "parameters": {
        "color": 6,
        "width": 529,
        "height": 309,
        "content": "## Contact me\n**By Mail**: [Send Mail](mailto:nuntius.creative.hub@gmail.com)\n**By LinkedIn**: [LinkedIn](https://www.linkedin.com/in/jeyson-orozco/)\n\n### Workflow Logic\n* **Schedule Trigger**: Automatically starts the flow at scheduled intervals.\n* **GET CURRENT FOLDER**: Retrieves data from the current folder in Google Drive.\n* **Code (Verify folders)**: Checks if the folders `n8n_backups` and `n8n_old` exist. If not, triggers their creation.\n* **If n8n_backups**: Checks if the `n8n_backups` folder exists. If not, creates it.\n* **If n8n_old**: Checks if the `n8n_old` folder exists. If not, creates it."
      },
      "typeVersion": 1
    }
  ],
  "connections": {
    "Code": {
      "main": [
        [
          {
            "node": "If n8n_old",
            "type": "main",
            "index": 0
          },
          {
            "node": "If1 n8n_backups",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "If n8n_old": {
      "main": [
        [
          {
            "node": "Create n8n_old",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Merge mensage",
            "type": "main",
            "index": 1
          }
        ]
      ]
    },
    "Item Lists": {
      "main": [
        [
          {
            "node": "Loop Over Items",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "PURGE DAYS": {
      "main": [
        [
          {
            "node": "GET CURRENT FOLDER CREATES1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "IGNORE FILES": {
      "main": [
        [
          {
            "node": "GET CURRENT BACKUPS1",
            "type": "main",
            "index": 0
          },
          {
            "node": "Get many workflows",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Merge mensage": {
      "main": [
        [
          {
            "node": "GET CURRENT FOLDER CREATES",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Create n8n_old": {
      "main": [
        [
          {
            "node": "GET CURRENT FOLDER",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Item Lists old": {
      "main": [
        [
          {
            "node": "Loop Over Items purge",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "you can delete": {
      "main": [
        [
          {
            "node": "Item Lists old",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "If1 n8n_backups": {
      "main": [
        [
          {
            "node": "Create n8n_backups",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Merge mensage",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Loop Over Items": {
      "main": [
        [],
        [
          {
            "node": "MOVE INTO OLD FOLDER",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "LIST OLD BACKUPS": {
      "main": [
        [
          {
            "node": "you can delete",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Move Binary Data": {
      "main": [
        [
          {
            "node": "Loop Over Items current",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Schedule Trigger": {
      "main": [
        [
          {
            "node": "GET CURRENT FOLDER",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "UPLOAD WORKFLOWS": {
      "main": [
        [
          {
            "node": "Loop Over Items current",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "DELETE OLD BACKUP": {
      "main": [
        [
          {
            "node": "Loop Over Items purge",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Create n8n_backups": {
      "main": [
        [
          {
            "node": "GET CURRENT FOLDER",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "GET CURRENT FOLDER": {
      "main": [
        [
          {
            "node": "Code",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get many workflows": {
      "main": [
        [
          {
            "node": "Move Binary Data",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "GET CURRENT BACKUPS1": {
      "main": [
        [
          {
            "node": "Item Lists",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "MOVE INTO OLD FOLDER": {
      "main": [
        [
          {
            "node": "Loop Over Items",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Loop Over Items purge": {
      "main": [
        [],
        [
          {
            "node": "DELETE OLD BACKUP",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Loop Over Items current": {
      "main": [
        [],
        [
          {
            "node": "UPLOAD WORKFLOWS",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "GET CURRENT FOLDER CREATES": {
      "main": [
        [
          {
            "node": "IGNORE FILES",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "GET CURRENT FOLDER CREATES1": {
      "main": [
        [
          {
            "node": "LIST OLD BACKUPS",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}