{
  "name": "Backup n8n workflows with versioning and Notion tracking",
  "nodes": [
    {
      "id": "0fe79c1a-bdb9-41d5-8306-dcff0e5eff64",
      "name": "When clicking ‘Test workflow’",
      "type": "n8n-nodes-base.manualTrigger",
      "position": [
        384,
        144
      ]
    },
    {
      "id": "d67fc8d4-42b0-4183-a64b-1ef550aaea71",
      "name": "GET - Workflows",
      "type": "n8n-nodes-base.n8n",
      "position": [
        464,
        832
      ]
    },
    {
      "id": "3c90ef38-0341-4493-80f1-d85f112dbe9f",
      "name": "CREATE - Workflow",
      "type": "n8n-nodes-base.n8n",
      "position": [
        1344,
        864
      ]
    },
    {
      "id": "f521fd95-a581-4e7d-8c03-f5846ec2b859",
      "name": "Loop Over Items",
      "type": "n8n-nodes-base.splitInBatches",
      "position": [
        1120,
        832
      ]
    },
    {
      "id": "b2f9180c-9ae4-4114-aba7-0e4803598b61",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        400,
        752
      ],
      "parameters": {
        "width": 220,
        "height": null,
        "content": "### Source Select All"
      }
    },
    {
      "id": "3acd266a-e555-4501-9ef2-6e1a4d7be5ee",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1232,
        784
      ],
      "parameters": {
        "width": 540,
        "height": 300,
        "content": "### Destination Save Today\nworflowname becomes YYYY-MM-DD_workflowname"
      }
    },
    {
      "id": "ed59a2e4-c489-4359-bbf4-89dfc88424d9",
      "name": "GET - Destination Workflows",
      "type": "n8n-nodes-base.n8n",
      "position": [
        912,
        512
      ]
    },
    {
      "id": "655bb1aa-306e-4f18-8bde-0706684f5d5a",
      "name": "Split Out Workflows",
      "type": "n8n-nodes-base.splitOut",
      "position": [
        912,
        832
      ]
    },
    {
      "id": "4e302ca7-31d4-47d9-a5f0-df4997b9dd5b",
      "name": "Split Out Workflows1",
      "type": "n8n-nodes-base.splitOut",
      "position": [
        1152,
        512
      ]
    },
    {
      "id": "6bcc9cc7-cb70-41aa-81d9-8a76d9fd0c88",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -256,
        -80
      ],
      "parameters": {
        "width": 576,
        "height": 1312,
        "content": "# Copy n8n workflows between n8n instances\nInspired by [Alex Kim's workflow](https://n8n.io/workflows/3048-clone-n8n-workflows-between-instances-using-n8n-api/), this version adds the ability to keep "
      }
    },
    {
      "id": "d1374fb8-78ac-480e-a30b-90e723cd05c2",
      "name": "Wait",
      "type": "n8n-nodes-base.wait",
      "position": [
        1568,
        928
      ]
    },
    {
      "id": "04b6f8a9-1e5f-4ef4-bc50-7899732387e5",
      "name": "Limit",
      "type": "n8n-nodes-base.limit",
      "position": [
        688,
        832
      ]
    },
    {
      "id": "4190da9c-a51b-45f2-92fd-4bcb8e8ff4f3",
      "name": "Filter",
      "type": "n8n-nodes-base.filter",
      "position": [
        1360,
        512
      ]
    },
    {
      "id": "bbc9d2a5-f6fd-4800-99e3-f448856e39bf",
      "name": "today",
      "type": "n8n-nodes-base.dateTime",
      "position": [
        608,
        144
      ]
    },
    {
      "id": "c6e31672-e3d2-4f31-8af4-b10099f131f6",
      "name": "yesterday",
      "type": "n8n-nodes-base.dateTime",
      "position": [
        432,
        512
      ]
    },
    {
      "id": "9720d3b9-244d-4a44-9ebe-f4f80e14c7dd",
      "name": "yesterday_prefix",
      "type": "n8n-nodes-base.dateTime",
      "position": [
        688,
        512
      ]
    },
    {
      "id": "ab21f9b5-21b4-432a-9fe3-eb28039c49a1",
      "name": "today_prefix",
      "type": "n8n-nodes-base.dateTime",
      "position": [
        832,
        144
      ]
    },
    {
      "id": "eeec891a-cad2-449c-8f4d-81d887a4efbe",
      "name": "Sticky Note4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1328,
        368
      ],
      "parameters": {
        "width": 460,
        "height": null,
        "content": "### Destination Delete the day before yesterday\nWorkflows starting with YYYY-MM-DD_"
      }
    },
    {
      "id": "b5ea5dad-7ff0-41d7-a718-9623d190e508",
      "name": "Sticky Note5",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        864,
        368
      ],
      "parameters": {
        "width": 220,
        "height": null,
        "content": "### Destination Select All"
      }
    },
    {
      "id": "2209cca8-310f-4313-bf3e-3218ffc3bb0a",
      "name": "Sticky Note6",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        368,
        368
      ],
      "parameters": {
        "width": 220,
        "height": null,
        "content": "### Substract From Date\nSubstract 2 (duration) for the day before yesterday so you have 2 days of online backup"
      }
    },
    {
      "id": "8c0eabb2-a286-4931-a821-3602581dc367",
      "name": "Sticky Note7",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        624,
        368
      ],
      "parameters": {
        "width": 220,
        "height": null,
        "content": "### YYYY-MM-DD_\nSetup the custom format with yyyy-MM-dd_\n"
      }
    },
    {
      "id": "7b99a424-b2dd-463b-898d-8bd5e111f139",
      "name": "Sticky Note8",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        640,
        752
      ],
      "parameters": {
        "width": 220,
        "height": null,
        "content": "### Try with 1 first"
      }
    },
    {
      "id": "885d90ef-3972-4c7e-b8df-ee1ab29fae52",
      "name": "Notion",
      "type": "n8n-nodes-base.notion",
      "position": [
        1584,
        672
      ]
    },
    {
      "id": "138a534c-a92b-40d9-b345-a6da7f3a6e05",
      "name": "Notion1",
      "type": "n8n-nodes-base.notion",
      "position": [
        1040,
        144
      ]
    },
    {
      "id": "b00a1e8f-c08c-40af-ac3d-717d9e38d28a",
      "name": "If",
      "type": "n8n-nodes-base.if",
      "position": [
        1264,
        144
      ]
    },
    {
      "id": "052b251c-4c30-46e0-bc90-4007e5d193f2",
      "name": "backup_already_done",
      "type": "n8n-nodes-base.noOp",
      "position": [
        1488,
        48
      ]
    },
    {
      "id": "1f3a05e2-56ff-4745-aba6-6c29737ac635",
      "name": "Sticky Note9",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        768,
        0
      ],
      "parameters": {
        "width": 220,
        "height": 320,
        "content": "### YYYY-MM-DD_\nThis is the prefix added to workflow name"
      }
    },
    {
      "id": "bb0611c5-1de3-4306-a17e-27dfc670e052",
      "name": "n8n_destination",
      "type": "n8n-nodes-base.n8n",
      "position": [
        1648,
        512
      ]
    }
  ],
  "connections": {
    "If": {
      "main": [
        [
          {
            "node": "backup_already_done",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "yesterday",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Wait": {
      "main": [
        [
          {
            "node": "Loop Over Items",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Limit": {
      "main": [
        [
          {
            "node": "Split Out Workflows",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "today": {
      "main": [
        [
          {
            "node": "today_prefix",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Filter": {
      "main": [
        [
          {
            "node": "n8n_destination",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Notion1": {
      "main": [
        [
          {
            "node": "If",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "yesterday": {
      "main": [
        [
          {
            "node": "yesterday_prefix",
            "type": "main",
            "index": 0
          },
          {
            "node": "GET - Workflows",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "today_prefix": {
      "main": [
        [
          {
            "node": "Notion1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "GET - Workflows": {
      "main": [
        [
          {
            "node": "Limit",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Loop Over Items": {
      "main": [
        [
          {
            "node": "Notion",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "CREATE - Workflow",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "n8n_destination": {
      "main": [
        []
      ]
    },
    "yesterday_prefix": {
      "main": [
        [
          {
            "node": "GET - Destination Workflows",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "CREATE - Workflow": {
      "main": [
        [
          {
            "node": "Wait",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Split Out Workflows": {
      "main": [
        [
          {
            "node": "Loop Over Items",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Split Out Workflows1": {
      "main": [
        [
          {
            "node": "Filter",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "GET - Destination Workflows": {
      "main": [
        [
          {
            "node": "Split Out Workflows1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "When clicking ‘Test workflow’": {
      "main": [
        [
          {
            "node": "today",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}