{"record":{"id":"619ccd900ebb0c4c","repo":"n8n-io/n8n","slug":"no-binary-data-found-please-connect-a-binary-to-t","errorCode":null,"errorMessage":"No binary data found, please connect a binary to the input if you want to use SQLite as data source","messagePattern":"No binary data found, please connect a binary to the input if you want to use SQLite as data source","errorType":"exception","errorClass":"NodeOperationError","httpStatus":null,"severity":"error","filePath":"packages/@n8n/nodes-langchain/nodes/agents/Agent/agents/SqlAgent/execute.ts","lineNumber":114,"sourceCode":"\t\t\t\tthrow new NodeOperationError(this.getNode(), 'The ‘prompt’ parameter is empty.');\n\t\t\t}\n\n\t\t\tconst options = this.getNodeParameter('options', i, {}) as IDataObject & {\n\t\t\t\ttracingMetadata?: { values?: TracingMetadataEntry[] };\n\t\t\t};\n\t\t\tconst selectedDataSource = this.getNodeParameter('dataSource', i, 'sqlite') as\n\t\t\t\t| 'mysql'\n\t\t\t\t| 'postgres'\n\t\t\t\t| 'sqlite';\n\n\t\t\tconst includedSampleRows = options.includedSampleRows as number;\n\t\t\tconst includedTablesArray = parseTablesString((options.includedTables as string) ?? '');\n\t\t\tconst ignoredTablesArray = parseTablesString((options.ignoredTables as string) ?? '');\n\n\t\t\tlet dataSource: DataSource | null = null;\n\t\t\tif (selectedDataSource === 'sqlite') {\n\t\t\t\tif (!item.binary) {\n\t\t\t\t\tthrow new NodeOperationError(\n\t\t\t\t\t\tthis.getNode(),\n\t\t\t\t\t\t'No binary data found, please connect a binary to the input if you want to use SQLite as data source',\n\t\t\t\t\t);\n\t\t\t\t}\n\n\t\t\t\tconst binaryPropertyName = this.getNodeParameter('binaryPropertyName', i, 'data');\n\t\t\t\tdataSource = await getSqliteDataSource.call(this, item.binary, binaryPropertyName);\n\t\t\t}\n\n\t\t\tif (selectedDataSource === 'postgres') {\n\t\t\t\tdataSource = await getPostgresDataSource.call(this);\n\t\t\t}\n\n\t\t\tif (selectedDataSource === 'mysql') {\n\t\t\t\tdataSource = await getMysqlDataSource.call(this);\n\t\t\t}\n\n\t\t\tif (!dataSource) {","sourceCodeStart":96,"sourceCodeEnd":132,"githubUrl":"https://github.com/n8n-io/n8n/blob/5ac6606e81f67bb9534255570cd4e86fd8101eee/packages/@n8n/nodes-langchain/nodes/agents/Agent/agents/SqlAgent/execute.ts#L96-L132","documentation":"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.","triggerScenarios":"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.","commonSituations":"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.","solutions":["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).","Switch dataSource to 'postgres' or 'mysql' if you do not have a SQLite file.","Verify with $binary that the incoming item actually carries binary data before the agent runs."],"exampleFix":null,"handlingStrategy":"validation","validationCode":"const dataSource = this.getNodeParameter('dataSource', i, 'sqlite') as string;\nif (dataSource === 'sqlite' && !item.binary) {\n  throw new NodeOperationError(this.getNode(), 'SQLite data source requires binary input — connect a node that outputs a .sqlite file.');\n}","typeGuard":"function hasBinary(item: INodeExecutionData): item is INodeExecutionData & { binary: NonNullable<INodeExecutionData['binary']> } {\n  return !!item.binary && Object.keys(item.binary).length > 0;\n}","tryCatchPattern":null,"preventionTips":["When using SQLite mode, always connect a binary-producing upstream node.","Switch to postgres/mysql if no SQLite file is available.","Inspect the executions view to confirm $binary is populated before the agent."],"tags":["langchain","agent","sql","sqlite","binary","configuration"],"backgroundTag":null,"analyzedSha":"5ac6606e81f67bb9534255570cd4e86fd8101eee","analyzedAt":"2026-08-12T05:26:35.080Z","schemaVersion":2},"datasetVersion":"2026-08-12T13:17:24.610Z"}