{
  "name": "Clone n8n workflows between instances using n8n API",
  "nodes": [
    {
      "id": "9e61140a-2b09-4dab-9a3b-3ca9781410cf",
      "name": "When clicking ‘Test workflow’",
      "type": "n8n-nodes-base.manualTrigger",
      "position": [
        -80,
        -260
      ]
    },
    {
      "id": "50fdfb08-0ca1-4bb4-82a6-46b81ef6e3b2",
      "name": "GET - Workflows",
      "type": "n8n-nodes-base.n8n",
      "position": [
        180,
        -400
      ]
    },
    {
      "id": "7c1b5530-bc0c-41f8-ac5f-d53c42ea9c44",
      "name": "CREATE - Workflow",
      "type": "n8n-nodes-base.n8n",
      "position": [
        1200,
        -160
      ]
    },
    {
      "id": "af3a81b1-f09f-4373-b603-657bba8c1776",
      "name": "n8n - GET - Projects",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        1400,
        -160
      ]
    },
    {
      "id": "852e6236-aafd-4223-bb90-42db4c923a59",
      "name": "SET Project ID",
      "type": "n8n-nodes-base.set",
      "position": [
        2000,
        -160
      ]
    },
    {
      "id": "e8dfa94b-82c1-45ee-b87b-f88996569957",
      "name": "PUT - Workflow in Project",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        2200,
        -160
      ]
    },
    {
      "id": "e705f445-c125-4ce5-aa33-f91c3f1fb2a6",
      "name": "Loop Over Items",
      "type": "n8n-nodes-base.splitInBatches",
      "position": [
        1000,
        -260
      ]
    },
    {
      "id": "cec95100-64a0-4d56-986a-1cdeb6063b96",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1740,
        -300
      ],
      "parameters": {
        "width": 220,
        "height": null,
        "content": "### Change the Destination Project by changing the Project Name"
      }
    },
    {
      "id": "b23a6293-a732-42b4-9976-6d3ab750bd44",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        120,
        -540
      ],
      "parameters": {
        "width": 220,
        "height": null,
        "content": "### Change the Source n8n Instance by changing the Credential"
      }
    },
    {
      "id": "a4e2f1f9-dab9-4576-ba66-d36a16a4d82a",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        120,
        -220
      ],
      "parameters": {
        "width": 220,
        "height": null,
        "content": "### Change the Destination n8n Instance by changing the Credential"
      }
    },
    {
      "id": "56997c18-8985-4fdd-b313-de07ee67c6d7",
      "name": "GET - Destination Workflows",
      "type": "n8n-nodes-base.n8n",
      "position": [
        180,
        -80
      ]
    },
    {
      "id": "c9bb6d33-a674-416b-916d-56352b74a603",
      "name": "Code",
      "type": "n8n-nodes-base.code",
      "position": [
        800,
        -260
      ]
    },
    {
      "id": "3357623e-e41a-4441-aba4-4593cbc77bdd",
      "name": "Split Out Workflows",
      "type": "n8n-nodes-base.splitOut",
      "position": [
        380,
        -400
      ]
    },
    {
      "id": "b1a2d1df-4957-491d-9c8d-347c4c5197f1",
      "name": "Split Out Workflows1",
      "type": "n8n-nodes-base.splitOut",
      "position": [
        380,
        -80
      ]
    },
    {
      "id": "f0f4c869-f171-4019-a081-9c232851f0a9",
      "name": "Merge Workflows",
      "type": "n8n-nodes-base.merge",
      "position": [
        600,
        -260
      ]
    },
    {
      "id": "f69c8787-7590-4011-a36f-36c9192089cf",
      "name": "Split Out Projects",
      "type": "n8n-nodes-base.splitOut",
      "position": [
        1600,
        -160
      ]
    },
    {
      "id": "7c8f8957-f80c-4250-96fb-f86032e3aacc",
      "name": "Filter Project",
      "type": "n8n-nodes-base.filter",
      "position": [
        1800,
        -160
      ]
    }
  ],
  "connections": {
    "Code": {
      "main": [
        [
          {
            "node": "Loop Over Items",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Filter Project": {
      "main": [
        [
          {
            "node": "SET Project ID",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "SET Project ID": {
      "main": [
        [
          {
            "node": "PUT - Workflow in Project",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "GET - Workflows": {
      "main": [
        [
          {
            "node": "Split Out Workflows",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Loop Over Items": {
      "main": [
        [],
        [
          {
            "node": "CREATE - Workflow",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Merge Workflows": {
      "main": [
        [
          {
            "node": "Code",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "CREATE - Workflow": {
      "main": [
        [
          {
            "node": "n8n - GET - Projects",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Split Out Projects": {
      "main": [
        [
          {
            "node": "Filter Project",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Split Out Workflows": {
      "main": [
        [
          {
            "node": "Merge Workflows",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Split Out Workflows1": {
      "main": [
        [
          {
            "node": "Merge Workflows",
            "type": "main",
            "index": 1
          }
        ]
      ]
    },
    "n8n - GET - Projects": {
      "main": [
        [
          {
            "node": "Split Out Projects",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "PUT - Workflow in Project": {
      "main": [
        [
          {
            "node": "Loop Over Items",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "GET - Destination Workflows": {
      "main": [
        [
          {
            "node": "Split Out Workflows1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "When clicking ‘Test workflow’": {
      "main": [
        [
          {
            "node": "GET - Workflows",
            "type": "main",
            "index": 0
          },
          {
            "node": "GET - Destination Workflows",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}