{
  "nodes": [
    {
      "id": "414365db-f0bb-4fbc-a61a-3dab2c000c88",
      "name": "On form submission",
      "type": "n8n-nodes-base.formTrigger",
      "position": [
        -1504,
        320
      ],
      "parameters": {
        "options": {
          "path": "migrate-dynamic-n8n-workflows",
          "customCss": ":root {\n\t--font-family: 'Open Sans', sans-serif;\n\t--font-weight-normal: 400;\n\t--font-weight-bold: 600;\n\t--font-size-body: 12px;\n\t--font-size-label: 14px;\n\t--font-size-test-notice: 12px;\n\t--font-size-input: 14px;\n\t--font-size-header: 20px;\n\t--font-size-paragraph: 14px;\n\t--font-size-link: 12px;\n\t--font-size-error: 12px;\n\t--font-size-html-h1: 28px;\n\t--font-size-html-h2: 20px;\n\t--font-size-html-h3: 16px;\n\t--font-size-html-h4: 14px;\n\t--font-size-html-h5: 12px;\n\t--font-size-html-h6: 10px;\n\t--font-size-subheader: 14px;\n\n\t/* Colors - Granite Marketing Dark Theme */\n\t--color-background: #171717;\n\t--color-test-notice-text: #fbbf24;\n\t--color-test-notice-bg: #1f1f1f;\n\t--color-test-notice-border: #404040;\n\t--color-card-bg: #1e1e1e;\n\t--color-card-border: #404040;\n\t--color-card-shadow: rgba(0, 0, 0, 0.3);\n\t--color-link: #a5a5a5;\n\t--color-header: #f5f5f5;\n\t--color-label: #d4d4d4;\n\t--color-input-border: #404040;\n\t--color-input-text: #e5e5e5;\n\t--color-focus-border: #4ade80;\n\t--color-submit-btn-bg: #4ade80;\n\t--color-submit-btn-text: #171717;\n\t--color-error: #f87171;\n\t--color-required: #4ade80;\n\t--color-clear-button-bg: #525252;\n\t--color-html-text: #d4d4d4;\n\t--color-html-link: #4ade80;\n\t--color-header-subtext: #a5a5a5;\n\n\t/* Border Radii - Matching Granite Marketing */\n\t--border-radius-card: 12px;\n\t--border-radius-input: 6px;\n\t--border-radius-clear-btn: 50%;\n\t--card-border-radius: 12px;\n\n\t/* Spacing */\n\t--padding-container-top: 24px;\n\t--padding-card: 24px;\n\t--padding-test-notice-vertical: 12px;\n\t--padding-test-notice-horizontal: 24px;\n\t--margin-bottom-card: 16px;\n\t--padding-form-input: 12px;\n\t--card-padding: 24px;\n\t--card-margin-bottom: 16px;\n\n\t/* Dimensions */\n\t--container-width: 448px;\n\t--submit-btn-height: 48px;\n\t--checkbox-size: 18px;\n\n\t/* Others */\n\t--box-shadow-card: 0px 4px 16px 0px var(--color-card-shadow);\n\t--opacity-placeholder: 0.5;\n}",
          "buttonLabel": "Find Workflows",
          "appendAttribution": false
        },
        "formTitle": "N8n Workflow Loader",
        "formFields": {
          "values": [
            {
              "fieldName": "Choose A Mode",
              "fieldType": "dropdown",
              "fieldLabel": "Mode",
              "defaultValue": "Default",
              "fieldOptions": {
                "values": [
                  {
                    "option": "Default"
                  },
                  {
                    "option": "Dynamic"
                  }
                ]
              },
              "requiredField": true
            }
          ]
        },
        "formDescription": "Load select workflows from your chosen n8n instance. "
      },
      "typeVersion": 2.4
    },
    {
      "id": "32bdb310-b735-4c67-9732-50cce94cee8f",
      "name": "Strip Incompatible API Fields",
      "type": "n8n-nodes-base.code",
      "position": [
        3216,
        1136
      ],
      "parameters": {
        "mode": "runOnceForEachItem",
        "jsCode": "/**\n * Build an n8n-API-safe workflow payload\n * using a strict allowlist (NOT a denylist).\n */\n\n// --------------------\n// Helpers\n// --------------------\n\nfunction pick(obj, allowedKeys) {\n  if (!obj || typeof obj !== 'object') return {};\n  return Object.fromEntries(\n    Object.entries(obj).filter(([key]) => allowedKeys.includes(key))\n  );\n}\n\nfunction cleanNode(node) {\n  return {\n    id: node.id,\n    name: node.name,\n    type: node.type,\n    typeVersion: node.typeVersion,\n    position: node.position,\n    parameters: node.parameters ?? {},\n    credentials: node.credentials ?? {},\n    disabled: node.disabled ?? false,\n    notes: node.notes,\n    notesInFlow: node.notesInFlow,\n  };\n}\n\n// --------------------\n// ENTRY POINT\n// --------------------\n\nconst source = $json;\n\n// ---- Top-level allowlist ----\nconst workflow = {\n  name: source.name,\n  nodes: source.nodes.map(cleanNode),\n  connections: source.connections,\n  settings: {\n    \"saveExecutionProgress\": true,\n    \"saveManualExecutions\": true,\n    \"saveDataErrorExecution\": \"all\",\n    \"saveDataSuccessExecution\": \"all\",\n    \"executionTimeout\": 3600,\n    \"timezone\": \"America/New_York\",\n    \"executionOrder\": \"v1\",\n    \"callerPolicy\": \"workflowsFromSameOwner\",\n    \"callerIds\": \"14, 18, 23\",\n    \"timeSavedPerExecution\": 1,\n    \"availableInMCP\": false\n  }\n};\n\n// ---- Settings allowlist ----\nconst ALLOWED_SETTINGS = [\n  'timezone',\n  'executionTimeout',\n  'saveExecutionProgress',\n  'saveManualExecutions',\n  'errorWorkflowId',\n];\n\nif (source.settings) {\n  const cleanedSettings = pick(source.settings, ALLOWED_SETTINGS);\n  if (Object.keys(cleanedSettings).length > 0) {\n    workflow.settings = cleanedSettings;\n  }\n}\n\n// ---- Optional staticData ----\nif (source.staticData) {\n  workflow.staticData = source.staticData;\n}\n\nreturn workflow;"
      },
      "typeVersion": 2
    },
    {
      "id": "825b6057-fbdc-4f15-9d22-30316612dae5",
      "name": "Filter Our Archived Items",
      "type": "n8n-nodes-base.filter",
      "position": [
        1424,
        1136
      ],
      "parameters": {
        "options": {},
        "conditions": {
          "options": {
            "version": 3,
            "leftValue": "",
            "caseSensitive": true,
            "typeValidation": "strict"
          },
          "combinator": "and",
          "conditions": [
            {
              "id": "20678e33-3415-4d80-890c-752435182ddd",
              "operator": {
                "type": "boolean",
                "operation": "equals"
              },
              "leftValue": "={{ $json.isArchived }}",
              "rightValue": false
            }
          ]
        }
      },
      "typeVersion": 2.3
    },
    {
      "id": "94f8e97a-cff9-4534-9538-c1d0c1e7d7d6",
      "name": "Aggregate Workflows",
      "type": "n8n-nodes-base.aggregate",
      "position": [
        1872,
        1200
      ],
      "parameters": {
        "options": {},
        "aggregate": "aggregateAllItemData"
      },
      "typeVersion": 1
    },
    {
      "id": "d2f0afdd-b0b1-413a-8701-7bdde6c5c57e",
      "name": "Select Workflows",
      "type": "n8n-nodes-base.form",
      "position": [
        2320,
        1200
      ],
      "parameters": {
        "options": {
          "customCss": ":root {\n\t--font-family: 'Open Sans', sans-serif;\n\t--font-weight-normal: 400;\n\t--font-weight-bold: 600;\n\t--font-size-body: 12px;\n\t--font-size-label: 14px;\n\t--font-size-test-notice: 12px;\n\t--font-size-input: 14px;\n\t--font-size-header: 20px;\n\t--font-size-paragraph: 14px;\n\t--font-size-link: 12px;\n\t--font-size-error: 12px;\n\t--font-size-html-h1: 28px;\n\t--font-size-html-h2: 20px;\n\t--font-size-html-h3: 16px;\n\t--font-size-html-h4: 14px;\n\t--font-size-html-h5: 12px;\n\t--font-size-html-h6: 10px;\n\t--font-size-subheader: 14px;\n\n\t/* Colors - Granite Marketing Dark Theme */\n\t--color-background: #171717;\n\t--color-test-notice-text: #fbbf24;\n\t--color-test-notice-bg: #1f1f1f;\n\t--color-test-notice-border: #404040;\n\t--color-card-bg: #1e1e1e;\n\t--color-card-border: #404040;\n\t--color-card-shadow: rgba(0, 0, 0, 0.3);\n\t--color-link: #a5a5a5;\n\t--color-header: #f5f5f5;\n\t--color-label: #d4d4d4;\n\t--color-input-border: #404040;\n\t--color-input-text: #e5e5e5;\n\t--color-focus-border: #4ade80;\n\t--color-submit-btn-bg: #4ade80;\n\t--color-submit-btn-text: #171717;\n\t--color-error: #f87171;\n\t--color-required: #4ade80;\n\t--color-clear-button-bg: #525252;\n\t--color-html-text: #d4d4d4;\n\t--color-html-link: #4ade80;\n\t--color-header-subtext: #a5a5a5;\n\n\t/* Border Radii - Matching Granite Marketing */\n\t--border-radius-card: 12px;\n\t--border-radius-input: 6px;\n\t--border-radius-clear-btn: 50%;\n\t--card-border-radius: 12px;\n\n\t/* Spacing */\n\t--padding-container-top: 24px;\n\t--padding-card: 24px;\n\t--padding-test-notice-vertical: 12px;\n\t--padding-test-notice-horizontal: 24px;\n\t--margin-bottom-card: 16px;\n\t--padding-form-input: 12px;\n\t--card-padding: 24px;\n\t--card-margin-bottom: 16px;\n\n\t/* Dimensions */\n\t--container-width: 448px;\n\t--submit-btn-height: 48px;\n\t--checkbox-size: 18px;\n\n\t/* Others */\n\t--box-shadow-card: 0px 4px 16px 0px var(--color-card-shadow);\n\t--opacity-placeholder: 0.5;\n}\n\n.multiselect {\n  max-height: 300px;\n  overflow: scroll;\n}",
          "formTitle": "Select Workflows",
          "buttonLabel": "Select Workflows"
        },
        "defineForm": "json",
        "jsonOutput": "=[\n  {\n    \"fieldLabel\": \"workflows\",\n    \"fieldType\": \"checkbox\",\n    \"fieldOptions\": {\n      \"values\": [\n        {{ $json.options }}\n      ]\n    }\n  }\n]\n"
      },
      "typeVersion": 2.4
    },
    {
      "id": "c919a8ea-89b0-4e20-82b3-cc789c8b323c",
      "name": "Select Matching Workflows",
      "type": "n8n-nodes-base.merge",
      "position": [
        2768,
        1136
      ],
      "parameters": {
        "mode": "combine",
        "options": {},
        "advanced": true,
        "mergeByFields": {
          "values": [
            {
              "field1": "name",
              "field2": "workflows"
            }
          ]
        },
        "outputDataFrom": "input1"
      },
      "typeVersion": 3.2
    },
    {
      "id": "e1713e37-cc19-4bf1-a3a7-79c5547c052f",
      "name": "Split Out Workflows",
      "type": "n8n-nodes-base.splitOut",
      "position": [
        2544,
        1200
      ],
      "parameters": {
        "options": {},
        "fieldToSplitOut": "workflows"
      },
      "typeVersion": 1
    },
    {
      "id": "ab45dc71-c898-4918-aa29-bbc0a70b1c4b",
      "name": "Create JSON Workflow Options",
      "type": "n8n-nodes-base.code",
      "position": [
        2096,
        1200
      ],
      "parameters": {
        "jsCode": "const data = $input.first().json.data;\n\nconst options = data\n  .map(item => `{\n  \"option\": \"${item.workflow_name}\"}`)\n  .join(\",\");\n\nreturn {\n  json: {\n    options,\n  },\n};"
      },
      "typeVersion": 2
    },
    {
      "id": "e87b9bc3-f88e-4820-be50-e774e59afb32",
      "name": "Split Out",
      "type": "n8n-nodes-base.splitOut",
      "position": [
        1200,
        1136
      ],
      "parameters": {
        "options": {},
        "fieldToSplitOut": "data"
      },
      "typeVersion": 1
    },
    {
      "id": "a408cb7c-ebd2-4101-b4ca-d2c51e8fdeba",
      "name": "Route Mode",
      "type": "n8n-nodes-base.switch",
      "position": [
        -1280,
        320
      ],
      "parameters": {
        "rules": {
          "values": [
            {
              "outputKey": "default",
              "conditions": {
                "options": {
                  "version": 3,
                  "leftValue": "",
                  "caseSensitive": true,
                  "typeValidation": "strict"
                },
                "combinator": "and",
                "conditions": [
                  {
                    "id": "f9af535e-1cd8-43dd-9285-4f8185632c76",
                    "operator": {
                      "type": "string",
                      "operation": "equals"
                    },
                    "leftValue": "={{ $json[\"Choose A Mode\"] }}",
                    "rightValue": "Default"
                  }
                ]
              },
              "renameOutput": true
            },
            {
              "outputKey": "dynamic",
              "conditions": {
                "options": {
                  "version": 3,
                  "leftValue": "",
                  "caseSensitive": true,
                  "typeValidation": "strict"
                },
                "combinator": "and",
                "conditions": [
                  {
                    "id": "b33acb3e-d4de-444b-8913-16c0b13d906b",
                    "operator": {
                      "name": "filter.operator.equals",
                      "type": "string",
                      "operation": "equals"
                    },
                    "leftValue": "={{ $json[\"Choose A Mode\"] }}",
                    "rightValue": "Dynamic"
                  }
                ]
              },
              "renameOutput": true
            }
          ]
        },
        "options": {}
      },
      "typeVersion": 3.4
    },
    {
      "id": "cb312746-0bc2-4cfe-8141-39a1acbfb7d3",
      "name": "Strip Incompatible API Fields1",
      "type": "n8n-nodes-base.code",
      "position": [
        960,
        144
      ],
      "parameters": {
        "mode": "runOnceForEachItem",
        "jsCode": "/**\n * Build an n8n-API-safe workflow payload\n * using a strict allowlist (NOT a denylist).\n */\n\n// --------------------\n// Helpers\n// --------------------\n\nfunction pick(obj, allowedKeys) {\n  if (!obj || typeof obj !== 'object') return {};\n  return Object.fromEntries(\n    Object.entries(obj).filter(([key]) => allowedKeys.includes(key))\n  );\n}\n\nfunction cleanNode(node) {\n  return {\n    id: node.id,\n    name: node.name,\n    type: node.type,\n    typeVersion: node.typeVersion,\n    position: node.position,\n    parameters: node.parameters ?? {},\n    credentials: node.credentials ?? {},\n    disabled: node.disabled ?? false,\n    notes: node.notes,\n    notesInFlow: node.notesInFlow,\n  };\n}\n\n// --------------------\n// ENTRY POINT\n// --------------------\n\nconst source = $json;\n\n// ---- Top-level allowlist ----\nconst workflow = {\n  name: source.name,\n  nodes: source.nodes.map(cleanNode),\n  connections: source.connections,\n};\n\n// ---- Settings allowlist ----\nconst ALLOWED_SETTINGS = [\n  'timezone',\n  'executionTimeout',\n  'saveExecutionProgress',\n  'saveManualExecutions',\n  'errorWorkflowId',\n];\n\nif (source.settings) {\n  const cleanedSettings = pick(source.settings, ALLOWED_SETTINGS);\n  if (Object.keys(cleanedSettings).length > 0) {\n    workflow.settings = cleanedSettings;\n  }\n}\n\n// ---- Optional staticData ----\nif (source.staticData) {\n  workflow.staticData = source.staticData;\n}\n\nreturn workflow;"
      },
      "typeVersion": 2
    },
    {
      "id": "0deef991-e5b1-45fc-99e5-6e0c290b2fa0",
      "name": "Filter Our Archived Items1",
      "type": "n8n-nodes-base.filter",
      "position": [
        -832,
        144
      ],
      "parameters": {
        "options": {},
        "conditions": {
          "options": {
            "version": 3,
            "leftValue": "",
            "caseSensitive": true,
            "typeValidation": "strict"
          },
          "combinator": "and",
          "conditions": [
            {
              "id": "20678e33-3415-4d80-890c-752435182ddd",
              "operator": {
                "type": "boolean",
                "operation": "equals"
              },
              "leftValue": "={{ $json.isArchived }}",
              "rightValue": false
            }
          ]
        }
      },
      "typeVersion": 2.3
    },
    {
      "id": "d1336a70-e981-4237-974d-ed1f8c12e356",
      "name": "Select Workflows1",
      "type": "n8n-nodes-base.form",
      "position": [
        64,
        224
      ],
      "parameters": {
        "options": {
          "customCss": ":root {\n\t--font-family: 'Open Sans', sans-serif;\n\t--font-weight-normal: 400;\n\t--font-weight-bold: 600;\n\t--font-size-body: 12px;\n\t--font-size-label: 14px;\n\t--font-size-test-notice: 12px;\n\t--font-size-input: 14px;\n\t--font-size-header: 20px;\n\t--font-size-paragraph: 14px;\n\t--font-size-link: 12px;\n\t--font-size-error: 12px;\n\t--font-size-html-h1: 28px;\n\t--font-size-html-h2: 20px;\n\t--font-size-html-h3: 16px;\n\t--font-size-html-h4: 14px;\n\t--font-size-html-h5: 12px;\n\t--font-size-html-h6: 10px;\n\t--font-size-subheader: 14px;\n\n\t/* Colors - Granite Marketing Dark Theme */\n\t--color-background: #171717;\n\t--color-test-notice-text: #fbbf24;\n\t--color-test-notice-bg: #1f1f1f;\n\t--color-test-notice-border: #404040;\n\t--color-card-bg: #1e1e1e;\n\t--color-card-border: #404040;\n\t--color-card-shadow: rgba(0, 0, 0, 0.3);\n\t--color-link: #a5a5a5;\n\t--color-header: #f5f5f5;\n\t--color-label: #d4d4d4;\n\t--color-input-border: #404040;\n\t--color-input-text: #e5e5e5;\n\t--color-focus-border: #4ade80;\n\t--color-submit-btn-bg: #4ade80;\n\t--color-submit-btn-text: #171717;\n\t--color-error: #f87171;\n\t--color-required: #4ade80;\n\t--color-clear-button-bg: #525252;\n\t--color-html-text: #d4d4d4;\n\t--color-html-link: #4ade80;\n\t--color-header-subtext: #a5a5a5;\n\n\t/* Border Radii - Matching Granite Marketing */\n\t--border-radius-card: 12px;\n\t--border-radius-input: 6px;\n\t--border-radius-clear-btn: 50%;\n\t--card-border-radius: 12px;\n\n\t/* Spacing */\n\t--padding-container-top: 24px;\n\t--padding-card: 24px;\n\t--padding-test-notice-vertical: 12px;\n\t--padding-test-notice-horizontal: 24px;\n\t--margin-bottom-card: 16px;\n\t--padding-form-input: 12px;\n\t--card-padding: 24px;\n\t--card-margin-bottom: 16px;\n\n\t/* Dimensions */\n\t--container-width: 448px;\n\t--submit-btn-height: 48px;\n\t--checkbox-size: 18px;\n\n\t/* Others */\n\t--box-shadow-card: 0px 4px 16px 0px var(--color-card-shadow);\n\t--opacity-placeholder: 0.5;\n}\n\n.multiselect {\n  max-height: 300px;\n  overflow: scroll;\n}",
          "formTitle": "Select Workflows",
          "buttonLabel": "Select Workflows"
        },
        "defineForm": "json",
        "jsonOutput": "=[\n  {\n    \"fieldLabel\": \"workflows\",\n    \"fieldType\": \"checkbox\",\n    \"fieldOptions\": {\n      \"values\": [\n        {{ $json.options }}\n      ]\n    }\n  }\n]\n"
      },
      "typeVersion": 2.4
    },
    {
      "id": "cfca096f-71dd-455a-bdcf-12a637594ee2",
      "name": "Select Matching Workflows1",
      "type": "n8n-nodes-base.merge",
      "position": [
        512,
        144
      ],
      "parameters": {
        "mode": "combine",
        "options": {},
        "advanced": true,
        "mergeByFields": {
          "values": [
            {
              "field1": "name",
              "field2": "workflows"
            }
          ]
        },
        "outputDataFrom": "input1"
      },
      "typeVersion": 3.2
    },
    {
      "id": "0081a07b-68a7-4022-8933-5a4bd708a15b",
      "name": "Split Out Workflows1",
      "type": "n8n-nodes-base.splitOut",
      "position": [
        288,
        224
      ],
      "parameters": {
        "options": {},
        "fieldToSplitOut": "workflows"
      },
      "typeVersion": 1
    },
    {
      "id": "0d2abeb8-1973-4004-983d-c6ad519fbd33",
      "name": "Create JSON Workflow Options1",
      "type": "n8n-nodes-base.code",
      "position": [
        -160,
        224
      ],
      "parameters": {
        "jsCode": "const data = $input.first().json.data;\n\nconst options = data\n  .map(item => `{\n  \"option\": \"${item.workflow_name}\"}`)\n  .join(\",\");\n\nreturn {\n  json: {\n    options,\n  },\n};"
      },
      "typeVersion": 2
    },
    {
      "id": "39db5553-77e5-4a12-9b98-716d16bcb445",
      "name": "Get Instance Information",
      "type": "n8n-nodes-base.notion",
      "position": [
        -1040,
        1136
      ],
      "parameters": {
        "options": {},
        "resource": "databasePage",
        "operation": "getAll",
        "returnAll": true,
        "databaseId": {
          "__rl": true,
          "mode": "list",
          "value": "306785c0-cfab-80a8-9236-f9c9b14042b5",
          "cachedResultUrl": "https://www.notion.so/306785c0cfab80a89236f9c9b14042b5",
          "cachedResultName": "Granite n8n Keys"
        }
      },
      "credentials": {
        "notionApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 2.2
    },
    {
      "id": "29e48900-5423-45eb-bfb4-d4fa68ae2f14",
      "name": "Create JSON Workflow Options2",
      "type": "n8n-nodes-base.code",
      "position": [
        -352,
        1360
      ],
      "parameters": {
        "jsCode": "const data = $input.first().json.data;\n\nconst options = data\n  .map(item => `{\n  \"option\": \"${item.workflow_name}\"}`)\n  .join(\",\");\n\nreturn {\n  json: {\n    options,\n  },\n};"
      },
      "typeVersion": 2
    },
    {
      "id": "fe306b93-ef43-496d-bb74-d8d4b4a5a778",
      "name": "Set Source Name and URL",
      "type": "n8n-nodes-base.set",
      "position": [
        -800,
        1360
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "0e1b7526-faf5-4001-ba27-3005836cc58f",
              "name": "workflow_name",
              "type": "string",
              "value": "={{ $json.name }}"
            }
          ]
        }
      },
      "typeVersion": 3.4
    },
    {
      "id": "50c2da2f-7466-42ec-b821-4ca920396414",
      "name": "Select Workflows2",
      "type": "n8n-nodes-base.form",
      "position": [
        -128,
        1360
      ],
      "parameters": {
        "options": {
          "customCss": ":root {\n\t--font-family: 'Open Sans', sans-serif;\n\t--font-weight-normal: 400;\n\t--font-weight-bold: 600;\n\t--font-size-body: 12px;\n\t--font-size-label: 14px;\n\t--font-size-test-notice: 12px;\n\t--font-size-input: 14px;\n\t--font-size-header: 20px;\n\t--font-size-paragraph: 14px;\n\t--font-size-link: 12px;\n\t--font-size-error: 12px;\n\t--font-size-html-h1: 28px;\n\t--font-size-html-h2: 20px;\n\t--font-size-html-h3: 16px;\n\t--font-size-html-h4: 14px;\n\t--font-size-html-h5: 12px;\n\t--font-size-html-h6: 10px;\n\t--font-size-subheader: 14px;\n\n\t/* Colors - Granite Marketing Dark Theme */\n\t--color-background: #171717;\n\t--color-test-notice-text: #fbbf24;\n\t--color-test-notice-bg: #1f1f1f;\n\t--color-test-notice-border: #404040;\n\t--color-card-bg: #1e1e1e;\n\t--color-card-border: #404040;\n\t--color-card-shadow: rgba(0, 0, 0, 0.3);\n\t--color-link: #a5a5a5;\n\t--color-header: #f5f5f5;\n\t--color-label: #d4d4d4;\n\t--color-input-border: #404040;\n\t--color-input-text: #e5e5e5;\n\t--color-focus-border: #4ade80;\n\t--color-submit-btn-bg: #4ade80;\n\t--color-submit-btn-text: #171717;\n\t--color-error: #f87171;\n\t--color-required: #4ade80;\n\t--color-clear-button-bg: #525252;\n\t--color-html-text: #d4d4d4;\n\t--color-html-link: #4ade80;\n\t--color-header-subtext: #a5a5a5;\n\n\t/* Border Radii - Matching Granite Marketing */\n\t--border-radius-card: 12px;\n\t--border-radius-input: 6px;\n\t--border-radius-clear-btn: 50%;\n\t--card-border-radius: 12px;\n\n\t/* Spacing */\n\t--padding-container-top: 24px;\n\t--padding-card: 24px;\n\t--padding-test-notice-vertical: 12px;\n\t--padding-test-notice-horizontal: 24px;\n\t--margin-bottom-card: 16px;\n\t--padding-form-input: 12px;\n\t--card-padding: 24px;\n\t--card-margin-bottom: 16px;\n\n\t/* Dimensions */\n\t--container-width: 448px;\n\t--submit-btn-height: 48px;\n\t--checkbox-size: 18px;\n\n\t/* Others */\n\t--box-shadow-card: 0px 4px 16px 0px var(--color-card-shadow);\n\t--opacity-placeholder: 0.5;\n}\n\n.multiselect {\n  max-height: 300px;\n  overflow: scroll;\n}",
          "formTitle": "Select Source Instance",
          "buttonLabel": "Select Source Instance"
        },
        "defineForm": "json",
        "jsonOutput": "=[\n  {\n    \"fieldLabel\": \"source\",\n    \"fieldType\": \"dropdown\",\n    \"fieldOptions\": {\n      \"values\": [\n        {{ $json.options }}\n      ]\n    }\n  },\n  {\n    \"fieldLabel\": \"target\",\n    \"fieldType\": \"dropdown\",\n    \"fieldOptions\": {\n      \"values\": [\n        {{ $json.options }}\n      ]\n    }\n  }\n]\n"
      },
      "typeVersion": 2.4
    },
    {
      "id": "290df874-e6f0-4ebb-8712-5e8b72f066fd",
      "name": "Set Source",
      "type": "n8n-nodes-base.set",
      "position": [
        304,
        992
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "a9355cc3-a088-47cb-a25b-2d6a7886efea",
              "name": "type",
              "type": "string",
              "value": "=source"
            },
            {
              "id": "03af0601-f7c7-48a9-96fe-27be9a08def5",
              "name": "name",
              "type": "string",
              "value": "={{ $json.name }}"
            },
            {
              "id": "851da7d5-da27-41fc-9dcb-8b85831518e3",
              "name": "url",
              "type": "string",
              "value": "={{ $json.property_url }}"
            },
            {
              "id": "bf6b054b-70c9-4639-8912-f0c3a0492a39",
              "name": "id",
              "type": "string",
              "value": "={{ $json.id }}"
            },
            {
              "id": "2a8178d4-e97c-48bb-9287-cdf5908f68e5",
              "name": "api_key",
              "type": "string",
              "value": "={{ $json.property_api_key }}"
            }
          ]
        }
      },
      "typeVersion": 3.4
    },
    {
      "id": "4d933d73-4313-4ace-8106-6c9ffae8430c",
      "name": "Set Target",
      "type": "n8n-nodes-base.set",
      "position": [
        304,
        1248
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "a9355cc3-a088-47cb-a25b-2d6a7886efea",
              "name": "type",
              "type": "string",
              "value": "=target"
            },
            {
              "id": "d65a1dab-d672-4e68-b282-57f876dfa91c",
              "name": "name",
              "type": "string",
              "value": "={{ $json.name }}"
            },
            {
              "id": "2bc3812b-f884-4e33-8647-e9876b836585",
              "name": "url",
              "type": "string",
              "value": "={{ $json.property_url }}"
            },
            {
              "id": "1bebcd7a-fbda-4c83-8512-db3f8c86bc74",
              "name": "id",
              "type": "string",
              "value": "={{ $json.id }}"
            },
            {
              "id": "9e23c106-67c2-43ed-a12a-adeae6650a23",
              "name": "api_key",
              "type": "string",
              "value": "={{ $json.property_api_key }}"
            }
          ]
        },
        "includeOtherFields": true
      },
      "typeVersion": 3.4
    },
    {
      "id": "3587aff3-37b0-4269-82c0-08621aee9440",
      "name": "Merge Source and Target",
      "type": "n8n-nodes-base.merge",
      "position": [
        528,
        1136
      ],
      "parameters": {},
      "typeVersion": 3.2
    },
    {
      "id": "28b7f023-ae1a-4de9-9c7d-a8bd7b2340f4",
      "name": "Source and Target",
      "type": "n8n-nodes-base.aggregate",
      "position": [
        752,
        1136
      ],
      "parameters": {
        "options": {},
        "aggregate": "aggregateAllItemData"
      },
      "typeVersion": 1
    },
    {
      "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 \ud83e\udde0 (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 dynamically retrieves workflows from a source instance and lets you choose exactly what to load into a target instance.\n\n### Here\u2019s what happens:\n1. The workflow retrieves workflows from a source n8n instance via the API.\n2. A dynamic form is generated listing available workflows.\n3. You select which workflows to import.\n4. Selected workflows are formatted for API compatibility.\n5. Workflows are created in the target n8n instance.\n\n### This ensures:\n- No bulk imports  \n- No accidental overwrites  \n- Full control over what gets moved  \n- Safe, API-driven workflow creation  \n\n## Setup steps \u2699\ufe0f\n\n**Estimated setup time:** 2\u20135 minutes\n\n### Simple mode (default)\n1. Add API credentials for the source n8n instance.\n2. Add API credentials for the target n8n instance.\n3. Execute the workflow and select workflows to import.\n\n### Dynamic mode (optional)\n1. Connect a database (e.g. Notion or Supabase) containing:\n   - n8n instance URLs  \n   - n8n API keys  \n2. Select the source and target instances via the form.\n3. Choose which workflows to import and run.\n\nOnce credentials are connected, the workflow is ready to use \ud83d\ude80"
      },
      "typeVersion": 1
    },
    {
      "id": "aa97f607-1d01-471c-92ac-94e55d1aaaca",
      "name": "Merge Source Instance",
      "type": "n8n-nodes-base.merge",
      "position": [
        80,
        992
      ],
      "parameters": {
        "mode": "combine",
        "options": {},
        "advanced": true,
        "mergeByFields": {
          "values": [
            {
              "field1": "name",
              "field2": "source"
            }
          ]
        },
        "outputDataFrom": "input1"
      },
      "typeVersion": 3.2
    },
    {
      "id": "313c8ba3-12f8-4c19-8be2-7e533a8ab0a0",
      "name": "Merge Target Instance",
      "type": "n8n-nodes-base.merge",
      "position": [
        80,
        1248
      ],
      "parameters": {
        "mode": "combine",
        "options": {},
        "advanced": true,
        "mergeByFields": {
          "values": [
            {
              "field1": "name",
              "field2": "target"
            }
          ]
        },
        "outputDataFrom": "input1"
      },
      "typeVersion": 3.2
    },
    {
      "id": "1f9403cb-fec5-4f4e-b06d-af4af49d9b72",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1616,
        -96
      ],
      "parameters": {
        "color": 7,
        "width": 544,
        "height": 624,
        "content": "## \ud83d\udd01 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\n- Source and target instances are fixed\n- Fastest way to get started\n\n**Dynamic mode**\n- Loads instance URLs and API keys from an external database (e.g. Notion)\n- Lets you select source and target instances via a form\n- Ideal for managing multiple n8n instances securely\n\nBoth modes use the same import logic downstream; only the instance configuration differs."
      },
      "typeVersion": 1
    },
    {
      "id": "7590dc36-3de9-4e8f-b3c1-e806ff06566b",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -880,
        -176
      ],
      "parameters": {
        "color": 7,
        "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 via the n8n API\n- Filters out archived or inactive workflows\n- Aggregates results into a single list\n- Builds a dynamic selection form (JSON mode)\n\nYou then select exactly which workflows to import.  \nOnly selected workflows continue downstream."
      },
      "typeVersion": 1
    },
    {
      "id": "266c504c-152d-4a26-bd2a-8d69980a888c",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        896,
        -176
      ],
      "parameters": {
        "color": 7,
        "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 fields that are incompatible with workflow creation\n- Normalises the workflow structure for API import\n- Creates the workflow in the target instance\n\nThis ensures workflows are imported cleanly without conflicts or invalid metadata."
      },
      "typeVersion": 1
    },
    {
      "id": "36ce80fb-b1ec-4f29-b9e4-0d2d983c4d90",
      "name": "Sticky Note6",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1376,
        -176
      ],
      "parameters": {
        "color": 7,
        "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."
      },
      "typeVersion": 1
    },
    {
      "id": "081ae916-8888-436a-9dd3-ed45ff6d98d1",
      "name": "Sticky Note4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        912,
        864
      ],
      "parameters": {
        "color": 7,
        "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 workflows into a single list\n\nPagination is handled using a cursor-based approach, ensuring all workflows are retrieved even on large instances."
      },
      "typeVersion": 1
    },
    {
      "id": "76c30303-351e-48e3-81f4-3e2e8f7e30c5",
      "name": "Sticky Note5",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1072,
        624
      ],
      "parameters": {
        "color": 7,
        "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 user\u2019s form selections (which instance is \u201csource\u201d and which is \u201ctarget\u201d)\n\n### What happens\n1. **Get Instance Information** loads all saved instances (URL + API key + display name).\n2. Two branches prepare each side:\n   - **Merge Source Instance \u2192 Set Source**\n   - **Merge Target Instance \u2192 Set Target**\n3. **Merge Source and Target** appends both objects into one array.\n4. **Source and Target** outputs a single structure used downstream to dynamically set:\n   - The base URL (instance URL)\n   - The API key header\n   - The instance role (`source` vs `target`)\n\n\u2705 Outcome: downstream nodes can reference the selected instances without hardcoding credentials in the workflow.\n\u26a0\ufe0f Keep API keys in a secure database, not inside n8n nodes or sticky notes."
      },
      "typeVersion": 1
    },
    {
      "id": "f493d528-77b1-4ef6-bfc8-b290348555d7",
      "name": "Sticky Note7",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1600,
        864
      ],
      "parameters": {
        "color": 7,
        "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- Passes only selected workflows downstream\n\nOnly workflows selected by the user continue to the import stage."
      },
      "typeVersion": 1
    },
    {
      "id": "7e413e9f-583e-4a13-a9b2-982af9dc2edc",
      "name": "Sticky Note8",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        3152,
        784
      ],
      "parameters": {
        "color": 7,
        "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 fields incompatible with workflow creation\n- Normalises the workflow structure for import\n- Creates the workflow in the target instance\n\nThis ensures workflows are imported cleanly without conflicts or invalid metadata."
      },
      "typeVersion": 1
    },
    {
      "id": "4f760b5e-5160-40b4-ba0b-5555d5340a37",
      "name": "Sticky Note9",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        3632,
        864
      ],
      "parameters": {
        "color": 7,
        "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 easy-to-read output."
      },
      "typeVersion": 1
    },
    {
      "id": "23fb1ba2-f2ef-415d-b242-1fdd30bfff3d",
      "name": "Create Workflow(s)",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        3440,
        1136
      ],
      "parameters": {
        "url": "={{ $('Source and Target').first().json.data.filter(item => item.type === 'target').map(item => item.url).toString() }}/api/v1/workflows",
        "method": "POST",
        "options": {},
        "jsonBody": "={{ $json.toJsonString() }}",
        "sendBody": true,
        "sendHeaders": true,
        "specifyBody": "json",
        "headerParameters": {
          "parameters": [
            {
              "name": "X-N8N-API-KEY",
              "value": "={{ $('Source and Target').first().json.data.filter(item => item.type === 'target').map(item => item.api_key).toString() }}"
            }
          ]
        }
      },
      "typeVersion": 4.4
    },
    {
      "id": "88e497d6-e750-4459-b9f4-7034829ee3a8",
      "name": "Create Workflow(s)1",
      "type": "n8n-nodes-base.n8n",
      "position": [
        1184,
        144
      ],
      "parameters": {
        "operation": "create",
        "requestOptions": {},
        "workflowObject": "={{ $json.toJsonString() }}"
      },
      "credentials": {
        "n8nApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "9bbe2872-4bc4-4e6f-a6d5-d76bbe5103e0",
      "name": "Set Workflow Display Name (Dynamic)",
      "type": "n8n-nodes-base.set",
      "position": [
        1648,
        1200
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "0e1b7526-faf5-4001-ba27-3005836cc58f",
              "name": "workflow_name",
              "type": "string",
              "value": "={{ $json.name }}"
            }
          ]
        }
      },
      "typeVersion": 3.4
    },
    {
      "id": "5ce849fa-e09a-4dec-9924-d6899eaa8d22",
      "name": "Set Workflow Display Name (Static)",
      "type": "n8n-nodes-base.set",
      "position": [
        -608,
        224
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "0e1b7526-faf5-4001-ba27-3005836cc58f",
              "name": "workflow_name",
              "type": "string",
              "value": "={{ $json.name }}"
            }
          ]
        }
      },
      "typeVersion": 3.4
    },
    {
      "id": "a583fd79-551e-463c-9057-a4ce273533a3",
      "name": "Aggregate Workflows (Dynamic)",
      "type": "n8n-nodes-base.aggregate",
      "position": [
        3664,
        1136
      ],
      "parameters": {
        "options": {},
        "aggregate": "aggregateAllItemData"
      },
      "typeVersion": 1
    },
    {
      "id": "d6e06702-4767-4245-84d8-994da8f7f60d",
      "name": "Aggregate Workflows (Static)",
      "type": "n8n-nodes-base.aggregate",
      "position": [
        1408,
        144
      ],
      "parameters": {
        "options": {},
        "aggregate": "aggregateAllItemData"
      },
      "typeVersion": 1
    },
    {
      "id": "6ad71500-d0a6-4011-9ce5-8d4dbb4ec6e9",
      "name": "Results (Dynamic)",
      "type": "n8n-nodes-base.form",
      "position": [
        3888,
        1136
      ],
      "parameters": {
        "options": {
          "customCss": ":root {\n\t--font-family: 'Open Sans', sans-serif;\n\t--font-weight-normal: 400;\n\t--font-weight-bold: 600;\n\t--font-size-body: 12px;\n\t--font-size-label: 14px;\n\t--font-size-test-notice: 12px;\n\t--font-size-input: 14px;\n\t--font-size-header: 20px;\n\t--font-size-paragraph: 14px;\n\t--font-size-link: 12px;\n\t--font-size-error: 12px;\n\t--font-size-html-h1: 28px;\n\t--font-size-html-h2: 20px;\n\t--font-size-html-h3: 16px;\n\t--font-size-html-h4: 14px;\n\t--font-size-html-h5: 12px;\n\t--font-size-html-h6: 10px;\n\t--font-size-subheader: 14px;\n\n\t/* Colors - Granite Marketing Dark Theme */\n\t--color-background: #171717;\n\t--color-test-notice-text: #fbbf24;\n\t--color-test-notice-bg: #1f1f1f;\n\t--color-test-notice-border: #404040;\n\t--color-card-bg: #1e1e1e;\n\t--color-card-border: #404040;\n\t--color-card-shadow: rgba(0, 0, 0, 0.3);\n\t--color-link: #a5a5a5;\n\t--color-header: #f5f5f5;\n\t--color-label: #d4d4d4;\n\t--color-input-border: #404040;\n\t--color-input-text: #e5e5e5;\n\t--color-focus-border: #4ade80;\n\t--color-submit-btn-bg: #4ade80;\n\t--color-submit-btn-text: #171717;\n\t--color-error: #f87171;\n\t--color-required: #4ade80;\n\t--color-clear-button-bg: #525252;\n\t--color-html-text: #d4d4d4;\n\t--color-html-link: #4ade80;\n\t--color-header-subtext: #a5a5a5;\n\n\t/* Border Radii - Matching Granite Marketing */\n\t--border-radius-card: 12px;\n\t--border-radius-input: 6px;\n\t--border-radius-clear-btn: 50%;\n\t--card-border-radius: 12px;\n\n\t/* Spacing */\n\t--padding-container-top: 24px;\n\t--padding-card: 24px;\n\t--padding-test-notice-vertical: 12px;\n\t--padding-test-notice-horizontal: 24px;\n\t--margin-bottom-card: 16px;\n\t--padding-form-input: 12px;\n\t--card-padding: 24px;\n\t--card-margin-bottom: 16px;\n\n\t/* Dimensions */\n\t--container-width: 448px;\n\t--submit-btn-height: 48px;\n\t--checkbox-size: 18px;\n\n\t/* Others */\n\t--box-shadow-card: 0px 4px 16px 0px var(--color-card-shadow);\n\t--opacity-placeholder: 0.5;\n}\n\n.multiselect {\n  max-height: 300px;\n  overflow: scroll;\n}"
        },
        "operation": "completion",
        "completionTitle": "Results",
        "completionMessage": "={{ $json.data.map(item =>\n`${item.is_empty === true ? item.name + ' - Failed \u274c' : item.name + ' - Success! \u2705'}`\n).join('\\n\\n') }}"
      },
      "typeVersion": 2.4
    },
    {
      "id": "6ee57cda-2a89-4095-adf0-c86f15eabced",
      "name": "Results (Static)",
      "type": "n8n-nodes-base.form",
      "position": [
        1632,
        144
      ],
      "parameters": {
        "options": {
          "customCss": ":root {\n\t--font-family: 'Open Sans', sans-serif;\n\t--font-weight-normal: 400;\n\t--font-weight-bold: 600;\n\t--font-size-body: 12px;\n\t--font-size-label: 14px;\n\t--font-size-test-notice: 12px;\n\t--font-size-input: 14px;\n\t--font-size-header: 20px;\n\t--font-size-paragraph: 14px;\n\t--font-size-link: 12px;\n\t--font-size-error: 12px;\n\t--font-size-html-h1: 28px;\n\t--font-size-html-h2: 20px;\n\t--font-size-html-h3: 16px;\n\t--font-size-html-h4: 14px;\n\t--font-size-html-h5: 12px;\n\t--font-size-html-h6: 10px;\n\t--font-size-subheader: 14px;\n\n\t/* Colors - Granite Marketing Dark Theme */\n\t--color-background: #171717;\n\t--color-test-notice-text: #fbbf24;\n\t--color-test-notice-bg: #1f1f1f;\n\t--color-test-notice-border: #404040;\n\t--color-card-bg: #1e1e1e;\n\t--color-card-border: #404040;\n\t--color-card-shadow: rgba(0, 0, 0, 0.3);\n\t--color-link: #a5a5a5;\n\t--color-header: #f5f5f5;\n\t--color-label: #d4d4d4;\n\t--color-input-border: #404040;\n\t--color-input-text: #e5e5e5;\n\t--color-focus-border: #4ade80;\n\t--color-submit-btn-bg: #4ade80;\n\t--color-submit-btn-text: #171717;\n\t--color-error: #f87171;\n\t--color-required: #4ade80;\n\t--color-clear-button-bg: #525252;\n\t--color-html-text: #d4d4d4;\n\t--color-html-link: #4ade80;\n\t--color-header-subtext: #a5a5a5;\n\n\t/* Border Radii - Matching Granite Marketing */\n\t--border-radius-card: 12px;\n\t--border-radius-input: 6px;\n\t--border-radius-clear-btn: 50%;\n\t--card-border-radius: 12px;\n\n\t/* Spacing */\n\t--padding-container-top: 24px;\n\t--padding-card: 24px;\n\t--padding-test-notice-vertical: 12px;\n\t--padding-test-notice-horizontal: 24px;\n\t--margin-bottom-card: 16px;\n\t--padding-form-input: 12px;\n\t--card-padding: 24px;\n\t--card-margin-bottom: 16px;\n\n\t/* Dimensions */\n\t--container-width: 448px;\n\t--submit-btn-height: 48px;\n\t--checkbox-size: 18px;\n\n\t/* Others */\n\t--box-shadow-card: 0px 4px 16px 0px var(--color-card-shadow);\n\t--opacity-placeholder: 0.5;\n}\n\n.multiselect {\n  max-height: 300px;\n  overflow: scroll;\n}"
        },
        "operation": "completion",
        "completionTitle": "Results",
        "completionMessage": "={{ $json.data.map(item =>\n`${item.is_empty === true ? item.name + ' - Failed \u274c' : item.name + ' - Success! \u2705'}`\n).join('\\n\\n') }}"
      },
      "typeVersion": 2.4
    },
    {
      "id": "6bbb950a-08a2-4a55-b210-ad4306f7f600",
      "name": "Aggregate Workflow Options (Static)",
      "type": "n8n-nodes-base.aggregate",
      "position": [
        -384,
        224
      ],
      "parameters": {
        "options": {},
        "aggregate": "aggregateAllItemData"
      },
      "typeVersion": 1
    },
    {
      "id": "abdd0e91-b796-4448-a258-e34fee9b7543",
      "name": "Aggregate Workflow Options (Dynamic)",
      "type": "n8n-nodes-base.aggregate",
      "position": [
        -576,
        1360
      ],
      "parameters": {
        "options": {},
        "aggregate": "aggregateAllItemData"
      },
      "typeVersion": 1
    },
    {
      "id": "8c78bada-c093-48d7-a66b-0172ae9578e8",
      "name": "Get All Source Instance Workflows",
      "type": "n8n-nodes-base.n8n",
      "position": [
        -1056,
        144
      ],
      "parameters": {
        "filters": {},
        "requestOptions": {}
      },
      "credentials": {
        "n8nApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "aeb77c8c-caa9-4ec0-aca4-9df3d94c0800",
      "name": "Get Source Workflows With Pagination",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        976,
        1136
      ],
      "parameters": {
        "url": "={{ $('Source and Target').first().json.data.filter(item => item.type === 'source').map(item => item.url).toString() }}/api/v1/workflows",
        "options": {
          "pagination": {
            "pagination": {
              "parameters": {
                "parameters": [
                  {
                    "name": "cursor",
                    "value": "={{ $response.body.nextCursor }}"
                  }
                ]
              },
              "requestInterval": 1000,
              "paginationCompleteWhen": "receiveSpecificStatusCodes",
              "statusCodesWhenComplete": "400"
            }
          }
        },
        "sendHeaders": true,
        "headerParameters": {
          "parameters": [
            {
              "name": "X-N8N-API-KEY",
              "value": "={{ $('Source and Target').first().json.data.filter(item => item.type === 'source').map(item => item.api_key).toString() }}"
            }
          ]
        }
      },
      "typeVersion": 4.4
    },
    {
      "id": "1b80098e-71c0-4e25-a270-cd0834d20a6a",
      "name": "Get Workflow JSON(s)",
      "type": "n8n-nodes-base.n8n",
      "position": [
        736,
        144
      ],
      "parameters": {
        "operation": "get",
        "workflowId": {
          "__rl": true,
          "mode": "id",
          "value": "={{ $('Select Matching Workflows1').item.json.id }}"
        },
        "requestOptions": {}
      },
      "credentials": {
        "n8nApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "bb3947af-344d-4b9c-8387-6942d6abdfcd",
      "name": "Get Workflow JSON(s)1",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        2992,
        1136
      ],
      "parameters": {
        "url": "={{ $('Source and Target').first().json.data.filter(item => item.type === 'source').map(item => item.url).toString() }}/api/v1/workflows/{{ $('Select Matching Workflows').item.json.id }}",
        "options": {},
        "sendHeaders": true,
        "headerParameters": {
          "parameters": [
            {
              "name": "X-N8N-API-KEY",
              "value": "={{ $('Source and Target').first().json.data.filter(item => item.type === 'source').map(item => item.api_key).toString() }}"
            }
          ]
        }
      },
      "typeVersion": 4.4
    }
  ],
  "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
          }
        ]
      ]
    }
  }
}