Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ edit the command's Short, Long, Example or flag usage and run `make docs`.
| [`n8n otel set`](n8n_otel_set.md) | Fully replace OpenTelemetry settings |
| [`n8n otel test-trace`](n8n_otel_test-trace.md) | Send one test span to an OTLP collector |
| [`n8n otel`](n8n_otel.md) | Manage OpenTelemetry tracing settings |
| [`n8n package export`](n8n_package_export.md) | Export workflows, folders, or projects as an n8n package (beta) |
| [`n8n package export`](n8n_package_export.md) | Export agents, workflows, folders, or projects as an n8n package (beta) |
| [`n8n package import`](n8n_package_import.md) | Import an n8n package into a project (beta) |
| [`n8n package`](n8n_package.md) | Export and import n8n packages (beta) |
| [`n8n project create`](n8n_project_create.md) | Create a project |
Expand Down
4 changes: 2 additions & 2 deletions docs/n8n_package.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Export and import n8n packages (beta)

### Synopsis

Move workflows, folders, and projects between instances as gzipped tar
Move agents, workflows, folders, and projects between instances as gzipped tar
packages (.n8np). Start with 'export' to write a package file from this
instance, then 'import' to read one back into a project.

Expand Down Expand Up @@ -36,6 +36,6 @@ n8n package [flags]
### SEE ALSO

* [n8n](n8n.md) - Command-line client for the n8n API
* [n8n package export](n8n_package_export.md) - Export workflows, folders, or projects as an n8n package (beta)
* [n8n package export](n8n_package_export.md) - Export agents, workflows, folders, or projects as an n8n package (beta)
* [n8n package import](n8n_package_import.md) - Import an n8n package into a project (beta)

58 changes: 31 additions & 27 deletions docs/n8n_package_export.md
Original file line number Diff line number Diff line change
@@ -1,21 +1,23 @@
## n8n package export

Export workflows, folders, or projects as an n8n package (beta)
Export agents, workflows, folders, or projects as an n8n package (beta)

### Synopsis

Export workflows and/or folders, or whole projects, as a gzipped tar
archive (.n8np) streamed to a local file. Pass --workflow-id and/or
--folder-id for loose workflows and folders, or --project-id for whole
projects, but not both groups in the same request; at least one ID is
required. Each exported folder includes its nested folders.
Export agents, workflows, and/or folders, or whole projects, as a gzipped
tar archive (.n8np) streamed to a local file. Pass --agent-id,
--workflow-id, and/or --folder-id for loose entities, or --project-id for
whole projects, but not both groups in the same request; at least one ID
is required. Each exported folder includes its nested folders, and whole
projects include their agents when the agents module is enabled.

Beta: breaking changes may still occur without a major version bump.
Requires the licensed Packages feature: workflow and folder exports need
workflow:export, project exports need project:export, and exports that
reference variables with values included also need variable:list.
Statically referenced sub-workflows must be included or the export is
rejected under the default missing-dependency policy. The archive may
Requires the licensed Packages feature: agent exports need agent:export
and the agents module, workflow and folder exports need workflow:export,
project exports need project:export, and exports that reference
variables with values included also need variable:list. Workflow and
agent dependencies outside the selection must be included or the export
is rejected under the default --dependency-policy fail. The archive may
bundle variable values and credential expressions, so it is written with
owner-only file permissions and the destination file is overwritten.

Expand All @@ -35,28 +37,30 @@ n8n package export [flags]
```
n8n package export --workflow-id 2tUt1wbLX592XDdX --out workflows.n8np
n8n package export --workflow-id a --folder-id 9xKp2mNqRzAbCdEf --out mixed.n8np
n8n package export --project-id Ox8O54VQrmBrb4qL --out project.n8np --output json
n8n package export --project-id Ox8O54VQrmBrb4qL --dependency-policy include-in-package --out project.n8np --output json
n8n package export --agent-id uT9LdQx7rK2MvB4f --version-policy prefer-published --out agent.n8np
n8n package export --input selection.json --out workflows.n8np
```

### Options

