{
  "name": "Backup your credentials to GitHub",
  "nodes": [
    {
      "id": "5f0808df-f64a-47aa-9c31-b3485cc4d6ed",
      "name": "On clicking 'execute'",
      "type": "n8n-nodes-base.manualTrigger",
      "position": [
        160,
        120
      ]
    },
    {
      "id": "9dd14ece-51b3-482a-af39-3908a86ad891",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -280,
        500
      ],
      "parameters": {
        "width": 2086.845881354743,
        "height": 750.8363163824032,
        "content": "## Subworkflow"
      }
    },
    {
      "id": "2bbda042-9284-41a4-95aa-a47651055a4b",
      "name": "Return",
      "type": "n8n-nodes-base.set",
      "position": [
        1600,
        700
      ]
    },
    {
      "id": "cde527d1-7f25-47d6-9e1b-9e95245af248",
      "name": "Get File",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        700,
        580
      ]
    },
    {
      "id": "7825d494-8dff-4ea2-ae9e-0b906abe340d",
      "name": "If file too large",
      "type": "n8n-nodes-base.if",
      "position": [
        500,
        600
      ]
    },
    {
      "id": "e1fc0479-a2bb-4a03-b687-2376198f0368",
      "name": "Merge Items",
      "type": "n8n-nodes-base.merge",
      "position": [
        500,
        860
      ]
    },
    {
      "id": "662103f0-ed07-4999-a6a4-5feb9c021c6e",
      "name": "isDiffOrNew",
      "type": "n8n-nodes-base.code",
      "position": [
        700,
        860
      ]
    },
    {
      "id": "e9ca2b26-3dfc-401a-b51d-8b869af71b62",
      "name": "Check Status",
      "type": "n8n-nodes-base.switch",
      "position": [
        920,
        860
      ]
    },
    {
      "id": "bcfbe9e2-a401-4359-add8-87327aaab702",
      "name": "Same file - Do nothing",
      "type": "n8n-nodes-base.noOp",
      "position": [
        1140,
        700
      ]
    },
    {
      "id": "ba399158-6065-437c-a162-f9f8368a51de",
      "name": "File is different",
      "type": "n8n-nodes-base.noOp",
      "position": [
        1140,
        860
      ]
    },
    {
      "id": "884bf028-a136-4eb5-a743-2e98c134e0f7",
      "name": "File is new",
      "type": "n8n-nodes-base.noOp",
      "position": [
        1140,
        1020
      ]
    },
    {
      "id": "f0c0cf41-4add-4a2b-a790-630049e3c916",
      "name": "Create new file",
      "type": "n8n-nodes-base.github",
      "position": [
        1360,
        1020
      ]
    },
    {
      "id": "ef69d5ff-b6d3-4b0b-9ae8-adcee91a1940",
      "name": "Edit existing file",
      "type": "n8n-nodes-base.github",
      "position": [
        1360,
        840
      ]
    },
    {
      "id": "b7116171-8bbf-4a30-8010-15599514e2e0",
      "name": "Loop Over Items",
      "type": "n8n-nodes-base.splitInBatches",
      "position": [
        760,
        220
      ]
    },
    {
      "id": "760a3235-4b46-45b5-a732-a1a520c6d548",
      "name": "Schedule Trigger",
      "type": "n8n-nodes-base.scheduleTrigger",
      "position": [
        160,
        320
      ]
    },
    {
      "id": "a66d0ba8-6265-43f2-89fc-69a2a3d713af",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -280,
        -140
      ],
      "parameters": {
        "width": 365.19481715599653,
        "height": 596.4810912485963,
        "content": "## Backup to GitHub \nThis workflow will backup all instance credentials 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- **re"
      }
    },
    {
      "id": "5433b0f7-dd3b-4abc-8323-4ce1e0653220",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        120,
        40
      ],
      "parameters": {
        "width": 1028.7522287279464,
        "height": 434.88564057365943,
        "content": "## Main workflow loop"
      }
    },
    {
      "id": "cff04e4b-5d05-47da-b4d4-3cdb2cebfdcf",
      "name": "Get file data",
      "type": "n8n-nodes-base.github",
      "position": [
        300,
        600
      ]
    },
    {
      "id": "c5754c58-05dd-4f56-ba9a-395411ec1cd7",
      "name": "Globals",
      "type": "n8n-nodes-base.set",
      "position": [
        100,
        760
      ]
    },
    {
      "id": "659840b2-e9b5-4a98-a5f1-ec8dac62a575",
      "name": "Execute Command",
      "type": "n8n-nodes-base.executeCommand",
      "position": [
        380,
        220
      ]
    },
    {
      "id": "ee07f1af-6956-4a01-b1ee-4a86cf2eba05",
      "name": "JSON formatting",
      "type": "n8n-nodes-base.code",
      "position": [
        560,
        220
      ]
    },
    {
      "id": "75f943f4-b471-4700-954b-7fc28ec1a9bb",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        60,
        660
      ],
      "parameters": {
        "width": 150,
        "height": 80,
        "content": "## Edit this node 👇"
      }
    },
    {
      "id": "34af4b94-c034-489e-9575-3e80593f901d",
      "name": "Execute Workflow",
      "type": "n8n-nodes-base.executeWorkflow",
      "position": [
        980,
        220
      ]
    },
    {
      "id": "dc08a60e-41ae-48de-80fa-053d037a0e9b",
      "name": "Execute Workflow Trigger",
      "type": "n8n-nodes-base.executeWorkflowTrigger",
      "position": [
        -180,
        880
      ]
    },
    {
      "id": "ae4c8015-ca9c-42f5-a618-161ba2667dcf",
      "name": "Sticky Note16",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        120,
        -140
      ],
      "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": {
    "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
          }
        ]
      ]
    },
    "Execute Command": {
      "main": [
        [
          {
            "node": "JSON formatting",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "JSON formatting": {
      "main": [
        [
          {
            "node": "Loop Over Items",
            "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": "Execute Command",
            "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": "Execute Command",
            "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
          }
        ]
      ]
    }
  }
}