Docs n8n Migration Guide

Migrating from n8n

n8n workflows are a sequence of nodes: an HTTP call, a branch, a Slack
message, a database insert. Mockarty does not run n8n nodes. What it does is
convert a workflow export into a test case you own, so the checks you
already built can keep running while the automation is rebuilt here.

Two things come across:

  • The workflow becomes a Test Case (TCM). An HTTP Request node becomes an
    executable request step. A Set node that reads a field from the previous
    response becomes an extract directive ({{plan.orderId}}). Every other
    node becomes an explicit manual step that names the original n8n type and
    why it cannot run here. Nothing is dropped.
  • The connector catalog tells you what maps. GET /api/v1/workflows/import/n8n/catalog
    (or the MCP tool n8n_connector_catalog) lists every supported n8n type, the
    Mockarty mechanic it becomes, and whether that mapping is executable.

This is a migration tool, not a marketplace: nothing is downloaded from n8n,
and no n8n credential is transferred.

Before you start

  • You need the TCM module (the import creates a test case) and the
    test_case:write permission in the target namespace.
  • Export the workflow from n8n: workflow menu → Download (or Copy
    JSON
    ). The importer expects the v1 export with nodes[] and
    connections{}.

Import a workflow

In Test Cases, choose Import → From n8n workflow export (.json). Preview the conversion to see executable and blocked steps. If Mockarty cannot confirm an import, retry with the same export in the same space to recover the result without creating a second case.

curl -sS -X POST "$MOCKARTY/api/v1/workflows/import/n8n" \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "content": <the workflow JSON as a string>,
    "caseName": "Order intake (from n8n)",
    "folderPath": "Migration/n8n",
    "createPlan": true
  }'
Field Meaning
content The workflow export JSON. Required unless you use a temp file.
fileId MCP only: a previously uploaded temp file (file_...) instead of content. The REST endpoint takes content.
caseName Overrides the generated title (default n8n: <workflow name>).
folderId / folderPath Place the case in a folder. folderPath creates missing folders.
createPlan Also create a Test Plan whose single item runs the imported case.
planName Name for that plan (defaults to the case name).
allowUnknown Convert unknown node types into blocked steps instead of refusing. Default false.
dryRun Convert and report only; create nothing.

On success you get the case (and plan) id plus a full report: counts,
steps[], nodes[], skipped[], warnings[] and scheduleCron. A
201 means created, 200 means an existing case was returned because the
same bytes were imported before.

Idempotency

The case carries an external id derived from the workflow name and the export
digest. Re-importing the same bytes returns the existing case with
"idempotent": true; a changed workflow has a different digest and creates a
new case, so an edit never silently overwrites the old test. Concurrent imports
of the same bytes converge on one case: the losing request returns the winner
(200, "idempotent": true) instead of creating a duplicate.

createPlan uses one deterministic plan identity per workflow, so retries and
concurrent imports return the same plan. If folder placement fails, the whole
import is compensated (the case is removed) and the request fails — it never
returns 201 with the case left at the tree root.

What each n8n node becomes

n8n node Mockarty mechanic Runs without a human?
n8n-nodes-base.httpRequest Case step request — inline method/URL/headers/body, 2xx assertions Yes
n8n-nodes-base.set (reads $json) Extract directives on the upstream request step → {{plan.X}}; the value is read from that step’s HTTP response body Yes (as data capture)
n8n-nodes-base.webhook HTTP mock ingress + manual trigger step No — the trigger fires in n8n
n8n-nodes-base.scheduleTrigger Test Plan cron schedule + manual step (cron is reported) No
n8n-nodes-base.if / switch Test Plan DAG gates + manual branch step No — branch conditions are not evaluated
n8n-nodes-base.merge Multiple dependsOn edges + manual step No
n8n-nodes-base.slack / telegram / emailSend Notification channel (slack / telegram / email) + manual step No
n8n-nodes-base.postgres Datastore runner + manual step No
n8n-nodes-base.code / function Manual step — code runs only inside n8n No
n8n-nodes-base.executeWorkflow Import the nested workflow separately + manual step No
stickyNote, noOp Reported as skipped (editor-only / semantic no-op) —

HTTP Request nodes that use the n8n expression language (={{ ... }},
$json, $env, …) become blocked manual steps instead of being sent with
a guessed URL: Mockarty does not evaluate n8n expressions. Rewrite the call as
a literal request (or with Mockarty’s {{env.X}} / {{plan.X}} placeholders)
and the step becomes executable.

Reusing n8n’s own node packages

The catalog above is the built-in mapping. If your team also keeps n8n
community node packages (a directory with <Name>.node.json plus
.node.ts sources), the CLI can turn them into connector presets:

mockarty-cli plugin import --from n8n ./my-n8n-nodes --id my.n8n-connectors

Each node becomes a connector entry (reusing Mockarty’s built-in adapter where
one exists, webhook_generic otherwise), and the command prints an honest
per-part report: anything that only runs inside the n8n runtime is disclosed,
never silently dropped.

