n8n-io/n8n · error · NodeOperationError

No binary data found, please connect a binary to the input i

Error message

No binary data found, please connect a binary to the input if you want to use SQLite as data source

What it means

Thrown by the SQL Agent when dataSource is set to 'sqlite' but the current item has no binary property. The SQLite mode reads a .sqlite file from the item's binary data, so an absent binary blob makes execution impossible.

Source

Thrown at packages/@n8n/nodes-langchain/nodes/agents/Agent/agents/SqlAgent/execute.ts:114

				throw new NodeOperationError(this.getNode(), 'The ‘prompt’ parameter is empty.');
			}

			const options = this.getNodeParameter('options', i, {}) as IDataObject & {
				tracingMetadata?: { values?: TracingMetadataEntry[] };
			};
			const selectedDataSource = this.getNodeParameter('dataSource', i, 'sqlite') as
				| 'mysql'
				| 'postgres'
				| 'sqlite';

			const includedSampleRows = options.includedSampleRows as number;
			const includedTablesArray = parseTablesString((options.includedTables as string) ?? '');
			const ignoredTablesArray = parseTablesString((options.ignoredTables as string) ?? '');

			let dataSource: DataSource | null = null;
			if (selectedDataSource === 'sqlite') {
				if (!item.binary) {
					throw new NodeOperationError(
						this.getNode(),
						'No binary data found, please connect a binary to the input if you want to use SQLite as data source',
					);
				}

				const binaryPropertyName = this.getNodeParameter('binaryPropertyName', i, 'data');
				dataSource = await getSqliteDataSource.call(this, item.binary, binaryPropertyName);
			}

			if (selectedDataSource === 'postgres') {
				dataSource = await getPostgresDataSource.call(this);
			}

			if (selectedDataSource === 'mysql') {
				dataSource = await getMysqlDataSource.call(this);
			}

			if (!dataSource) {

View on GitHub (pinned to 5ac6606e81)

Solutions

  1. Connect an upstream node that outputs a binary .sqlite file (e.g. Read Binary File, HTTP Request downloading a .db, or a binary-producing node).
  2. Switch dataSource to 'postgres' or 'mysql' if you do not have a SQLite file.
  3. Verify with $binary that the incoming item actually carries binary data before the agent runs.
Defensive patterns

Strategy: validation

Validate before calling

const dataSource = this.getNodeParameter('dataSource', i, 'sqlite') as string;
if (dataSource === 'sqlite' && !item.binary) {
  throw new NodeOperationError(this.getNode(), 'SQLite data source requires binary input — connect a node that outputs a .sqlite file.');
}

Type guard

function hasBinary(item: INodeExecutionData): item is INodeExecutionData & { binary: NonNullable<INodeExecutionData['binary']> } {
  return !!item.binary && Object.keys(item.binary).length > 0;
}

Prevention

When it happens

Trigger: SQL Agent configured with dataSource='sqlite' but the incoming item has no binary data — typically because no node upstream produced binary output, or the binary was consumed by an earlier node.

Common situations: Trigger node emits JSON only; a previous node stripped binary; user wired the agent directly to a Schedule Trigger that produces no binary; first item in a batch where only later items carry binary.

Related errors


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