Actions44
- Execution Actions
- Monitoring Actions
- Scheduler Actions
- Tag Actions
- Workflow Actions
Workflow → Export Workflow
AI-generatedSummary
Fetches the full definition of one or more n8n workflows through the n8n public API and returns them as JSON. It is read-only: it changes nothing on the instance.
Inputs
- Workflow Selection — How to choose workflows: From Searchable List (default), Multiple From List, Current Workflow (the workflow containing this node; it must be saved first), or By URL or ID.
- Workflow Name or ID (required) — Single workflow picked from the list. Shown when selection mode is 'From Searchable List'. Can also be set with an expression.
- Workflow Names or IDs (required) — Several workflows picked from the list. Shown when selection mode is 'Multiple From List'.
- Workflow URL or IDs — Shown when selection mode is 'By URL or ID'. Accepts workflow URLs, plain IDs, or comma-separated values. IDs are extracted from URLs and de-duplicated.
Output shape
One output item per input item, with a workflows array in its JSON. Each element is the full workflow object returned by GET /workflows/{id}, in the order the IDs were selected. The object normally includes nodes, connections, settings, tags, and metadata.
Requires the n8nApi credential. Failures throw an error unless Continue On Fail is enabled, in which case an
errormessage item is returned. If no workflow is selected, it errors with 'Select at least one workflow.' Exported credentials are whatever the API returns (typically references, not secrets). The node also records the exported workflows in its recently-used static data. It does not write a file; use the JSON downstream, for example to convert it to a file or feed an Import Workflow operation.
Examples
Example 1: Back up a single production workflow
Workflow Selection = From Searchable List; pick the workflow. Pass the workflows[0] JSON to a file or storage node.
Example 2: Export several workflows at once
Workflow Selection = Multiple From List; select the workflows. Output workflows array contains each full definition.
Example 3: Export workflows by URL or ID from upstream data
Workflow Selection = By URL or ID; Workflow URL or IDs = expression such as {{$json.ids}} with comma-separated IDs.