N8n Package
Selects what to export. Provide workflowIds and/or folderIds to export loose workflows and folders, or projectIds to export whole projects, but not both groups in the same request. At least one id must be supplied.
IDs of the workflows to include in the exported package.
["2tUt1wbLX592XDdX"]IDs of the folders to include in the exported package. Each folder is exported with its nested folders.
["9xKp2mNqRzAbCdEf"]IDs of the projects to include in the exported package.
["Ox8O54VQrmBrb4qL"]A gzipped tar archive containing the exported package contents.
The request is invalid or provides malformed data.
Unauthorized
Forbidden
The specified resource was not found.
Gzip-compressed tar package (.n8np).
Target project id. Omit or send empty to import into the caller's personal project.
Optional folder within the target project. Omit or send empty for project root.
How credential references in requirements.credentials are matched on the target instance. id-only (default) matches by id. name-and-type matches credentials with the exact same name and type. type-only matches any credential of the same type. For name-and-type and type-only, candidates are ranked by scope — a credential owned by the target project wins over one merely shared into it, which in turn wins over a global credential; if several candidates remain in the winning scope, the most recently updated one is chosen.
id-onlyPossible values: What to do when a credential reference cannot be resolved. create-stub (default) creates empty credential placeholders in the target project for missing references. must-preexist requires every referenced credential to already exist.
create-stubPossible values: Optional JSON object of explicit source→target id bindings, keyed by entity type. Only credentials is supported today: send {"credentials":{"<packageCredentialId>":"<targetCredentialId>"}} to map credential ids from the package to credential ids on the target instance. These explicit bindings are validated on type and applied before credentialMatchingMode resolution runs.
{}new-version updates matching workflows and creates a new version, fail rejects the import when any matching workflow exists, and skip leaves matching workflows unchanged.
Controls the id each newly created workflow receives. new (default) mints a fresh id and records the package id as sourceWorkflowId, so the same package can be imported repeatedly without id collisions. source reuses the package's own workflow id on the target instance. Workflows matched to an existing workflow in the target project (status updated or skipped) always keep that workflow's current id, regardless of policy.
newPossible values: Controls whether imported workflows are published after content is written. preserve-published-state keeps new workflows inactive and republishes an updated workflow only when it was already published and the package workflow is published too, so drafts are never published. match-source follows the package workflow's published flag. publish-all publishes every imported workflow. unpublish-all leaves new workflows inactive and unpublishes updated workflows that were published.
preserve-published-statePossible values: Controls what happens when a package folder (matched by id in the target project) already exists at the same position. merge (default) reuses the existing folder as-is and merges the package's children into it; fail rejects the import. A folder whose id exists under a different parent, or belongs to another project, always blocks the import. Requires the folder:create scope and a license that supports folders when the package contains folders.
mergePossible values: Import succeeded; the listed workflows were written to the target project.
The request is invalid or provides malformed data.
Unauthorized
Forbidden
The specified resource was not found.
Import blocked by at least one conflict among the issues — a workflow source-id conflict or a folder conflict (id under a different parent, id owned by another project, or a fail-policy match).
Import blocked by non-conflict issues only (e.g. unresolved credentials).
Last updated
Was this helpful?