Browse from Company Assistant

An on-premises administrator can set MOCKARTY_ASSISTANT_N8N_ENABLED=true
and restart the Company server to allow access to the public npm catalogue.
Use the same value on every server node in a cluster.
Open Assistant → Communication → Connector catalogue. Submit a public
search term and select Preview for an exact release. The preview shows the
declared licence, credential types, and any native presets in that archive.
If the release has native presets, a Company server administrator can
choose Review and install from Assistant on the server or in connected
Desktop. The review shows the plugin, its permissions and the whole-server
installation scope of the selected Company.
Confirm Install for a first installation. Company rechecks the signed
license, your administrator access and the reviewed bundle before writing.
Manage an existing installation in Administration → Plugins. If the
connection drops after confirmation, Assistant checks the exact installed
bundle and reports the result it can verify. If Desktop cannot reach Company,
reconnect and choose Check installation to look up the result.

Choose Download Mockarty plugin to save the verified version as a ZIP.
An administrator can also review and install the ZIP in
Administration → Plugins. If Company requires signed plugins, use its
signing process before installation. A first installation starts disabled.
Enable it when ready, then configure a connector in the intended Space.
Add provider credentials in Mockarty when configuring the connector.
In a connected Desktop, select your Company Space and stay connected while
the server checks the archive.

Browsing the public connector catalogue

Search npm from the CLI, then preview the exact package version you choose.

mockarty-cli plugin n8n search "n8n-nodes-base"
mockarty-cli plugin n8n preview n8n-nodes-base 2.49.7

Search reads public metadata. Preview fetches the selected archive, checks its
SHA-512 against the exact version’s npm metadata, and lists the native presets
Mockarty can generate. Use --output wide to include entries that require
a separate adapter. Use --output json for the complete result or
--output quiet to print only the verified archive integrity. Preview does
not install anything.

Previewing an exact npm package

Use a local .tgz from your registry or approved offline mirror. Set
N8N_NPM_INTEGRITY to the exact version’s sha512-… integrity value from
that source.

mockarty-cli --output json plugin import --from n8n-package ./n8n-nodes-base-2.49.7.tgz \
  --npm-name n8n-nodes-base --npm-version 2.49.7 --npm-integrity "$N8N_NPM_INTEGRITY"

The preview lists the entrypoints, the number of credential types, the
declared source license and the available Mockarty presets. The importer reads
the package as data. Each original entrypoint requires n8n or its own native
adapter. The integrity check compares the local bytes with your registry pin.
Npm package instructions

For supported n8n-nodes-base entries, add --id team.n8n-connectors to
write a new plugin.json. Existing manifests are preserved. Review the native
presets, then pack the plugin and install it as an administrator.

mockarty-cli plugin pack ./team.n8n-connectors --out ./team.n8n-connectors.zip
mockarty-cli plugin install ./team.n8n-connectors.zip
mockarty-cli plugin enable team.n8n-connectors

A newly installed plugin starts disabled. After enabling it, select your Space
and open Settings → Plugins → Connector presets from plugins. Choose
Create integration and enter your instance details. Add credentials in
the saved integration’s settings.

Refusals

The importer refuses rather than guesses. The response carries a stable code:

Code Meaning
N8N_INVALID_EXPORT Not a workflow export, missing name/nodes/connections.
N8N_UNKNOWN_NODE_TYPE A node type is not in the catalog. Re-run with allowUnknown to get blocked steps instead.
N8N_CYCLE The connection graph loops (the message shows the path, e.g. A → B → A).
N8N_DANGLING_CONNECTION A connection points at a node that is not in the export.
N8N_DUPLICATE_NODE Two nodes share a name, so edges are ambiguous.
N8N_TOO_LARGE More than 500 nodes or 8 MiB of JSON.
N8N_EMBEDDED_CREDENTIAL A literal secret is pasted into a node’s parameters (an Authorization/Proxy-Authorization/API-key header, a Bearer/Basic/sk- value, URL userinfo, or a credential-named body field). The message names the node and field, never the value. Remove the secret and configure the connection in Mockarty.

From an AI agent

Two MCP tools mirror the REST surface:

  • n8n_connector_catalog — the catalog above.
  • import_n8n_workflow — the import. Accepts content or fileId, plus the
    same options. Returns the same report.

What does not migrate

  • Credentials. An export contains credential references; they are never
    copied. Configure the equivalent connection/channel in Mockarty. Literal
    secrets pasted into headers/query/body are refused (N8N_EMBEDDED_CREDENTIAL)
    and never persisted into the case.
  • Expressions and code. The n8n expression language and Code nodes run
    only inside n8n. They become manual steps.
  • Trigger firing. Webhook and schedule triggers are n8n’s runtime. Mockarty
    provides the ingress (an HTTP mock) and the schedule (a Test Plan cron), but
    the firing itself stays in n8n.
  • Pin data / static data. Runtime state is never copied.

Run the catalog first, then a dryRun import, and only then the real import —
the report tells you exactly how much of the workflow runs automatically and
what a person still has to do.