{
  "name": "Backup your workflows to GitHub",
  "nodes": [
    {
      "id": "a132fc4c-b651-4ca1-8c36-c925188835db",
      "name": "On clicking 'execute'",
      "type": "n8n-nodes-base.manualTrigger",
      "position": [
        320,
        60
      ]
    },
    {
      "id": "9a3870e1-e79d-461e-885a-f2e79d76f4e1",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -120,
        440
      ],
      "parameters": {
        "width": 2086.845881354743,
        "height": 750.8363163824032,
        "content": "## Subworkflow"
      }
    },
    {
      "id": "afaf95c7-5f2b-4ae2-a7de-8730f839d79f",
      "name": "n8n",
      "type": "n8n-nodes-base.n8n",
      "position": [
        580,
        160
      ]
    },
    {
      "id": "e582f9cb-10e0-44c5-ab9b-b5e20aa49ced",
      "name": "Return",
      "type": "n8n-nodes-base.set",
      "position": [
        1760,
        640
      ]
    },
    {
      "id": "3d0b2d17-0e05-4139-b99c-e1cb862f2f9b",
      "name": "Get File",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        860,
        520
      ]
    },
    {
      "id": "9dcdd75d-671a-4a85-8618-2fbbd8158a86",
      "name": "If file too large",
      "type": "n8n-nodes-base.if",
      "position": [
        660,
        540
      ]
    },
    {
      "id": "1b6153ae-797a-4e3d-80c6-01467809b9ec",
      "name": "Merge Items",
      "type": "n8n-nodes-base.merge",
      "position": [
        660,
        800
      ]
    },
    {
      "id": "edba838c-2d9d-45e9-b4f7-340209dfec8d",
      "name": "isDiffOrNew",
      "type": "n8n-nodes-base.code",
      "position": [
        860,
        800
      ]
    },
    {
      "id": "4f4193f2-bb76-4af7-8a6a-c15e29732208",
      "name": "Check Status",
      "type": "n8n-nodes-base.switch",
      "position": [
        1080,
        800
      ]
    },
    {
      "id": "1c31cc43-48a3-4716-82a8-6a920662c0ed",
      "name": "Same file - Do nothing",
      "type": "n8n-nodes-base.noOp",
      "position": [
        1300,
        640
      ]
    },
    {
      "id": "c24abb49-6a5e-41db-9e32-0efd682bb440",
      "name": "File is different",
      "type": "n8n-nodes-base.noOp",
      "position": [
        1300,
        800
      ]
    },
    {
      "id": "f2ec4b61-8193-49e4-829b-e42bcaafef08",
      "name": "File is new",
      "type": "n8n-nodes-base.noOp",
      "position": [
        1300,
        960
      ]
    },
    {
      "id": "af0d0e28-5ed7-4ab8-b1a4-e78567cdc747",
      "name": "Create new file",
      "type": "n8n-nodes-base.github",
      "position": [
        1520,
        960
      ]
    },
    {
      "id": "f75605ee-10e8-4d45-b6c6-af2eb9b87a5b",
      "name": "Edit existing file",
      "type": "n8n-nodes-base.github",
      "position": [
        1520,
        780
      ]
    },
    {
      "id": "124e721b-6eac-476f-aa6d-edfe0dc6afa1",
      "name": "Loop Over Items",
      "type": "n8n-nodes-base.splitInBatches",
      "position": [
        780,
        160
      ]
    },
    {
      "id": "132608d5-dc5e-4a11-9955-331b482fe442",
      "name": "Schedule Trigger",
      "type": "n8n-nodes-base.scheduleTrigger",
      "position": [
        320,
        260
      ]
    },
    {
      "id": "5ca560c0-b281-4bea-95bd-c8decd2bb8ee",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -120,
        -200
      ],
      "parameters": {
        "width": 371,
        "height": 601,
        "content": "## Backup to GitHub \nThis workflow will backup all instance workflows to GitHub.\n\nThe files are saved `ID.json` for the filename.\n\n### Setup\nOpen `Globals` node and update the values below 👇\n\n- **repo"
      }
    },
    {
      "id": "26e38d41-f253-4fa2-964f-54f8b468d211",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        280,
        -20
      ],
      "parameters": {
        "width": 886,
        "height": 435,
        "content": "## Main workflow loop"
      }
    },
    {
      "id": "0dfdc6cc-616e-447a-b1cb-45f116894509",
      "name": "Get file data",
      "type": "n8n-nodes-base.github",
      "position": [
        460,
        540
      ]
    },
    {
      "id": "351f9282-202a-4984-89b3-020c981b309f",
      "name": "Globals",
      "type": "n8n-nodes-base.set",
      "position": [
        240,
        700
      ]
    },
    {
      "id": "ffe9f716-11de-46b0-8221-ab4addc6ea1c",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        200,
        600
      ],
      "parameters": {
        "width": 150,
        "height": 80,
        "content": "## Edit this node 👇"
      }
    },
    {
      "id": "72616fc1-1c21-4f17-862c-2838636437ec",
      "name": "Execute Workflow Trigger",
      "type": "n8n-nodes-base.executeWorkflowTrigger",
      "position": [
        -40,
        820
      ]
    },
    {
      "id": "9496f6d1-1fcb-4b31-9a80-8f0c15c426f8",
      "name": "Execute Workflow",
      "type": "n8n-nodes-base.executeWorkflow",
      "position": [
        1000,
        160
      ]
    },
    {
      "id": "015a5f28-d1ff-4e3b-a303-6d143c7326b1",
      "name": "Sticky Note16",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        280,
        -200
      ],
      "parameters": {
        "width": 640,
        "height": null,
        "content": "### 💡 **Want to learn advanced n8n skills and earn money building workflows?**\n‎ ‎ ‎ ‎ ‎ ‎ ‎ ‎Check out [Scrapes Academy](https://www.skool.com/scrapes/about?ref=21f10ad99f4d46ba9b8aaea8c9f58c34)"
      }
    }
  ],
  "connections": {
    "n8n": {
      "main": [
        [
          {
            "node": "Loop Over Items",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Globals": {
      "main": [
        [
          {
            "node": "Get file data",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get File": {
      "main": [
        [
          {
            "node": "Merge Items",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "File is new": {
      "main": [
        [
          {
            "node": "Create new file",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Merge Items": {
      "main": [
        [
          {
            "node": "isDiffOrNew",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "isDiffOrNew": {
      "main": [
        [
          {
            "node": "Check Status",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Check Status": {
      "main": [
        [
          {
            "node": "Same file - Do nothing",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "File is different",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "File is new",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get file data": {
      "main": [
        [
          {
            "node": "If file too large",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Create new file": {
      "main": [
        [
          {
            "node": "Return",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Loop Over Items": {
      "main": [
        [],
        [
          {
            "node": "Execute Workflow",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Execute Workflow": {
      "main": [
        [
          {
            "node": "Loop Over Items",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Schedule Trigger": {
      "main": [
        [
          {
            "node": "n8n",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "File is different": {
      "main": [
        [
          {
            "node": "Edit existing file",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "If file too large": {
      "main": [
        [
          {
            "node": "Get File",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Merge Items",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Edit existing file": {
      "main": [
        [
          {
            "node": "Return",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "On clicking 'execute'": {
      "main": [
        [
          {
            "node": "n8n",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Same file - Do nothing": {
      "main": [
        [
          {
            "node": "Return",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Execute Workflow Trigger": {
      "main": [
        [
          {
            "node": "Globals",
            "type": "main",
            "index": 0
          },
          {
            "node": "Merge Items",
            "type": "main",
            "index": 1
          }
        ]
      ]
    }
  }
}