New Tool Radar

AI Agents & Automation

How to Export n8n Workflows to JSON Before an Upgrade

Export every n8n workflow to JSON files before an upgrade so a bad update can be rolled back workflow by workflow.

Schematic diagram with three steps: List the workflows, Export each to JSON, then Check the files open.

An upgrade can change how a node behaves, and the AI Agent node is one of the nodes that has changed: its agent type setting was deprecated from n8n 1.82.0 and the old version is due to be removed in n8n 3.0. Exporting every workflow to JSON before the upgrade gives you a rollback for each one.

Before you start

You need an n8n instance you can administer and a backup folder off the machine. List the workflows first and note which ones use the AI Agent node, because those need the closest check after the upgrade.

Export each workflow to JSON

Open each workflow in n8n and export it to a JSON file in the backup folder, using the workflow name in the file name. For many workflows, use the n8n command line or API export instead of clicking each one. Note the n8n version in a short readme in the same folder.

Check the files open and note the agent workflows

Open two exported files and check they contain the workflow JSON, not an error page. Count the files against the workflow list: a missing file is a workflow with no rollback. After the upgrade, open each AI Agent workflow and check it still runs.

Worked example: Backup for a fictional orders desk

Northwind Orders is a fictional orders desk with five workflows. The table shows the backup.

Workflow Uses AI Agent? Exported?
Order status agent Yes Yes
Daily summary agent Yes Yes
Invoice intake No Yes
Stock check No Yes
Returns triage Yes Yes

Expected result (UNTESTED): five JSON files sit in the backup folder, one per workflow, and two of them open as valid workflow JSON. We checked the n8n AI Agent documentation, which records the 1.82.0 deprecation and the planned 3.0 removal, but we did not export workflows on a live n8n instance.

Limits

An export holds the workflow, not the credentials: credentials are stored separately and must be backed up through the n8n backup route. Keep the backup folder private, because workflow JSON can contain addresses and field names from your systems.

Sources

See all