```
--context string saved context name to use (falls back to N8N_CONTEXT, then the saved current context; see 'n8n config context list')
--credential-export-policy string credential data handling: expression-values-only or no-values; literal values never travel (default: server default expression-values-only)
--folder-id stringArray folder to include with nested folders, repeatable up to 300 (cannot combine with --project-id or --input)
-h, --help help for export
--include-archived include archived workflows in folder and project exports; listed workflows always export (default: false)
--include-tags bundle workflow tags, else no tag files or references (default: true) (default true)
--include-variable-values bundle referenced variable values, else names only (default: true) (default true)
--input string export selection as JSON: a file path, or - for stdin (cannot combine with selection or policy flags; maximum 1 MiB)
--missing-workflow-dependency-policy string missing static sub-workflow handling: fail, reference-only, or include-in-package (default: server default fail)
--out string local destination for the .n8np archive: a file path, or - for stdout raw bytes (required)
--output string summary format: text or json (JSON is the counts, filename, byte size, and local file) (default "text")
--project-id stringArray project to include, repeatable (cannot combine with --workflow-id, --folder-id, or --input)
--url string instance URL override, e.g. https://n8n.example.com (falls back to N8N_URL, then the selected context URL)
--workflow-id stringArray workflow to include, repeatable up to 300 (cannot combine with --project-id or --input)
--workflow-version-policy string which workflow version travels: published-strict, prefer-published, ignore-unpublished, or latest (default: server default latest)
--agent-id stringArray agent to include, repeatable up to 300; needs the agents module (cannot combine with --project-id or --input)
--context string saved context name to use (falls back to N8N_CONTEXT, then the saved current context; see 'n8n config context list')
--credential-export-policy string credential data handling: expression-values-only or no-values; literal values never travel (default: server default expression-values-only)
--dependency-policy string workflow and agent dependencies outside the selection: fail, reference-only, or include-in-package (default: server default fail)
--folder-id stringArray folder to include with nested folders, repeatable up to 300 (cannot combine with --project-id or --input)
-h, --help help for export
--include-archived include archived workflows in folder and project exports; listed workflows always export (default: false)
--include-tags bundle workflow tags, else no tag files or references (default: true) (default true)
--include-variable-values bundle referenced variable values, else names only (default: true) (default true)
--input string export selection as JSON: a file path, or - for stdin (cannot combine with selection or policy flags; maximum 1 MiB)
--out string local destination for the .n8np archive: a file path, or - for stdout raw bytes (required)
--output string summary format: text or json (JSON is the counts, filename, byte size, and local file) (default "text")
--project-id stringArray project to include with its workflows and agents, repeatable up to 300 (cannot combine with --agent-id, --workflow-id, --folder-id, or --input)
--url string instance URL override, e.g. https://n8n.example.com (falls back to N8N_URL, then the selected context URL)
--version-policy string which workflow and agent version travels: published-strict, prefer-published, ignore-unpublished, or latest (default: server default latest)
--workflow-id stringArray workflow to include, repeatable up to 300 (cannot combine with --project-id or --input)
```

### SEE ALSO
Expand Down
22 changes: 13 additions & 9 deletions docs/n8n_package_import.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,17 @@ state (archiving needs workflow:delete), folder overwrite can remove
workflows the package does not contain (archive is recoverable,
hard-delete also drops executions permanently, so prefer archive),
missing credentials become empty stubs unless --credential-missing-mode
must-preexist, and folders, tags, variables, or tables may be created or
overwritten. Interactive runs ask for confirmation and non-interactive
runs require --yes; --file - also requires --yes because stdin cannot
answer. Needs workflow:import plus, depending on the package and the
policies, variable, tag, data-table, folder, and delete scopes, and the
Packages, Variables, and Folders features where the contents require
them.
is must-preexist or create-with-values, --data-table-schema-policy
overwrite permanently drops the values in removed or retyped columns,
and folders, tags, variables, or tables may be created or overwritten.
Interactive runs ask for confirmation and non-interactive runs require
--yes; --file - also requires --yes because stdin cannot answer.
Credentials created from incomplete package data are reported on
stderr and keep their workflows unpublished until completed. Needs
workflow:import plus, depending on the package and the policies,
credential, variable, tag, data-table, folder, and delete scopes, and
the Packages, Variables, and Folders features where the contents
require them.

```
n8n package import [flags]
Expand All @@ -44,10 +48,10 @@ n8n package import [flags]
--bindings string explicit credential bindings as JSON, e.g. '{"credentials":{"pkg-id":"target-id"}}' (default: server default {})
--context string saved context name to use (falls back to N8N_CONTEXT, then the saved current context; see 'n8n config context list')
--credential-matching-mode string how package credential references match: id-only, name-and-type, or type-only (default: server default id-only)
--credential-missing-mode string unresolvable credential handling: must-preexist rejects, create-stub creates empty placeholders (default: server default create-stub)
--credential-missing-mode string unresolvable credential handling: must-preexist rejects, create-stub creates empty placeholders, create-with-values seeds them from the package's expression values (needs credential:create; unconfirmed data lands in credentials.incomplete and blocks publishing) (default: server default create-stub)
--data-table-matching-mode string data-table matching: by-id, the only mode (default: server default by-id)
--data-table-missing-mode string missing data-table handling: create, must-preexist, or do-nothing (default: server default create)
--data-table-schema-policy string matched table schema strictness: keep-existing or fail (default: server default keep-existing)
--data-table-schema-policy string matched table schema handling: keep-existing accepts extra target columns, fail rejects any difference, overwrite reshapes the table to the package and permanently drops values in removed or retyped columns for every workflow using it, overwrite-non-destructive applies the same changes but rejects removals and retypes; rows are kept (default: server default keep-existing)
--file string package archive (.n8np) to import: a file path, or - for stdin (required; stdin requires --yes)
--folder-conflict-policy string existing folder handling: merge, fail, or overwrite; empty follows --project-conflict-policy on project packages, merge otherwise (default: follow)
--folder-id string folder within the target project, from 'n8n folder list PROJECT_ID' (default: the project root)
Expand Down
Loading
Loading