{"record":{"id":"098fd0c69c0189ae","repo":"n8n-io/n8n","slug":"no-serializer-registered-for-format-format","errorCode":null,"errorMessage":"No serializer registered for format '${format}'","messagePattern":"No serializer registered for format '(.+?)'","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/@n8n/workflow-sdk/src/workflow-builder.ts","lineNumber":771,"sourceCode":"\t\t\t\t);\n\t\t\t}\n\t\t}\n\t}\n\n\ttoString(): string {\n\t\treturn JSON.stringify(this.toJSON(), null, 2);\n\t}\n\n\ttoFormat<T>(format: string): T {\n\t\tconst registry = this._registry;\n\t\tif (!registry) {\n\t\t\tthrow new Error(\n\t\t\t\t`No serializer registered for format '${format}'. Provide a registry with serializers when creating the workflow.`,\n\t\t\t);\n\t\t}\n\t\tconst serializer = registry.getSerializer(format);\n\t\tif (!serializer) {\n\t\t\tthrow new Error(`No serializer registered for format '${format}'`);\n\t\t}\n\n\t\tconst ctx: SerializerContext = {\n\t\t\tnodes: this._nodes,\n\t\t\tworkflowId: this.id,\n\t\t\tworkflowName: this.name,\n\t\t\tsettings: this._settings,\n\t\t\tpinData: this._pinData,\n\t\t\tmeta: this._meta,\n\t\t\tresolveTargetNodeName: (target: unknown) => this.resolveTargetNodeName(target),\n\t\t};\n\n\t\treturn serializer.serialize(ctx) as T;\n\t}\n\n\tgeneratePinData(options?: GeneratePinDataOptions): WorkflowBuilder {\n\t\tconst { beforeWorkflow } = options ?? {};\n","sourceCodeStart":753,"sourceCodeEnd":789,"githubUrl":"https://github.com/n8n-io/n8n/blob/5ac6606e81f67bb9534255570cd4e86fd8101eee/packages/@n8n/workflow-sdk/src/workflow-builder.ts#L753-L789","documentation":"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.","triggerScenarios":"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.","commonSituations":"Custom format plugins not loaded; mistyped format key; expecting a format from a newer/older SDK version where the plugin set differs.","solutions":["Check available formats via the registry's serializer keys and use a registered one (typically 'json').","Register a custom serializer for your format before calling toFormat().","Fix typos in the format string to match the registered key exactly (case-sensitive)."],"exampleFix":"// before\nwf.toFormat('yaml'); // throws — no yaml serializer\n\n// after\nwf.toFormat('json');","handlingStrategy":"validation","validationCode":"const supported = registry.listFormats(); // hypothetical\nif (!supported.includes(format)) {\n  throw new Error(`Unsupported format '${format}'. Supported: ${supported.join(', ')}`);\n}","typeGuard":"function isRegisteredFormat(registry: PluginRegistry, format: string): boolean {\n  return registry.getSerializer(format) != null;\n}","tryCatchPattern":"try {\n  return wf.toFormat(format);\n} catch (e) {\n  if (e instanceof Error && /No serializer registered for format/.test(e.message)) {\n    return wf.toFormat('json'); // default fallback\n  }\n  throw e;\n}","preventionTips":["Check the registry's registered serializer keys before calling toFormat().","Register custom serializers for any non-default format you use.","Use the exact (case-sensitive) format key the serializer registered under."],"tags":["workflow-builder","serialization","registry","plugins"],"backgroundTag":null,"analyzedSha":"5ac6606e81f67bb9534255570cd4e86fd8101eee","analyzedAt":"2026-08-12T05:26:35.080Z","schemaVersion":2},"datasetVersion":"2026-08-12T13:17:24.610Z"}