n8n-io/n8n · error · Error

No serializer registered for format '${format}'

Error message

No serializer registered for format '${format}'

What it means

A registry is attached to the workflow, but it does not contain a serializer for the requested format string. The registry is a plugin container; each serializer registers under a format key (e.g. 'json'). Asking for an unregistered format key produces this error. Distinct from 1268: here the registry exists, it just lacks that specific format.

Source

Thrown at packages/@n8n/workflow-sdk/src/workflow-builder.ts:771

				);
			}
		}
	}

	toString(): string {
		return JSON.stringify(this.toJSON(), null, 2);
	}

	toFormat<T>(format: string): T {
		const registry = this._registry;
		if (!registry) {
			throw new Error(
				`No serializer registered for format '${format}'. Provide a registry with serializers when creating the workflow.`,
			);
		}
		const serializer = registry.getSerializer(format);
		if (!serializer) {
			throw new Error(`No serializer registered for format '${format}'`);
		}

		const ctx: SerializerContext = {
			nodes: this._nodes,
			workflowId: this.id,
			workflowName: this.name,
			settings: this._settings,
			pinData: this._pinData,
			meta: this._meta,
			resolveTargetNodeName: (target: unknown) => this.resolveTargetNodeName(target),
		};

		return serializer.serialize(ctx) as T;
	}

	generatePinData(options?: GeneratePinDataOptions): WorkflowBuilder {
		const { beforeWorkflow } = options ?? {};

View on GitHub (pinned to 5ac6606e81)

Solutions

  1. Check available formats via the registry's serializer keys and use a registered one (typically 'json').
  2. Register a custom serializer for your format before calling toFormat().
  3. Fix typos in the format string to match the registered key exactly (case-sensitive).

Example fix

// before
wf.toFormat('yaml'); // throws — no yaml serializer

// after
wf.toFormat('json');
Defensive patterns

Strategy: validation

Validate before calling

const supported = registry.listFormats(); // hypothetical
if (!supported.includes(format)) {
  throw new Error(`Unsupported format '${format}'. Supported: ${supported.join(', ')}`);
}

Type guard

function isRegisteredFormat(registry: PluginRegistry, format: string): boolean {
  return registry.getSerializer(format) != null;
}

Try / catch

try {
  return wf.toFormat(format);
} catch (e) {
  if (e instanceof Error && /No serializer registered for format/.test(e.message)) {
    return wf.toFormat('json'); // default fallback
  }
  throw e;
}

Prevention

When it happens

Trigger: Calling .toFormat('yaml') or any custom format name when only the default 'json' serializer is registered; typo in the format string; using a format that a plugin was supposed to register but the plugin was never registered.

Common situations: Custom format plugins not loaded; mistyped format key; expecting a format from a newer/older SDK version where the plugin set differs.

Related errors


AI-assisted analysis of n8n-io/n8n@5ac6606e81 (2026-08-12). Data as JSON: /api/errors/098fd0c69c0189ae. Report an issue: GitHub.