Skip to content
MoveWorkflows

How to import workflow JSON into n8n

Updated 2026-10-21 · 3 min read

To import workflow JSON into n8n, open the workflow menu in the editor and choose Import from File, or paste the JSON onto the canvas. For more than a handful of files, use the n8n public API or the command line. This page covers all three, plus the errors you are likely to hit when the JSON came from a converter or another instance.

Option 1. Editor: Import from File or paste

From the n8n export and import docs:

  1. Create or open a workflow.
  2. Click the workflow menu (… in the top bar).
  3. Choose Import from File and select the .json file. (n8n 2.x also offers Import from URL; the n8n 3.0 notes list it as retired.)

You can also copy the JSON and paste it onto the canvas with Ctrl/Cmd+V. Pasting adds the nodes to the open workflow, so start from an empty one.

To go the other way, the same menu has Download, which saves the workflow as JSON.

Option 2. Public API: bulk import

The n8n public API creates workflows with POST /api/v1/workflows (API reference). The body needs name, nodes, connections and settings.

  1. In n8n, go to Settings → n8n API and create an API key.
  2. Send it in the X-N8N-API-KEY header (authentication).
for f in workflows/*.json; do
  jq '{name, nodes, connections, settings: {}}' "$f" |
  curl -sS -X POST "$N8N_URL/api/v1/workflows" \
    -H "X-N8N-API-KEY: $N8N_API_KEY" \
    -H "Content-Type: application/json" \
    --data-binary @- && echo " <- $f"
done

The jq filter keeps only the fields the endpoint accepts; read-only top-level fields from an export (id, active, meta, tags) make the request fail. settings accepts only known keys too, so when in doubt send {}.

Notes:

  • The API isn't available during the n8n Cloud free trial.
  • Non-Enterprise API keys have full access to the account, so delete the key after the import.
  • Publish each workflow after you have checked it; production webhooks and schedules run only for published workflows.

The download from our converter includes a ready import script that does this for every workflow, so you only set N8N_URL and N8N_API_KEY.

Option 3. Command line

Server CLI (self-hosted, run where n8n runs; docs):

n8n import:workflow --input=workflow.json
n8n import:workflow --separate --input=./workflows/

Imported workflows are deactivated by default, and workflows with the same ID in the database are overwritten. n8n plans to deprecate these server commands, with no date set.

n8n CLI (@n8n/cli, runs from any machine over the public API; docs):

cat workflow.json | npx @n8n/cli workflow create --stdin

n8n now recommends this CLI for moving workflows between instances from the command line.

After the import

  1. Credentials. Imported nodes reference credentials by name and ID. On a new instance those don't exist, so open each node with a warning and select or create a credential. See Pipedream secrets to n8n credentials.
  2. Test with the test URL or the Execute workflow button.
  3. Publish. In n8n 2.x, publishing replaces the old Active toggle, and only the published version runs in production (docs).

Common errors

Symptom Likely cause Fix
API returns a validation error about settings Body without settings (it is required) Send "settings": {}
API rejects the body for extra properties Fields such as id, active or tags copied from an export Strip them, as in the jq filter above
401 Unauthorized Missing or wrong API key, or the Cloud trial Check the X-N8N-API-KEY header and your plan
A node shows as unknown Community node not installed on this instance Install it, or replace the node
A node warns about its credential Credential IDs from another instance Select or create a credential in the node
Workflow imported but never runs Not published Publish it

Importing from Pipedream

n8n can't import a Pipedream export directly; it expects n8n workflow JSON. Convert the export first. Our free report reads the Pipedream ZIP in your browser, and the download has one n8n JSON file per workflow plus the bulk import script. The report and 1 workflow are free. Full export: $3 per workflow, $19 minimum — coming soon. Full process: migrate Pipedream to n8n. Getting the ZIP: export Pipedream workflows.

Not affiliated with n8n or Pipedream.

FAQ

How do I import a workflow JSON file into n8n?
Open a workflow, click the workflow menu (the three dots at the top), choose Import from File and pick the .json file. You can also paste the JSON straight onto the canvas.
How do I import many n8n workflows at once?
Use the n8n public API: send each file to POST /api/v1/workflows with your API key in the X-N8N-API-KEY header. On self-hosted n8n you can also use n8n import:workflow --separate --input=<folder>.
Do credentials come with an imported workflow?
No. Exported n8n workflow JSON holds credential names and IDs, not the secrets. Create or select the credentials after import.
Is the n8n API available on the Cloud trial?
No. n8n says the API isn't available during the free trial.
Are imported workflows active?
The server CLI deactivates imported workflows by default. Whatever the import method, production webhooks and schedules run only after you publish the workflow.

Related

Sources