{
  "name": "Selectively import workflows between instances using the n8n API and forms",
  "nodes": [
    {
      "id": "414365db-f0bb-4fbc-a61a-3dab2c000c88",
      "name": "On form submission",
      "type": "n8n-nodes-base.formTrigger",
      "position": [
        -1504,
        320
      ]
    },
    {
      "id": "32bdb310-b735-4c67-9732-50cce94cee8f",
      "name": "Strip Incompatible API Fields",
      "type": "n8n-nodes-base.code",
      "position": [
        3216,
        1136
      ]
    },
    {
      "id": "825b6057-fbdc-4f15-9d22-30316612dae5",
      "name": "Filter Our Archived Items",
      "type": "n8n-nodes-base.filter",
      "position": [
        1424,
        1136
      ]
    },
    {
      "id": "94f8e97a-cff9-4534-9538-c1d0c1e7d7d6",
      "name": "Aggregate Workflows",
      "type": "n8n-nodes-base.aggregate",
      "position": [
        1872,
        1200
      ]
    },
    {
      "id": "d2f0afdd-b0b1-413a-8701-7bdde6c5c57e",
      "name": "Select Workflows",
      "type": "n8n-nodes-base.form",
      "position": [
        2320,
        1200
      ]
    },
    {
      "id": "c919a8ea-89b0-4e20-82b3-cc789c8b323c",
      "name": "Select Matching Workflows",
      "type": "n8n-nodes-base.merge",
      "position": [
        2768,
        1136
      ]
    },
    {
      "id": "e1713e37-cc19-4bf1-a3a7-79c5547c052f",
      "name": "Split Out Workflows",
      "type": "n8n-nodes-base.splitOut",
      "position": [
        2544,
        1200
      ]
    },
    {
      "id": "ab45dc71-c898-4918-aa29-bbc0a70b1c4b",
      "name": "Create JSON Workflow Options",
      "type": "n8n-nodes-base.code",
      "position": [
        2096,
        1200
      ]
    },
    {
      "id": "e87b9bc3-f88e-4820-be50-e774e59afb32",
      "name": "Split Out",
      "type": "n8n-nodes-base.splitOut",
      "position": [
        1200,
        1136
      ]
    },
    {
      "id": "a408cb7c-ebd2-4101-b4ca-d2c51e8fdeba",
      "name": "Route Mode",
      "type": "n8n-nodes-base.switch",
      "position": [
        -1280,
        320
      ]
    },
    {
      "id": "cb312746-0bc2-4cfe-8141-39a1acbfb7d3",
      "name": "Strip Incompatible API Fields1",
      "type": "n8n-nodes-base.code",
      "position": [
        960,
        144
      ]
    },
    {
      "id": "0deef991-e5b1-45fc-99e5-6e0c290b2fa0",
      "name": "Filter Our Archived Items1",
      "type": "n8n-nodes-base.filter",
      "position": [
        -832,
        144
      ]
    },
    {
      "id": "d1336a70-e981-4237-974d-ed1f8c12e356",
      "name": "Select Workflows1",
      "type": "n8n-nodes-base.form",
      "position": [
        64,
        224
      ]
    },
    {
      "id": "cfca096f-71dd-455a-bdcf-12a637594ee2",
      "name": "Select Matching Workflows1",
      "type": "n8n-nodes-base.merge",
      "position": [
        512,
        144
      ]
    },
    {
      "id": "0081a07b-68a7-4022-8933-5a4bd708a15b",
      "name": "Split Out Workflows1",
      "type": "n8n-nodes-base.splitOut",
      "position": [
        288,
        224
      ]
    },
    {
      "id": "0d2abeb8-1973-4004-983d-c6ad519fbd33",
      "name": "Create JSON Workflow Options1",
      "type": "n8n-nodes-base.code",
      "position": [
        -160,
        224
      ]
    },
    {
      "id": "39db5553-77e5-4a12-9b98-716d16bcb445",
      "name": "Get Instance Information",
      "type": "n8n-nodes-base.notion",
      "position": [
        -1040,
        1136
      ]
    },
    {
      "id": "29e48900-5423-45eb-bfb4-d4fa68ae2f14",
      "name": "Create JSON Workflow Options2",
      "type": "n8n-nodes-base.code",
      "position": [
        -352,
        1360
      ]
    },
    {
      "id": "fe306b93-ef43-496d-bb74-d8d4b4a5a778",
      "name": "Set Source Name and URL",
      "type": "n8n-nodes-base.set",
      "position": [
        -800,
        1360
      ]
    },
    {
      "id": "50c2da2f-7466-42ec-b821-4ca920396414",
      "name": "Select Workflows2",
      "type": "n8n-nodes-base.form",
      "position": [
        -128,
        1360
      ]
    },
    {
      "id": "290df874-e6f0-4ebb-8712-5e8b72f066fd",
      "name": "Set Source",
      "type": "n8n-nodes-base.set",
      "position": [
        304,
        992
      ]
    },
    {
      "id": "4d933d73-4313-4ace-8106-6c9ffae8430c",
      "name": "Set Target",
      "type": "n8n-nodes-base.set",
      "position": [
        304,
        1248
      ]
    },
    {
      "id": "3587aff3-37b0-4269-82c0-08621aee9440",
      "name": "Merge Source and Target",
      "type": "n8n-nodes-base.merge",
      "position": [
        528,
        1136
      ]
    },
    {
      "id": "28b7f023-ae1a-4de9-9c7d-a8bd7b2340f4",
      "name": "Source and Target",
      "type": "n8n-nodes-base.aggregate",
      "position": [
        752,
        1136
      ]
    },
    {
      "id": "e81152b3-6806-4cdd-97d5-6df45be96409",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -2272,
        -384
      ],
      "parameters": {
        "width": 640,
        "height": 912,
        "content": "## How it works 🧠 (Workflow explanation)\n\nThis workflow lets you selectively import workflows between n8n instances using the n8n API and forms.\n\nInstead of bulk imports or manual exports, it dynamica"
      }
    },
    {
      "id": "aa97f607-1d01-471c-92ac-94e55d1aaaca",
      "name": "Merge Source Instance",
      "type": "n8n-nodes-base.merge",
      "position": [
        80,
        992
      ]
    },
    {
      "id": "313c8ba3-12f8-4c19-8be2-7e533a8ab0a0",
      "name": "Merge Target Instance",
      "type": "n8n-nodes-base.merge",
      "position": [
        80,
        1248
      ]
    },
    {
      "id": "1f9403cb-fec5-4f4e-b06d-af4af49d9b72",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1616,
        -96
      ],
      "parameters": {
        "width": 544,
        "height": 624,
        "content": "## 🔁 Mode selection (static vs dynamic)\n\nThis section determines how the source and target n8n instances are configured.\n\n**Simple mode**\n- Uses n8n API credentials configured directly in the workflow"
      }
    },
    {
      "id": "7590dc36-3de9-4e8f-b3c1-e806ff06566b",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -880,
        -176
      ],
      "parameters": {
        "width": 1728,
        "height": 576,
        "content": "## Discover & Select Workflows (static mode)\n\nThis section retrieves workflows from the source n8n instance and prepares them for user selection.\n\n**What happens**\n- Fetches all available workflows vi"
      }
    },
    {
      "id": "266c504c-152d-4a26-bd2a-8d69980a888c",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        896,
        -176
      ],
      "parameters": {
        "width": 448,
        "height": 576,
        "content": "## Import & Clean Workflows\n\nThis section prepares selected workflows for safe import into the target n8n instance.\n\n**What happens**\n- Retrieves each selected workflow via the n8n API\n- Removes field"
      }
    },
    {
      "id": "36ce80fb-b1ec-4f29-b9e4-0d2d983c4d90",
      "name": "Sticky Note6",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1376,
        -176
      ],
      "parameters": {
        "width": 416,
        "height": 576,
        "content": "## Structure Success Message\n\nFormats the final result for each processed workflow by creating a clean summary showing whether each workflow was created or failed."
      }
    },
    {
      "id": "081ae916-8888-436a-9dd3-ed45ff6d98d1",
      "name": "Sticky Note4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        912,
        864
      ],
      "parameters": {
        "width": 640,
        "height": 576,
        "content": "## Discover workflows\n\nThis section retrieves all workflows from the selected n8n instance.\n\nIt:\n- Calls the n8n `/api/v1/workflows` endpoint\n- Filters out archived workflows\n- Aggregates active workf"
      }
    },
    {
      "id": "76c30303-351e-48e3-81f4-3e2e8f7e30c5",
      "name": "Sticky Note5",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1072,
        624
      ],
      "parameters": {
        "width": 1760,
        "height": 928,
        "content": "## Select source and target instances (dynamic mode)\n\nThis section builds the final **Source and Target** payload by combining:\n\n- **Instance records** pulled from your database (e.g. Notion)\n- The us"
      }
    },
    {
      "id": "f493d528-77b1-4ef6-bfc8-b290348555d7",
      "name": "Sticky Note7",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1600,
        864
      ],
      "parameters": {
        "width": 1520,
        "height": 576,
        "content": "## Select workflows\n\nBuilds a dynamic form that allows you to choose which workflows to import.\n\nIt:\n- Converts the discovered workflows into form options\n- Presents them using an n8n Form node\n- Pass"
      }
    },
    {
      "id": "7e413e9f-583e-4a13-a9b2-982af9dc2edc",
      "name": "Sticky Note8",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        3152,
        784
      ],
      "parameters": {
        "width": 448,
        "height": 656,
        "content": "## Import & clean workflows\n\nThis section prepares selected workflows for safe import into the target n8n instance.\n\n**What happens**\n- Retrieves each selected workflow via the n8n API\n- Removes field"
      }
    },
    {
      "id": "4f760b5e-5160-40b4-ba0b-5555d5340a37",
      "name": "Sticky Note9",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        3632,
        864
      ],
      "parameters": {
        "width": 416,
        "height": 576,
        "content": "## Structure success message\n\nFormats the final result for each processed workflow.\n\nCreates a clear summary showing whether each workflow was successfully created or failed, ensuring a consistent and"
      }
    },
    {
      "id": "23fb1ba2-f2ef-415d-b242-1fdd30bfff3d",
      "name": "Create Workflow(s)",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        3440,
        1136
      ]
    },
    {
      "id": "88e497d6-e750-4459-b9f4-7034829ee3a8",
      "name": "Create Workflow(s)1",
      "type": "n8n-nodes-base.n8n",
      "position": [
        1184,
        144
      ]
    },
    {
      "id": "9bbe2872-4bc4-4e6f-a6d5-d76bbe5103e0",
      "name": "Set Workflow Display Name (Dynamic)",
      "type": "n8n-nodes-base.set",
      "position": [
        1648,
        1200
      ]
    },
    {
      "id": "5ce849fa-e09a-4dec-9924-d6899eaa8d22",
      "name": "Set Workflow Display Name (Static)",
      "type": "n8n-nodes-base.set",
      "position": [
        -608,
        224
      ]
    },
    {
      "id": "a583fd79-551e-463c-9057-a4ce273533a3",
      "name": "Aggregate Workflows (Dynamic)",
      "type": "n8n-nodes-base.aggregate",
      "position": [
        3664,
        1136
      ]
    },
    {
      "id": "d6e06702-4767-4245-84d8-994da8f7f60d",
      "name": "Aggregate Workflows (Static)",
      "type": "n8n-nodes-base.aggregate",
      "position": [
        1408,
        144
      ]
    },
    {
      "id": "6ad71500-d0a6-4011-9ce5-8d4dbb4ec6e9",
      "name": "Results (Dynamic)",
      "type": "n8n-nodes-base.form",
      "position": [
        3888,
        1136
      ]
    },
    {
      "id": "6ee57cda-2a89-4095-adf0-c86f15eabced",
      "name": "Results (Static)",
      "type": "n8n-nodes-base.form",
      "position": [
        1632,
        144
      ]
    },
    {
      "id": "6bbb950a-08a2-4a55-b210-ad4306f7f600",
      "name": "Aggregate Workflow Options (Static)",
      "type": "n8n-nodes-base.aggregate",
      "position": [
        -384,
        224
      ]
    },
    {
      "id": "abdd0e91-b796-4448-a258-e34fee9b7543",
      "name": "Aggregate Workflow Options (Dynamic)",
      "type": "n8n-nodes-base.aggregate",
      "position": [
        -576,
        1360
      ]
    },
    {
      "id": "8c78bada-c093-48d7-a66b-0172ae9578e8",
      "name": "Get All Source Instance Workflows",
      "type": "n8n-nodes-base.n8n",
      "position": [
        -1056,
        144
      ]
    },
    {
      "id": "aeb77c8c-caa9-4ec0-aca4-9df3d94c0800",
      "name": "Get Source Workflows With Pagination",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        976,
        1136
      ]
    },
    {
      "id": "1b80098e-71c0-4e25-a270-cd0834d20a6a",
      "name": "Get Workflow JSON(s)",
      "type": "n8n-nodes-base.n8n",
      "position": [
        736,
        144
      ]
    },
    {
      "id": "bb3947af-344d-4b9c-8387-6942d6abdfcd",
      "name": "Get Workflow JSON(s)1",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        2992,
        1136
      ]
    }
  ],
  "connections": {
    "Split Out": {
      "main": [
        [
          {
            "node": "Filter Our Archived Items",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Route Mode": {
      "main": [
        [
          {
            "node": "Get All Source Instance Workflows",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Get Instance Information",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Set Source": {
      "main": [
        [
          {
            "node": "Merge Source and Target",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Set Target": {
      "main": [
        [
          {
            "node": "Merge Source and Target",
            "type": "main",
            "index": 1
          }
        ]
      ]
    },
    "Select Workflows": {
      "main": [
        [
          {
            "node": "Split Out Workflows",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Results (Dynamic)": {
      "main": [
        []
      ]
    },
    "Select Workflows1": {
      "main": [
        [
          {
            "node": "Split Out Workflows1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Select Workflows2": {
      "main": [
        [
          {
            "node": "Merge Source Instance",
            "type": "main",
            "index": 1
          },
          {
            "node": "Merge Target Instance",
            "type": "main",
            "index": 1
          }
        ]
      ]
    },
    "Source and Target": {
      "main": [
        [
          {
            "node": "Get Source Workflows With Pagination",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Create Workflow(s)": {
      "main": [
        [
          {
            "node": "Aggregate Workflows (Dynamic)",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "On form submission": {
      "main": [
        [
          {
            "node": "Route Mode",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Aggregate Workflows": {
      "main": [
        [
          {
            "node": "Create JSON Workflow Options",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Create Workflow(s)1": {
      "main": [
        [
          {
            "node": "Aggregate Workflows (Static)",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Split Out Workflows": {
      "main": [
        [
          {
            "node": "Select Matching Workflows",
            "type": "main",
            "index": 1
          }
        ]
      ]
    },
    "Get Workflow JSON(s)": {
      "main": [
        [
          {
            "node": "Strip Incompatible API Fields1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Split Out Workflows1": {
      "main": [
        [
          {
            "node": "Select Matching Workflows1",
            "type": "main",
            "index": 1
          }
        ]
      ]
    },
    "Get Workflow JSON(s)1": {
      "main": [
        [
          {
            "node": "Strip Incompatible API Fields",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Merge Source Instance": {
      "main": [
        [
          {
            "node": "Set Source",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Merge Target Instance": {
      "main": [
        [
          {
            "node": "Set Target",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Merge Source and Target": {
      "main": [
        [
          {
            "node": "Source and Target",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Set Source Name and URL": {
      "main": [
        [
          {
            "node": "Aggregate Workflow Options (Dynamic)",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get Instance Information": {
      "main": [
        [
          {
            "node": "Set Source Name and URL",
            "type": "main",
            "index": 0
          },
          {
            "node": "Merge Target Instance",
            "type": "main",
            "index": 0
          },
          {
            "node": "Merge Source Instance",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Filter Our Archived Items": {
      "main": [
        [
          {
            "node": "Set Workflow Display Name (Dynamic)",
            "type": "main",
            "index": 0
          },
          {
            "node": "Select Matching Workflows",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Select Matching Workflows": {
      "main": [
        [
          {
            "node": "Get Workflow JSON(s)1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Filter Our Archived Items1": {
      "main": [
        [
          {
            "node": "Set Workflow Display Name (Static)",
            "type": "main",
            "index": 0
          },
          {
            "node": "Select Matching Workflows1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Select Matching Workflows1": {
      "main": [
        [
          {
            "node": "Get Workflow JSON(s)",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Aggregate Workflows (Static)": {
      "main": [
        [
          {
            "node": "Results (Static)",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Create JSON Workflow Options": {
      "main": [
        [
          {
            "node": "Select Workflows",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Aggregate Workflows (Dynamic)": {
      "main": [
        [
          {
            "node": "Results (Dynamic)",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Create JSON Workflow Options1": {
      "main": [
        [
          {
            "node": "Select Workflows1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Create JSON Workflow Options2": {
      "main": [
        [
          {
            "node": "Select Workflows2",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Strip Incompatible API Fields": {
      "main": [
        [
          {
            "node": "Create Workflow(s)",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Strip Incompatible API Fields1": {
      "main": [
        [
          {
            "node": "Create Workflow(s)1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get All Source Instance Workflows": {
      "main": [
        [
          {
            "node": "Filter Our Archived Items1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Set Workflow Display Name (Static)": {
      "main": [
        [
          {
            "node": "Aggregate Workflow Options (Static)",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Aggregate Workflow Options (Static)": {
      "main": [
        [
          {
            "node": "Create JSON Workflow Options1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Set Workflow Display Name (Dynamic)": {
      "main": [
        [
          {
            "node": "Aggregate Workflows",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Aggregate Workflow Options (Dynamic)": {
      "main": [
        [
          {
            "node": "Create JSON Workflow Options2",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get Source Workflows With Pagination": {
      "main": [
        [
          {
            "node": "Split Out",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}