{
  "name": "Automatic workflow & credentials backup to GitHub with change detection",
  "nodes": [
    {
      "id": "6f0fcaed-fd41-4ac4-816d-41098539f42a",
      "name": "Schedule Trigger",
      "type": "n8n-nodes-base.scheduleTrigger",
      "position": [
        -1900,
        -180
      ]
    },
    {
      "id": "1211ee7a-03d1-4a00-9759-bc0402d3686c",
      "name": "Get New Workflow Hash",
      "type": "n8n-nodes-base.executeWorkflow",
      "position": [
        -1020,
        -280
      ]
    },
    {
      "id": "d655d400-d743-4dd8-8b05-12701c8c4f9d",
      "name": "Get Old Workflow Hash",
      "type": "n8n-nodes-base.executeWorkflow",
      "position": [
        -1460,
        -280
      ]
    },
    {
      "id": "0d13634a-f74a-4194-8a54-9531205d0883",
      "name": "Read Workflow Data",
      "type": "n8n-nodes-base.readWriteFile",
      "position": [
        -580,
        -280
      ]
    },
    {
      "id": "cfa7d2e0-e63d-4392-899d-13fd2b587a15",
      "name": "Set Workflow Path",
      "type": "n8n-nodes-base.set",
      "position": [
        -1680,
        -280
      ]
    },
    {
      "id": "5b5250ed-c3de-431f-8e4b-c8b6a6352393",
      "name": "Execute Workflow Backup",
      "type": "n8n-nodes-base.executeCommand",
      "position": [
        -1240,
        -280
      ]
    },
    {
      "id": "510d346d-2eec-4839-aa99-6d61cc00573a",
      "name": "Read File",
      "type": "n8n-nodes-base.readWriteFile",
      "position": [
        -1680,
        -540
      ]
    },
    {
      "id": "9ce2b61a-d4cd-46f5-a20b-02cbb864c259",
      "name": "Extract Data",
      "type": "n8n-nodes-base.extractFromFile",
      "position": [
        -1460,
        -540
      ]
    },
    {
      "id": "381e022a-f265-4a07-9a49-27f401cc08d3",
      "name": "Hash Data",
      "type": "n8n-nodes-base.crypto",
      "position": [
        -1240,
        -540
      ]
    },
    {
      "id": "73d5f6a5-a4ee-49f9-ba5f-2646887daf9b",
      "name": "Hash Maker",
      "type": "n8n-nodes-base.executeWorkflowTrigger",
      "position": [
        -1900,
        -540
      ]
    },
    {
      "id": "78bd1ed8-0c19-4106-ab84-1d25f0f4b806",
      "name": "Extract Workflow Data",
      "type": "n8n-nodes-base.extractFromFile",
      "position": [
        -360,
        -280
      ]
    },
    {
      "id": "740fd3e5-f356-436c-ad2b-86da10fb346d",
      "name": "GitHub Workflow Backup",
      "type": "n8n-nodes-base.github",
      "position": [
        -140,
        -280
      ]
    },
    {
      "id": "dc2e73a2-36d8-4d92-947f-b3d01fac934d",
      "name": "Get New Credential Hash",
      "type": "n8n-nodes-base.executeWorkflow",
      "position": [
        -1020,
        -80
      ]
    },
    {
      "id": "b5512300-5bb4-4781-9d5b-3b61a90d7220",
      "name": "Get Old Credential Hash",
      "type": "n8n-nodes-base.executeWorkflow",
      "position": [
        -1460,
        -80
      ]
    },
    {
      "id": "ef1807a5-8d7c-4d05-b819-a433d495ca36",
      "name": "Read Credential Data",
      "type": "n8n-nodes-base.readWriteFile",
      "position": [
        -580,
        -80
      ]
    },
    {
      "id": "ceaa31cb-bfff-43b6-9433-7d1e124d6d86",
      "name": "Set Credential Path",
      "type": "n8n-nodes-base.set",
      "position": [
        -1680,
        -80
      ]
    },
    {
      "id": "babf93ca-cd95-4a38-9ecc-c16ffbd48dc0",
      "name": "Execute Credential Backup",
      "type": "n8n-nodes-base.executeCommand",
      "position": [
        -1240,
        -80
      ]
    },
    {
      "id": "d2c8c228-d276-44f7-831b-611d05610e8f",
      "name": "Extract Credential Data",
      "type": "n8n-nodes-base.extractFromFile",
      "position": [
        -360,
        -80
      ]
    },
    {
      "id": "1f94c09d-26aa-444b-b607-1366b7ffc4d0",
      "name": "GitHub Credential Backup",
      "type": "n8n-nodes-base.github",
      "position": [
        -140,
        -80
      ]
    },
    {
      "id": "a1a606b2-a0d7-4d9c-98b1-4657b902fccd",
      "name": "If Workflow Updated",
      "type": "n8n-nodes-base.if",
      "position": [
        -800,
        -280
      ]
    },
    {
      "id": "a6809c8d-ccd9-4acf-9854-b6a36e74c439",
      "name": "If Credential Updated",
      "type": "n8n-nodes-base.if",
      "position": [
        -800,
        -80
      ]
    }
  ],
  "connections": {
    "Hash Data": {
      "main": [
        []
      ]
    },
    "Read File": {
      "main": [
        [
          {
            "node": "Extract Data",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Hash Maker": {
      "main": [
        [
          {
            "node": "Read File",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Extract Data": {
      "main": [
        [
          {
            "node": "Hash Data",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Schedule Trigger": {
      "main": [
        [
          {
            "node": "Set Workflow Path",
            "type": "main",
            "index": 0
          },
          {
            "node": "Set Credential Path",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Set Workflow Path": {
      "main": [
        [
          {
            "node": "Get Old Workflow Hash",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Read Workflow Data": {
      "main": [
        [
          {
            "node": "Extract Workflow Data",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "If Workflow Updated": {
      "main": [
        [
          {
            "node": "Read Workflow Data",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Set Credential Path": {
      "main": [
        [
          {
            "node": "Get Old Credential Hash",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Read Credential Data": {
      "main": [
        [
          {
            "node": "Extract Credential Data",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Extract Workflow Data": {
      "main": [
        [
          {
            "node": "GitHub Workflow Backup",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get New Workflow Hash": {
      "main": [
        [
          {
            "node": "If Workflow Updated",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get Old Workflow Hash": {
      "main": [
        [
          {
            "node": "Execute Workflow Backup",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "If Credential Updated": {
      "main": [
        [
          {
            "node": "Read Credential Data",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Execute Workflow Backup": {
      "main": [
        [
          {
            "node": "Get New Workflow Hash",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Extract Credential Data": {
      "main": [
        [
          {
            "node": "GitHub Credential Backup",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get New Credential Hash": {
      "main": [
        [
          {
            "node": "If Credential Updated",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get Old Credential Hash": {
      "main": [
        [
          {
            "node": "Execute Credential Backup",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Execute Credential Backup": {
      "main": [
        [
          {
            "node": "Get New Credential Hash",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}