n8n-io/n8n · error

Delimiter must be a single character

Error message

Delimiter must be a single character

What it means

parseCsvTsv validates the optional delimiter before invoking the CSV parser: it must be exactly one character. Multi-character delimiters (e.g. ';;' or a pasted string with whitespace) are rejected up front because the underlying parser treats the delimiter as a single character set.

Solutions

  1. Use a single-character delimiter (',' ';' '\t' or similar)
  2. Strip accidental whitespace or duplication from the delimiter option
  3. If the data truly uses a multi-character separator, pre-split it in a Code node before parsing
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at packages/@n8n/instance-ai/src/parsers/structured-file-parser.ts:276 when the library encounters an invalid state.

Common situations: See trigger scenarios.


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

Appendix: source

Thrown at packages/@n8n/instance-ai/src/parsers/structured-file-parser.ts:276

	);
}

function hasDangerousKey(obj: Record<string, unknown>): string | undefined {
	for (const key of Object.keys(obj)) {
		if (DANGEROUS_KEYS.has(key)) return key;
	}
	return undefined;
}

function parseCsvTsv(
	content: string,
	format: 'csv' | 'tsv',
	options: { hasHeader: boolean; delimiter?: string },
): { rawHeaders: string[]; allRows: string[][] } {
	const delimiter = options.delimiter ?? (format === 'tsv' ? '\t' : ',');

	if (delimiter.length !== 1) {
		throw new Error('Delimiter must be a single character');
	}

	const records = getCsvParse()(content, {
		delimiter,
		columns: false,
		skip_empty_lines: true,
		relax_column_count: true,
		trim: true,
	});

	if (records.length === 0) {
		return { rawHeaders: [], allRows: [] };
	}

	let rawHeaders: string[];
	let dataRows: string[][];

	if (options.hasHeader) {

View on GitHub (pinned to 5ac6606e81)