N8n cli export

From 8Dvibes/n8n-cli · View interactive version

N8n cli export is an AI agent skill from the GitHub repository 8Dvibes/n8n-cli. Export individual n8n workflows to JSON files. Selective, single-workflow exports for git or sharing. NOT a full instance backup -- use /n8n-backup for that. Use when saving one workflow to a file.

How to use this skill

Skill file

/n8n-export — Export n8n Workflows

Export one or more workflows to JSON files for version control or backup.

Arguments

Procedure

Single Workflow Export

n8n-cli workflows export <id> -o <output-path>.json

Default output path: ./n8n-workflows/<workflow-name>.json

Bulk Export

# Get list of workflow IDs
n8n-cli workflows list --json [--active] [--tag TAG] > /tmp/n8n-wf-list.json

# Export each one
python3 -c "
import json, subprocess, re
with open('/tmp/n8n-wf-list.json') as f:
    workflows = json.load(f)
for wf in workflows:
    wid = wf['id']
    name = re.sub(r'[^a-zA-Z0-9_-]', '_', wf.get('name', 'untitled'))
    path = f'n8n-workflows/{name}_{wid}.json'
    subprocess.run(['n8n-cli', 'workflows', 'export', wid, '-o', path])
    print(f'Exported: {path}')
"

For Git Version Control

Create a clean export directory:

mkdir -p n8n-workflows/
# Export all active workflows
# Strip volatile fields (versionId, updatedAt) for cleaner diffs

Output

Tips

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.