{
  "name": "Automated workflow backups from self-hosted n8n to Google Drive with version history",
  "nodes": [
    {
      "id": "4c586a42-d1a9-4ce5-a88a-c06af6c9f868",
      "name": "Loop Over Data",
      "type": "n8n-nodes-base.splitInBatches",
      "position": [
        -40,
        1760
      ]
    },
    {
      "id": "e9d58b37-cd4d-4745-a076-4d9b32b3f7ce",
      "name": "Schedule Trigger",
      "type": "n8n-nodes-base.scheduleTrigger",
      "position": [
        -440,
        1760
      ]
    },
    {
      "id": "a81a639f-ccd2-4121-a44c-5fdb3bc5adca",
      "name": "Get all n8n Workflow",
      "type": "n8n-nodes-base.n8n",
      "position": [
        -260,
        1760
      ]
    },
    {
      "id": "51a9cf22-6930-4e12-ad85-6d21492a3077",
      "name": "Append row in sheet",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        500,
        1720
      ]
    },
    {
      "id": "0bd83570-28b1-4c15-82a7-bc8399d1fccd",
      "name": "Store File in Subfolder",
      "type": "n8n-nodes-base.googleDrive",
      "position": [
        460,
        2000
      ]
    },
    {
      "id": "70d06585-57d8-42c3-847e-95b4e34d1652",
      "name": "Search Subfolder",
      "type": "n8n-nodes-base.googleDrive",
      "position": [
        880,
        1740
      ]
    },
    {
      "id": "3d8f6803-ddac-4d5e-8a6b-59965ba01f08",
      "name": "If Exit",
      "type": "n8n-nodes-base.if",
      "position": [
        -380,
        2040
      ]
    },
    {
      "id": "d09a373b-4882-483c-910f-f68699b98c9e",
      "name": "Create SubFolder",
      "type": "n8n-nodes-base.googleDrive",
      "position": [
        -200,
        2080
      ]
    },
    {
      "id": "e4e8ffcd-c56c-420c-83a6-c720a06878f2",
      "name": "Get n8n File",
      "type": "n8n-nodes-base.code",
      "position": [
        280,
        2000
      ]
    },
    {
      "id": "9798b124-192f-42c1-b196-fd50fc46c71d",
      "name": "Set Subfolder Id",
      "type": "n8n-nodes-base.set",
      "position": [
        80,
        2000
      ]
    },
    {
      "id": "e37485da-b923-4d89-ac7e-f98e57d35220",
      "name": "Append or update row in sheet",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        700,
        2000
      ]
    },
    {
      "id": "d52e4cdc-7181-4d10-91fe-0da3da9b3da4",
      "name": "If Updated Date Changed",
      "type": "n8n-nodes-base.if",
      "position": [
        -180,
        1920
      ]
    },
    {
      "id": "1298d79b-d3c7-43c0-b2fd-e24cc82207aa",
      "name": "If not Exits",
      "type": "n8n-nodes-base.if",
      "position": [
        320,
        1760
      ]
    },
    {
      "id": "77c71084-44ee-405a-a1e2-9b1d1668f05f",
      "name": "Get Flow Record",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        700,
        1740
      ]
    },
    {
      "id": "b41d7294-9e47-4984-9d4b-a6a7b681cac3",
      "name": "Sticky Note7",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -420,
        1300
      ],
      "parameters": {
        "width": 540,
        "height": 420,
        "content": "## Setup Steps\n\n### API Configuration \n1. **Google Drive Integration**:\n   - Set up Google Drive OAuth2 credentials in n8n.\n   - Specify the root folder or desired location for backups.\n2. **n8n API A"
      }
    },
    {
      "id": "65f84929-89f2-448d-a1d9-4757043b9740",
      "name": "Get Exits Workflow",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        140,
        1760
      ]
    }
  ],
  "connections": {
    "If Exit": {
      "main": [
        [
          {
            "node": "If Updated Date Changed",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Create SubFolder",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get n8n File": {
      "main": [
        [
          {
            "node": "Store File in Subfolder",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "If not Exits": {
      "main": [
        [
          {
            "node": "Append row in sheet",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Get Flow Record",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Loop Over Data": {
      "main": [
        [],
        [
          {
            "node": "Get Exits Workflow",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get Flow Record": {
      "main": [
        [
          {
            "node": "Search Subfolder",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Create SubFolder": {
      "main": [
        [
          {
            "node": "Set Subfolder Id",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Schedule Trigger": {
      "main": [
        [
          {
            "node": "Get all n8n Workflow",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Search Subfolder": {
      "main": [
        [
          {
            "node": "If Exit",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Set Subfolder Id": {
      "main": [
        [
          {
            "node": "Get n8n File",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get Exits Workflow": {
      "main": [
        [
          {
            "node": "If not Exits",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Append row in sheet": {
      "main": [
        [
          {
            "node": "Get Flow Record",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get all n8n Workflow": {
      "main": [
        [
          {
            "node": "Loop Over Data",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "If Updated Date Changed": {
      "main": [
        [
          {
            "node": "Set Subfolder Id",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Loop Over Data",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Store File in Subfolder": {
      "main": [
        [
          {
            "node": "Append or update row in sheet",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Append or update row in sheet": {
      "main": [
        [
          {
            "node": "Loop Over Data",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}