{
  "name": "Track n8n workflow changes over time with compare dataset & Google Sheets",
  "nodes": [
    {
      "id": "f2bb0773-754c-4535-99c0-14617221f64b",
      "name": "Schedule Trigger",
      "type": "n8n-nodes-base.scheduleTrigger",
      "position": [
        -1100,
        100
      ]
    },
    {
      "id": "828cb1c8-f92a-4129-a6eb-4597ea809953",
      "name": "Get Row",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        -100,
        100
      ]
    },
    {
      "id": "6511415e-afa9-439c-b417-944c69b2c691",
      "name": "Row Exists?",
      "type": "n8n-nodes-base.if",
      "position": [
        80,
        100
      ]
    },
    {
      "id": "1791d64d-fbb1-4143-8925-f2d3dd15e645",
      "name": "Create New Entry",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        280,
        280
      ]
    },
    {
      "id": "56eacb4e-8c1d-454e-926b-3e91efc23639",
      "name": "Compare Datasets",
      "type": "n8n-nodes-base.compareDatasets",
      "position": [
        -280,
        780
      ]
    },
    {
      "id": "1357e5ee-e456-4e71-8a84-1fbe22e879bf",
      "name": "Current State",
      "type": "n8n-nodes-base.set",
      "position": [
        780,
        -20
      ]
    },
    {
      "id": "6f97fba9-82d1-43b4-a51d-3bf9955a8d60",
      "name": "Previous State",
      "type": "n8n-nodes-base.set",
      "position": [
        600,
        -20
      ]
    },
    {
      "id": "d50929da-1948-4283-a19d-4973d9c74acd",
      "name": "Loop Over Items",
      "type": "n8n-nodes-base.splitInBatches",
      "position": [
        -500,
        100
      ]
    },
    {
      "id": "2ec9bffd-4da4-41e5-9bb1-f2e1ace7db17",
      "name": "Added Nodes",
      "type": "n8n-nodes-base.aggregate",
      "position": [
        -20,
        580
      ]
    },
    {
      "id": "2f07ae8b-fea4-4e01-bfae-0b9a689662bf",
      "name": "Same Nodes",
      "type": "n8n-nodes-base.aggregate",
      "position": [
        -20,
        720
      ]
    },
    {
      "id": "53e3083c-cf50-4361-bb70-bb6f1498c5b4",
      "name": "Different Nodes",
      "type": "n8n-nodes-base.aggregate",
      "position": [
        -20,
        880
      ]
    },
    {
      "id": "e28eb560-0fae-43a4-9e1f-1c8346d18ac0",
      "name": "Removed Nodes",
      "type": "n8n-nodes-base.aggregate",
      "position": [
        -20,
        1020
      ]
    },
    {
      "id": "c08719a3-b81a-4ee2-a6b8-d0463f70ccfe",
      "name": "Report Nodes",
      "type": "n8n-nodes-base.set",
      "position": [
        420,
        1000
      ]
    },
    {
      "id": "900b67e3-465e-4e1d-8003-bdb312307569",
      "name": "Compare Datasets1",
      "type": "n8n-nodes-base.compareDatasets",
      "position": [
        -280,
        1420
      ]
    },
    {
      "id": "63e56c07-510e-4d28-a799-889cf94ef927",
      "name": "Added Connections",
      "type": "n8n-nodes-base.aggregate",
      "position": [
        -20,
        1220
      ]
    },
    {
      "id": "42e3117e-2539-4667-bc99-263d46526fb4",
      "name": "Same Connections",
      "type": "n8n-nodes-base.aggregate",
      "position": [
        -20,
        1360
      ]
    },
    {
      "id": "cc09e996-b3af-4436-8eb2-8849745f3f76",
      "name": "Different Connections",
      "type": "n8n-nodes-base.aggregate",
      "position": [
        -20,
        1520
      ]
    },
    {
      "id": "658b2c72-8ff7-41c2-b4f9-a09109a408d9",
      "name": "Removed Connections",
      "type": "n8n-nodes-base.aggregate",
      "position": [
        -20,
        1660
      ]
    },
    {
      "id": "ca385cad-e275-4c5a-a880-9ac2ae0f1cf1",
      "name": "Report Connections",
      "type": "n8n-nodes-base.set",
      "position": [
        420,
        1220
      ]
    },
    {
      "id": "331d7764-752d-4b18-9b41-5c5f98997e13",
      "name": "Merge Nodes Diff",
      "type": "n8n-nodes-base.merge",
      "position": [
        200,
        780
      ]
    },
    {
      "id": "97a3ce94-acbb-40bd-b360-5891c62fbdfa",
      "name": "Merge Connections Diff",
      "type": "n8n-nodes-base.merge",
      "position": [
        200,
        1420
      ]
    },
    {
      "id": "ffe4301e-ad39-40e0-ae5b-c3ce3ed1cc32",
      "name": "Merge Reports",
      "type": "n8n-nodes-base.merge",
      "position": [
        640,
        1120
      ]
    },
    {
      "id": "0999ab7d-8227-4e6e-a08f-9821d806bd8e",
      "name": "Has UpdatedAt Changed?",
      "type": "n8n-nodes-base.if",
      "position": [
        280,
        100
      ]
    },
    {
      "id": "f37d8fd6-cad6-4504-ae67-7172732b95ad",
      "name": "When Executed by Another Workflow",
      "type": "n8n-nodes-base.executeWorkflowTrigger",
      "position": [
        -1060,
        1120
      ]
    },
    {
      "id": "c9930943-9348-469c-a500-2e06973b96b1",
      "name": "Switch",
      "type": "n8n-nodes-base.switch",
      "position": [
        -860,
        1120
      ]
    },
    {
      "id": "ec179774-ef5c-4e37-8476-ddfa7a32ed8b",
      "name": "Split Conn Previous",
      "type": "n8n-nodes-base.splitOut",
      "position": [
        -500,
        1400
      ]
    },
    {
      "id": "85ca03c4-8eb1-4477-8249-5f1d2235230f",
      "name": "Split Conn Current",
      "type": "n8n-nodes-base.splitOut",
      "position": [
        -500,
        1220
      ]
    },
    {
      "id": "7d54b755-8402-40b6-8410-2f4010dc0c1a",
      "name": "Split Nodes Current",
      "type": "n8n-nodes-base.splitOut",
      "position": [
        -500,
        860
      ]
    },
    {
      "id": "2b7f1d6c-04ae-4e96-8004-2b91d94aa7fb",
      "name": "Split Nodes Previous",
      "type": "n8n-nodes-base.splitOut",
      "position": [
        -500,
        1020
      ]
    },
    {
      "id": "7885842f-23b4-4963-85b3-ab24a536a645",
      "name": "Calculate Template Diffs",
      "type": "n8n-nodes-base.executeWorkflow",
      "position": [
        960,
        -20
      ]
    },
    {
      "id": "155f0a4f-627a-43b8-824c-929d521dd2b8",
      "name": "Update Entry",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        1580,
        -20
      ]
    },
    {
      "id": "e16b0e69-5eee-4b51-9a5e-a653833a5d26",
      "name": "Get Values",
      "type": "n8n-nodes-base.set",
      "position": [
        -280,
        100
      ]
    },
    {
      "id": "f98f2311-879c-4cfa-8498-dbd5d063f7a4",
      "name": "set non-update response",
      "type": "n8n-nodes-base.set",
      "position": [
        1600,
        280
      ]
    },
    {
      "id": "b02b7552-68d4-40fc-a237-5a5d101a8d37",
      "name": "Set Response",
      "type": "n8n-nodes-base.set",
      "position": [
        1820,
        280
      ]
    },
    {
      "id": "ff36d209-0b29-443f-9dc8-33024ed9fa81",
      "name": "Has Node or Connection Updates?",
      "type": "n8n-nodes-base.if",
      "position": [
        1340,
        -20
      ]
    },
    {
      "id": "89fbe71d-dd20-4b07-a203-c7ffb77750a7",
      "name": "GSheets Rate Limit",
      "type": "n8n-nodes-base.wait",
      "position": [
        2020,
        280
      ]
    },
    {
      "id": "9994e65f-2825-4ad8-9ce7-bcc9745c6346",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1200,
        -100
      ],
      "parameters": {
        "width": 520,
        "height": 400,
        "content": "## 1. Get Workflows To Track\n[Learn more about the n8n node](https://docs.n8n.io/integrations/builtin/core-nodes/n8n-nodes-base.n8n/)\n\nTo start, we'll need the json templates of the workflows that exi"
      }
    },
    {
      "id": "47202dc8-880d-48e4-b58a-a681d7dc56a2",
      "name": "Get All Workflows",
      "type": "n8n-nodes-base.n8n",
      "position": [
        -880,
        100
      ]
    },
    {
      "id": "d1c2137f-2ac9-47a9-998d-6e17c8492793",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -620,
        -100
      ],
      "parameters": {
        "width": 1080,
        "height": 620,
        "content": "## 2. Create GSheet Entry If Workflow is New\n[Read more about the loop node](https://docs.n8n.io/integrations/builtin/core-nodes/n8n-nodes-base.splitinbatches)\n\nNext, we'll need to determine which wor"
      }
    },
    {
      "id": "d4fa75b8-f1be-4dfd-994e-7458ef945016",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        500,
        -200
      ],
      "parameters": {
        "width": 680,
        "height": 380,
        "content": "## 3. Calculate Changes Since Last Update\n[Read more about the Execute Workflow node](https://docs.n8n.io/integrations/builtin/core-nodes/n8n-nodes-base.executeworkflow/)\n\nIf a previous version exists"
      }
    },
    {
      "id": "c0044b95-e9ed-40ba-b602-ef7822637773",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1220,
        -200
      ],
      "parameters": {
        "width": 580,
        "height": 380,
        "content": "## 5. Update GSheet Entry with Changes\n[Read more about the Google Sheets node](https://docs.n8n.io/integrations/builtin/app-nodes/n8n-nodes-base.googlesheets)\n\nThe resulting list of changes of the wo"
      }
    },
    {
      "id": "7a83901c-3ed0-41c2-8f81-55d1508d0f94",
      "name": "Sticky Note4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1200,
        840
      ],
      "parameters": {
        "width": 600,
        "height": 220,
        "content": "## 4. Calculate Differences in Nodes & Connections\n[Learn more about the Compare Datasets node](https://docs.n8n.io/integrations/builtin/core-nodes/n8n-nodes-base.comparedatasets)\n\nOur comparison focu"
      }
    },
    {
      "id": "49553752-1bba-44d1-ab92-4a4130dfa388",
      "name": "Sticky Note5",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1660,
        -280
      ],
      "parameters": {
        "width": 420,
        "height": 960,
        "content": "## Try It Out!\n### This n8n template runs daily to track and report on any changes to available workflows on an n8n instance.\n\nUseful if a team is working within a single instance and you want to be n"
      }
    }
  ],
  "connections": {
    "Switch": {
      "main": [
        [
          {
            "node": "Split Nodes Current",
            "type": "main",
            "index": 0
          },
          {
            "node": "Split Nodes Previous",
            "type": "main",
            "index": 0
          },
          {
            "node": "Split Conn Current",
            "type": "main",
            "index": 0
          },
          {
            "node": "Split Conn Previous",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get Row": {
      "main": [
        [
          {
            "node": "Row Exists?",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get Values": {
      "main": [
        [
          {
            "node": "Get Row",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Same Nodes": {
      "main": [
        [
          {
            "node": "Merge Nodes Diff",
            "type": "main",
            "index": 1
          }
        ]
      ]
    },
    "Added Nodes": {
      "main": [
        [
          {
            "node": "Merge Nodes Diff",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Row Exists?": {
      "main": [
        [
          {
            "node": "Has UpdatedAt Changed?",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Create New Entry",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Report Nodes": {
      "main": [
        [
          {
            "node": "Merge Reports",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Set Response": {
      "main": [
        [
          {
            "node": "GSheets Rate Limit",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Update Entry": {
      "main": [
        [
          {
            "node": "Set Response",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Current State": {
      "main": [
        [
          {
            "node": "Calculate Template Diffs",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Removed Nodes": {
      "main": [
        [
          {
            "node": "Merge Nodes Diff",
            "type": "main",
            "index": 3
          }
        ]
      ]
    },
    "Previous State": {
      "main": [
        [
          {
            "node": "Current State",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Different Nodes": {
      "main": [
        [
          {
            "node": "Merge Nodes Diff",
            "type": "main",
            "index": 2
          }
        ]
      ]
    },
    "Loop Over Items": {
      "main": [
        [],
        [
          {
            "node": "Get Values",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Compare Datasets": {
      "main": [
        [
          {
            "node": "Added Nodes",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Same Nodes",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Different Nodes",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Removed Nodes",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Create New Entry": {
      "main": [
        [
          {
            "node": "set non-update response",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Merge Nodes Diff": {
      "main": [
        [
          {
            "node": "Report Nodes",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Same Connections": {
      "main": [
        [
          {
            "node": "Merge Connections Diff",
            "type": "main",
            "index": 1
          }
        ]
      ]
    },
    "Schedule Trigger": {
      "main": [
        [
          {
            "node": "Get All Workflows",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Added Connections": {
      "main": [
        [
          {
            "node": "Merge Connections Diff",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Compare Datasets1": {
      "main": [
        [
          {
            "node": "Added Connections",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Same Connections",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Different Connections",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Removed Connections",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get All Workflows": {
      "main": [
        [
          {
            "node": "Loop Over Items",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "GSheets Rate Limit": {
      "main": [
        [
          {
            "node": "Loop Over Items",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Report Connections": {
      "main": [
        [
          {
            "node": "Merge Reports",
            "type": "main",
            "index": 1
          }
        ]
      ]
    },
    "Split Conn Current": {
      "main": [
        [
          {
            "node": "Compare Datasets1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Removed Connections": {
      "main": [
        [
          {
            "node": "Merge Connections Diff",
            "type": "main",
            "index": 3
          }
        ]
      ]
    },
    "Split Conn Previous": {
      "main": [
        [
          {
            "node": "Compare Datasets1",
            "type": "main",
            "index": 1
          }
        ]
      ]
    },
    "Split Nodes Current": {
      "main": [
        [
          {
            "node": "Compare Datasets",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Split Nodes Previous": {
      "main": [
        [
          {
            "node": "Compare Datasets",
            "type": "main",
            "index": 1
          }
        ]
      ]
    },
    "Different Connections": {
      "main": [
        [
          {
            "node": "Merge Connections Diff",
            "type": "main",
            "index": 2
          }
        ]
      ]
    },
    "Has UpdatedAt Changed?": {
      "main": [
        [
          {
            "node": "Previous State",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "set non-update response",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Merge Connections Diff": {
      "main": [
        [
          {
            "node": "Report Connections",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "set non-update response": {
      "main": [
        [
          {
            "node": "Set Response",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Calculate Template Diffs": {
      "main": [
        [
          {
            "node": "Has Node or Connection Updates?",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Has Node or Connection Updates?": {
      "main": [
        [
          {
            "node": "Update Entry",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "set non-update response",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "When Executed by Another Workflow": {
      "main": [
        [
          {
            "node": "Switch",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}